• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 11:52
CEST 17:52
KST 00:52
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Team Liquid Map Contest #22: Results and Winners6Code S Season 2 (2026): RO4 and Finals Preview12TL.net Map Contest #22 - Voting & Ladder Map Selection7Code S Season 2 (2026) - RO8 Preview5[ASL21] Finals Preview: Two Legacies21
Community News
Douyu Cup 2026: $20,000 Legends Event (June 26-28)8[BSL22] Non-Korean Championship from 13 to 28 June4Weekly Cups (May 25-31): Clem doubles, 2v2 circuit heads toward finale0StarCraft II 5.0.16 PTR Patch Notes may 26th156Weekly Cups (May 18-24): MaxPax wins doubles0
StarCraft 2
General
High level ptr replays? where can I find them? StarCraft II 5.0.16 PTR Patch Notes may 26th TL Poll: How do you feel about the 5.0.16 PTR balance changes? Team Liquid Map Contest #22: Results and Winners TL.net Map Contest #22 - Voting & Ladder Map Selection
Tourneys
Douyu Cup 2026: $20,000 Legends Event (June 26-28) Maestros of The Game 2 announcement and schedule ! Sparkling Tuna Cup - Weekly Open Tournament Sea Duckling Open (Global, Bronze-Diamond) GSL Code S Season 2 (2026)
Strategy
[G] Having the right mentality to improve
Custom Maps
[D]RTS in all its shapes and glory <3
External Content
The PondCast: SC2 News & Results Mutation # 529 Opportunities Unleashed Mutation # 528 Infection Detected Welcome to the External Content forum
Brood War
General
BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ vespene.gg — BW replays in browser Quality of life changes in BW that you will like ? [BSL22] Non-Korean Championship from 13 to 28 June
Tourneys
[Megathread] Daily Proleagues [ASL21] Grand Finals [BSL22] Grand Finals - Sunday 21:00 CEST Escore Tournament StarCraft Season 2
Strategy
Creating a full chart of Zerg builds Relatively freeroll strategies Why doesn't anyone use restoration? Any training maps people recommend?
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread PC Games Sales Thread ZeroSpace Megathread Summer Games Done Quick 2026!
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia
Community
General
US Politics Mega-thread Canadian Politics Mega-thread Russo-Ukrainian War Thread Trading/Investing Thread Things Aren’t Peaceful in Palestine
Fan Clubs
The HerO Fan Club! The herO Fan Club!
Media & Entertainment
Movie Discussion! [Req][Books] Good Fantasy/SciFi books [TV/BOOK] *SPOILERS* Game of Thrones Discussion [Manga] One Piece
Sports
Formula 1 Discussion 2024 - 2026 Football Thread Cricket [SPORT] TeamLiquid Health and Fitness Initiative For 2023 NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Facing Challenges in Mobile App Development
TL Community
The Automated Ban List
Blogs
Does Workplace Frustration D…
TrAiDoS
An Exploration of th…
waywardstrategy
I'm an arrogant trash talke…
FlaShFTW
Gauntlet SC2: A Retrospectiv…
Ctone23
Why RTS gamers make better f…
gosubay
Customize Sidebar...

Website Feedback

Closed Threads



Active: 8973 users

[Mahjong]Tenhou Thread - Page 38

Forum Index > General Games
Post a Reply
Prev 1 36 37 38 39 40 49 Next All
Trundle
Profile Joined January 2015
Canada9 Posts
January 26 2015 22:57 GMT
#741
On January 27 2015 03:26 spinesheath wrote:
Interesting, I didn't expect people from outside of TL to stumble across this thread. While we're on the topic of interesting things, can someone explain this to me? (image)


The forum is trolling you then. Be careful in the Freljord...
I'm gonna crush your dreams! They're in your skull, right?
JSH
Profile Blog Joined July 2009
United States4109 Posts
January 27 2015 15:06 GMT
#742
Cool!
Can anyone join or do you have to be a certain rank?

