Closed Nihisil closed 3 years ago
Seed: 0.7654626590555946
0.7654626590555946
Situation: Hand: 266m4444z + 1z [111z, 789m]
Hand: 266m4444z + 1z [111z, 789m]
Reproduce: python reproducer.py --file failed_2020-11-11_13_06_26_885.txt --wind 3 --honba 0 --tile 1z --n 2 --player 3
python reproducer.py --file failed_2020-11-11_13_06_26_885.txt --wind 3 --honba 0 --tile 1z --n 2 --player 3
File: failed_2020-11-11_13_06_26_885.txt
Ещё сид: 0.6055974365886904
0.6055974365886904
Stack trace:
File "/home/nihisil/work/tenhou-python-bot/project/game/player.py", line 194, in discard_tile tile_to_discard = self.ai.discard_tile(discard_tile) File "/home/nihisil/work/tenhou-python-bot/project/game/ai/main.py", line 107, in discard_tile return self.hand_builder.discard_tile(self.player.tiles, self.player.closed_hand, self.player.melds) File "/home/nihisil/work/tenhou-python-bot/project/game/ai/hand_builder.py", line 22, in discard_tile selected_tile = self.choose_tile_to_discard(tiles, closed_hand, melds) File "/home/nihisil/work/tenhou-python-bot/project/game/ai/hand_builder.py", line 42, in choose_tile_to_discard self.calculate_second_level_ukeire(discard_option, tiles, melds, after_meld) File "/home/nihisil/work/tenhou-python-bot/project/game/ai/hand_builder.py", line 288, in calculate_second_level_ukeire results, shanten = self.find_discard_options(self.player.tiles, self.player.closed_hand) File "/home/nihisil/work/tenhou-python-bot/project/game/ai/hand_builder.py", line 199, in find_discard_options assert shanten >= min_shanten AssertionError
Добавил тест для воспроизведения бага: PYTHONPATH=./project pytest -k test_crash_when_tyring_to_discard_with_open_hand
PYTHONPATH=./project pytest -k test_crash_when_tyring_to_discard_with_open_hand
Seed:
0.7654626590555946
Situation:
Hand: 266m4444z + 1z [111z, 789m]
Reproduce:
python reproducer.py --file failed_2020-11-11_13_06_26_885.txt --wind 3 --honba 0 --tile 1z --n 2 --player 3
File: failed_2020-11-11_13_06_26_885.txt
Ещё сид:
0.6055974365886904
Stack trace: