AI crashes when calling chankan
See original GitHub issue2017-07-03 00:26:23 INFO: Hand: 23m55z + 8s [888s, 456m, 999s]
2017-07-03 00:26:24 DEBUG: Send: <N type="5" hai="103" />
2017-07-03 00:26:24 INFO: We called a kan set!
2017-07-03 00:26:25 DEBUG: Get: <N who="0" m="38515" /> <T51/>
2017-07-03 00:26:25 INFO: Meld: Type: chankan, Tiles: 8888s [100, 101, 102, 103] by 0
2017-07-03 00:26:25 INFO: Hand: 23m8s55z + 4p [888s, 456m, 999s]
2017-07-03 00:26:26 ERROR: Unexpected exception
Traceback (most recent call last):
File "/mnt/d/programming/wsl/tenhou-python-bot-0.2.7/project/tenhou/main.py", line 24, in connect_and_play
client.start_game()
File "/mnt/d/programming/wsl/tenhou-python-bot-0.2.7/project/tenhou/client.py", line 277, in start_game
discarded_tile = self.player.discard_tile()
File "/mnt/d/programming/wsl/tenhou-python-bot-0.2.7/project/mahjong/player.py", line 157, in discard_tile
tile_to_discard = self.ai.discard_tile()
File "/mnt/d/programming/wsl/tenhou-python-bot-0.2.7/project/mahjong/ai/main.py", line 60, in discard_tile
selected_tile = self.process_discard_options_and_select_tile_to_discard(results, shanten)
File "/mnt/d/programming/wsl/tenhou-python-bot-0.2.7/project/mahjong/ai/main.py", line 96, in process_discard_options_and_select_tile_to_discard
return self.chose_tile_to_discard(results)
File "/mnt/d/programming/wsl/tenhou-python-bot-0.2.7/project/mahjong/ai/main.py", line 211, in chose_tile_to_discard
temp_tile = results[0]
IndexError: list index out of range
2017-07-03 00:26:26 INFO: Ending the game...
2017-07-03 00:26:26 ERROR: Game was ended without success
Version is 0.2.7.
Here is the link of full log file.
https://app.box.com/s/zj8tos4qcdjcy5f3d4iolacz9dtiz88u
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Fix Illustrator crash issues - Adobe Support
Illustrator crashing or freezing? We're here to help. Fix common crash issues in simple steps. Perform these steps in sequence ...
Read more >M1 Apple McBook - Crashing - Illustrator UserVoice
I just got a new MacBook Pro with the M1 Apple chip. Illustrator keeps freezing and crashing. It also causes my whole computer...
Read more >RStudio crashes durin this excersize · Issue #432 - GitHub
To change all layers to have dtype float64 by default, call tf.keras.backend.set_floatx('float64') . To change just this layer, pass dtype=' ...
Read more >Skirmish vs AI crashes my game : r/totalwar - Reddit
Skirmish vs AI crashes my game. Is this happening for anyone else and is there any solution that anyone knows of. I have...
Read more >Adobe Illustrator Keeps Crashing? (6 Reasons & Fixes)
What to do when Illustrator freezes or crashes? Before finding a solution, you should know what caused the crashing. Here are some reasons ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@Nihisil I already downloaded all the logs of tenhou table from 2009 to around 2017 June. If you want to I can share them with you. (It’s in AWS s3 storage). I made a simple search engine using these logs for fun https://t.co/05bhyhmixi .
I am thinking to apply Deep Q Learning. So I suggest that we refactor the bot code in the way that different AI functions are pluggable.
A simple approach at top-level is to create a dedicated class which abstracts away the communication to tenhou.net and translate tenhou.net-specific protocol into simpler game state expression, like an array of integers.
This way, it is easier to extend the code to run with log files. We can create a new Communicator which actually reads a log file and reproduce the game with the same interface.
@mthrok
Thank you, but I almost finish my downloading, so there is no need to share logs.
Yes. I plan to do refactoring for the next a couple of month and my main goal is build pluggable AI. So, anyone can try to implement their own AI and easy run it on the tenhou.net.
Meantime you can try to implement your AI and run it with other copies of your bot with this mahjong-server: https://github.com/mahjong-server/mahjong-server (I didn’t try it yet)