Also I've been playing too much Pokemon TCG Online, and when I tried playing tenhou earlier, the turns went by way too fast lol
"It's called a miracle because it doesn't happen" - Just like my chances of reaching C- on ICCUP
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
Last Edited: 2015-01-27 21:35:53
January 27 2015 16:55 GMT
#743
On January 27 2015 07:23 Benawii wrote:
I see what you're talking about. Information about whether there is someone who can call the discarded tile is definitely leaked. This can be taken advantage (although perhaps less reliably) even without inspecting the packets since if someone can call then there will be a delay. This is simply the price we have to pay unless we're willing to wait for 5+ seconds every single turn. I do think Tenhou does randomly inserts artificial delay even when no one can call the discarded tile also.

The message that's difficult to decode would be the message when someone makes a call, e.g., "<N who="2" m="49167" />". That "m" field encodes the 3/4 tiles in a somewhat complicated way. I had to use a decompiler on the (premium) flash client to learn about this. Thankfully the code I get is easy to read, although I kinda got lazy and gave up when I see the code.

I've done that one ages ago and redid it recently:
https://github.com/spinesheath/TenView/blob/master/Spines.Tenhou/Spines.Tenhou.Client/MeldCode.cs
It's still up for some refactorings, especially once I figure out how I want to deal with the "player index". The encoding is unreasonably complex for just a couple of bytes of traffic savings, but that's a common theme on tenhou.net...

So I just wrote a random seed generator in order to write a local server to let my bots play on. For that I checked the length of the seed in a couple or replay files. Before I had estimated it to be about 1000 characters long. It's 3328 characters long, excluding the part before the comma. Geez. And that's only used to initialize a mersenne twister, which produces a random sequence, of which 288 values are taken and hashed using a SHA512 hash, and then the result of that is used to permute the tiles in the wall using a Fisher-Yates shuffle...


Does anyone happen to know which tile is auto-discarded if you call a pon or chii and fail to choose a discard in time? Normally if you fail to choose, tenhou will make you tsumokiri, but if you call a pon or chii you don't have a draw to discard. I'd assume it's either the lowest-indexed (1m comes first, then up to 9m, and so on) tile or a random tile just because I don't really see any reasonable choice. Actually lowest indexed might not even be a good idea because it gives away information out your hand.
If you have a good reason to disagree with the above, please tell me. Thank you.
Benawii
Profile Joined December 2013
United States51 Posts
Last Edited: 2015-01-27 21:54:03
January 27 2015 21:50 GMT
#744
On January 28 2015 01:55 spinesheath wrote:
Does anyone happen to know which tile is auto-discarded if you call a pon or chii and fail to choose a discard in time?

Just tried this in test play (you know about it, right?), and it looks like the highest index tile that can be legally discarded is auto-discarded. I'm guessing in the case of kan the rinshan tile (replacement tile) is auto-discarded.

But anyway, you don't need to make your local server behave exactly the same as Tenhou's server, right? Unless you are planning to have Tenhou's client connect to it...
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
January 27 2015 22:09 GMT
#745
Well, if I'm planning on having a couple of bots learn while playing against each other on a much faster environment before I let them loose on tenhou.net, I should emulate tenhou.net closely. Then again I obviously wouldn't want my bots to fail to choose a discard. It's just something I'd have to implement one way or another, so why not the same way as tenhou does it?

And yeah, I know of test play. I wouldn't have thought of trying it there though, and don't care about it too much in general. I don't even know if test play connects to the server or is just a local game against TsumokiriAIs.
If you have a good reason to disagree with the above, please tell me. Thank you.
Benawii
Profile Joined December 2013
United States51 Posts
January 27 2015 22:24 GMT
#746
Test play is still server-based, although some messages like computer's discards may be bunched up and sent at the same time.

Will you start implementing actual AI soon, or do you still need other stuff implemented first? I'm looking forward to seeing whatever you end up making.
Trundle
Profile Joined January 2015
Canada9 Posts
January 28 2015 04:01 GMT
#747
On January 28 2015 00:06 JSH wrote:
Cool!
Can anyone join or do you have to be a certain rank?


The base requirement is a Tenhou.net 1-dan rating. While there are exceptions made to this rule (me, for one, a few others), it is not something suitable for total beginners (see the "what's a yaku" posts on reddit) nor for people who blindly play with no strategy or tactics. It's not meant to be rude to others, it's just that riichi mahjong itself has that level of complexity. A league with ponitsu-type players or that can only aim for speed (at the expense of ever making a hand worth more than 2600) will not be enjoyable for others; and HK-style players ignoring mentanpin-based hands (both offensively and defensively) will lead to a similar conclusion: if they are singled out, it's the equivalent of feeding the person on the right, handicapping the other two players at that table.

I did say that I would administer a pro test for those that have no record online, but i've been fairly lenient in letting people think and reason out the answer to the question(s).
I'm gonna crush your dreams! They're in your skull, right?
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
January 28 2015 17:39 GMT
#748
On January 28 2015 07:24 Benawii wrote:
Test play is still server-based, although some messages like computer's discards may be bunched up and sent at the same time.

Will you start implementing actual AI soon, or do you still need other stuff implemented first? I'm looking forward to seeing whatever you end up making.

Depends on how much motivation I can muster after work. It's been going well recently, but you never know.
Things I want to do first is finish up that local server and then write a gui so I can actually watch my bot play rather than read a series of message logs. Then I've got to reimplement my shanten counting algorithm since that is the most basic skill an AI will need. In the mean time I could hack up an AI that accepts a victory if presented one (aka tenhou/chiihou hands). chiitoitsu/kokushi AIs would also be easy to implement.

So yeah, could take a couple of weeks. I'm not hacking some quick and dirty code either (only temporarily), I make it a point to write very high quality code in this project.
If you have a good reason to disagree with the above, please tell me. Thank you.
tenhoubps
Profile Joined January 2015
3 Posts
January 30 2015 23:13 GMT
#749
Hi spinesheath, a friend linked me to this thread just now. What you have so far is pretty cool, so I thought maybe the work I have done before on this could be of help to you. I haven't really done much experimenting in the past years, but I have a lot of documentation and some old projects similar to what you've done (AI and so on). You can see some examples in these links:

http://arcturus.su/tenhou/faq.html
http://d.hatena.ne.jp/genericid/
http://d.hatena.ne.jp/genericid/20090912/1252779607
http://arcturus.su/crap/c/nagashibot -theory.html
http://arcturus.su/crap/c/wallreading.html (in fact this resulted in Tsuno completely changing the wall generation method to something very heavy and seemingly unbreakable!)

Some of the info sits behind the login of http://arcturus.su/tenhou/prot/ - so drop me a line if you're interested. The rest I haven't uploaded or is in my head... Email (bps at arcturus.su) is better than PM since I just made an account here to post this, so I probably won't check much.

bps
tenhoubps
Profile Joined January 2015
3 Posts
January 30 2015 23:45 GMT
#750
Oh yeah, and you can see an example of results from one AI I wrote here:

http://arcturus.su/tenhou/ranking/ranking.pl?name=mittens&r=8&d2=20091113&l=0

Actually it's a bit unhelpful giving the mean position... but anyway, it wasn't too bad. It was actually far better than this, but there was a bug that made it very often disconnect which I never bothered to address. So it lost a lot of games unnecessarily. But if memory serves well, it got to at least 3dan and had a rate of about 1700. The AI was really stupid too, so I think there's a lot of room for improvement.

And just for fun, there's also the more successful incarnation, which got to "tenhoui" rank (天鳳位 R3083) within 24 hours...

http://arcturus.su/tenhou/ranking/ranking.pl?name=mittens&r=8&d1=20100728&d2=20100728&l=0
http://d.hatena.ne.jp/genericid/20100801/1280680066
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
January 31 2015 09:08 GMT
#751
Interesting. I'm by no means trying to exploit tenhou, but still there's some things I'd like to hear some details about.

In one link you write that tenhou doesn't do anything if you don't send a discard but keep sending <Z/>. Is this still the case? I would assume tenhou would just time out your turn after a while...

The new wall generation algorithm is based on a seed that is many orders of magnitude larger than necessary to prevent predictions based on the draws seen so far. I'm pretty sure there's no way to predict the wall unless you have the seed or there is a major flaw in SHA512.

So mittens was actually an AI that played regular games? I'd be very interested in its inner workings; decision making process and such.

Also if you have any documentation on the protocol outside of just normal matches, I'd be happy if you just sent me some of that. Things like the LN, PXR and RANKING tag, and just now I noticed there's a nintei attribute in the HELO tag (after a match it seems) that I had never seen before...
If you have a good reason to disagree with the above, please tell me. Thank you.
Benawii
Profile Joined December 2013
United States51 Posts
January 31 2015 21:30 GMT
#752
Hi Alvin. I greatly appreciate all the work you have done on your site. The recent update to the ranking tool is quite nice also. Do you know if there is some way to find out the dan ranking of a Tenhou account? This was the first information I was looking for when I first tried using your ranking tool. If it's not available anywhere else, would it be possible to add this to your ranking tool? With the information it is already displaying I suppose it shouldn't increase the load on the server too much.
tenhoubps
Profile Joined January 2015
3 Posts
February 02 2015 02:09 GMT
#753
On February 01 2015 06:30 Benawii wrote:
Hi Alvin. I greatly appreciate all the work you have done on your site. The recent update to the ranking tool is quite nice also. Do you know if there is some way to find out the dan ranking of a Tenhou account? This was the first information I was looking for when I first tried using your ranking tool. If it's not available anywhere else, would it be possible to add this to your ranking tool? With the information it is already displaying I suppose it shouldn't increase the load on the server too much.

Done! You can see the details in the most recent news post (2015-02-01) here:

http://arcturus.su/tenhou/ranking/news.html
Benawii
Profile Joined December 2013
United States51 Posts
February 02 2015 22:08 GMT
#754
On February 02 2015 11:09 tenhoubps wrote:
Show nested quote +
On February 01 2015 06:30 Benawii wrote:
Hi Alvin. I greatly appreciate all the work you have done on your site. The recent update to the ranking tool is quite nice also. Do you know if there is some way to find out the dan ranking of a Tenhou account? This was the first information I was looking for when I first tried using your ranking tool. If it's not available anywhere else, would it be possible to add this to your ranking tool? With the information it is already displaying I suppose it shouldn't increase the load on the server too much.

Done! You can see the details in the most recent news post (2015-02-01) here:

http://arcturus.su/tenhou/ranking/news.html

Awesome! Thank you so much!
Hesmyrr
Profile Blog Joined May 2010
Canada5776 Posts
Last Edited: 2015-02-03 05:06:45
February 03 2015 04:38 GMT
#755
Wow, this thread exploded in the past few weeks. For the WAML, what do I use for the country - my citizenship or the current place of residence?
"If watching the MSL finals makes you a progamer, then anyone in Korea can do it." - Ha Tae Ki
KyuuSC
Profile Joined March 2012
United States36 Posts
February 04 2015 18:46 GMT
#756
On January 27 2015 03:26 spinesheath wrote:
Interesting, I didn't expect people from outside of TL to stumble across this thread.


I'm a casual Starcraft player, hence it's been natural for me to peek in here once in a while. But of course, there's mahjong.
JSH
Profile Blog Joined July 2009
United States4109 Posts
February 05 2015 00:05 GMT
#757
Who signed up for WAML?

I did
"It's called a miracle because it doesn't happen" - Just like my chances of reaching C- on ICCUP
Hesmyrr
Profile Blog Joined May 2010
Canada5776 Posts
February 05 2015 02:41 GMT
#758
On February 05 2015 09:05 JSH wrote:
Who signed up for WAML?

I did

Me too, and I spy Benawii as well.
So many anime avatars
"If watching the MSL finals makes you a progamer, then anyone in Korea can do it." - Ha Tae Ki
Trundle
Profile Joined January 2015
Canada9 Posts
February 05 2015 04:36 GMT
#759
On February 03 2015 13:38 Hesmyrr wrote:
Wow, this thread exploded in the past few weeks. For the WAML, what do I use for the country - my citizenship or the current place of residence?


Being from Canada, the organization prides itself in recognizing your right to identify however you wish, or even outright lie. We have a Vietnamese player living in Japan who signed up as a player from the Holy See (Vatican).

Given that this is the internet, I can't be bothered to check the truth for anyone. Were it a "bit" more serious, I would still allow people to identify with whatever country they can naturally identify with, or to pick one if they have multiple options. Mind you, if I were to draw a line, I wouldn't allow "Boston Irish" to choose Ireland or third-generation Asian immigrants to pick China/Japan/Iran/whatever. As long as you don't change every 3 months, I'm cool with it.
I'm gonna crush your dreams! They're in your skull, right?
Benawii
Profile Joined December 2013
United States51 Posts
Last Edited: 2015-02-06 05:13:54
February 05 2015 09:32 GMT
#760
Do you guys usually try to deny ippatsu when someone riichi near the end of the round (and you have enough safe tiles)? It's just that the thought never crossed my mind, so I thought it was interesting when it happened to me.

Here's what happened:
+ Show Spoiler +
[image loading]

North called chii on my discard and discarded 1p. East then discarded 1s. At first I was unhappy that I couldn't get ippatsu, but thinking back, if North didn't call, I wouldn't have won that hand, so I guess it's okay.
Prev 1 36 37 38 39 40 49 Next All
Please log in or register to reply.
Live Events Refresh
uThermal 2v2 Circuit
15:00
Season Finals: Group Stage 2
RotterdaM814
TaKeTV 392
IndyStarCraft 159
SteadfastSC112
BRAT_OK 83
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Serral 2135
uThermal 1580
RotterdaM 814
mouzHeroMarine 203
IndyStarCraft 159
SHIN 110
SteadfastSC 101
BRAT_OK 83
LamboSC2 45
sc2solar 19
Classic 12
SpiritSC2 6
StarCraft: Brood War
Britney 42240
Calm 4760
Sea 1639
EffOrt 548
Mini 480
Nal_rA 203
ggaemo 186
actioN 169
Sharp 95
Hyun 71
[ Show more ]
Shine 69
Sea.KH 52
910 49
Pusan 44
zelot 28
Sacsri 25
Rock 22
Killer 22
Movie 20
IntoTheRainbow 13
GoRush 11
Noble 3
Dota 2
qojqva3712
Counter-Strike
fl0m8557
olofmeister974
zeus376
kRYSTAL_33
Super Smash Bros
Mew2King148
Heroes of the Storm
Khaldor377
MindelVK7
Other Games
gofns33725
tarik_tv9853
singsing2559
B2W.Neo557
crisheroes308
Hui .137
ArmadaUGS116
KnowMe100
QueenE41
Organizations
Other Games
EGCTV1306
BasetradeTV170
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 13 non-featured ]
StarCraft 2
• Shameless 7
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• lizZardDota271
League of Legends
• Nemesis5344
Upcoming Events
BSL22 NKC (BSL vs China)
3h 8m
Jaystar vs Dewalt
eOnzErG vs TerrOr
XuanXuan vs Bonyth
Mihu vs Dewalt
Messiah vs Jaystar
eOnzErG vs Bonyth
TerrOr vs Dewalt
Wardi Open
19h 8m
OSC
1d 8h
Replay Cast
2 days
The PondCast
3 days
Replay Cast
4 days
OSC
4 days
CranKy Ducklings
4 days
BSL22 NKC (BSL vs China)
6 days
XuanXuan vs Jaystar
Mihu vs Messiah
eOnzErG vs Dewalt
Bonyth vs Jaystar
TerrOr vs Messiah
XuanXuan vs Mihu
eOnzErG vs Jaystar
Liquipedia Results

Completed

Acropolis #4 - GSB
2026 GSL S2
Heroes Pulsing #1

Ongoing

IPSL Spring 2026
KCM Race Survival 2026 Season 2
Acropolis #4
CSCL: Masked Kings S4
YSL S3
BSL 22 Non-Korean Championship
SCTL 2026 Spring
Maestros of the Game 2
WardiTV Spring 2026
uThermal 2v2 2026 Main Event
Murky Cup 2026
Heroes Pulsing #2
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1

Upcoming

CSLAN 4
Blizzard Classic Cup 2026
Kung Fu Cup 2026 Grand Finals
CranK Gathers Season 4: BW vs SC2 Team League
HSC XXIX
Douyu Cup 2026
Heroes Pulsing #3
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.