mahjongrepository / tenhou-python-bot Goto Github PK
View Code? Open in Web Editor NEWBot for tenhou.net riichi mahjong server written in Python
License: MIT License
Bot for tenhou.net riichi mahjong server written in Python
License: MIT License
If it is possible bot should call kan when he is in riichi. Currently it ignores it.
Example:
http://tenhou.net/0/?log=2017100905gm-0089-0000-4d6748ea&tw=3&ts=6
And Log:
d2e0e_2017-10-08_20_04_02.log
Hi, thanks for your effort in this project. I have a question about possibility of telling whether a tile is a changed tile or not.
The definition of a changed tile: if the tile a player discards has existed in his hand, it is called a "changed tile"; if the tile a player discards is the one he just draws, it is NOT a "changed tile". I believe this information is important for mahjong players. When playing mahjong face to face, we always pay attention to players who changed their hands.
In mjlog, we can easily get this information since all tiles (including those in the hands of opponent players) are visible; however, is it possible to get this information while playing real games?
Thanks very much.
Sometimes bot call riichi and tenhou return error response, so we doing something wrong.
I think it can be related with rule of that it is impossible to call riichi on last 4 tiles.
Need to analyze logs and find out reasons:
2016-05-21 12:35:02.txt
2016-05-21 23:10:01.txt
2016-05-22 08:00:02.txt
For now bot don't know anything about calling kan melds (open and closed). It can improve his way to play a little bit
http://tenhou.net/3/?log=2018082423gm-0009-7994-bbcbda4a&tw=3&ts=1 2E0
Игрок D. Седьмой ход.
Кидает 8со из рянмена 78, хотя очевидно есть броски лучше.
I feel there are some lines look incorrect:
First: Should it be self.number_isolated_tiles ^= (1 << k)
?
Second and Third: Should they be self._run(depth)
?
I tried to fix them as above and they passed your unit tests as well. However, I haven't find any negative case that make only original code fail.
So, what do you think about above changes?
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\logging\__init__.py", line 994, in emit
stream.write(msg)
UnicodeEncodeError: 'cp949' codec can't encode character '\u5c2d' in position 42: illegal multibyte sequence
Call stack:
File "main.py", line 70, in <module>
main()
File "main.py", line 66, in main
connect_and_play()
File "D:\tenhou-python-bot\project\tenhou\main.py", line 21, in connect_and_play
client.start_game()
File "D:\tenhou-python-bot\project\tenhou\client.py", line 427, in start_game
logger.info('Final results: {}'.format(self.table.get_players_sorted_by_scores()))
Message: 'Final results: [尭 (51,600) 61.0, Sith (20,300), tn0975 (14,600) -25.0, Bot (13,500) -36.0]'
Arguments: ()
AI didn't stop and just keep playing. It prints errors when it needs to print japanese nickname.
Python 3.6.5 (AMD64)
v0.3.2 (bb53372a)
PS D:\> chcp
Activated Code Page: 949
PS. I'm assuming that this is a problem of python logging
module. However, I cannot reproduce this error when I use python logger. The closest error message I could get was this.
>>> x = chr(9999) # Which are cannot be encoded with CP949 (EUC-KR)
>>> x
'✏'
>>> x.encode('cp949')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'cp949' codec can't encode character '\u270f' in position 0: illegal multibyte sequence
We can't do "swap calling", so bot not should to open hand if he had to discard same tile from the hand.
Добавить новый метод process_closed_hand_discards
в стратегию.
Для таньяо там будет логика предпочтения центральных, при 5% укеире2.
Для остальных стратегий метод будет пустым.
До тех пор, пока не можем считать "число шантен на таняо", предлагаю руководствоваться такой логикой:
Правила early-return
, когда даже не будем смотреть дальше:
Теперь правила, когда надо открываться, если через все предыдушие проверки мы прошли:
4. Если в руке больше 2 центральных дор.
5. Если в руке 2 центральные доры и ход > 6.
http://tenhou.net/3/?log=2018082423gm-0009-7994-bbcbda4a&tw=3&ts=6
1S1, игрок D. Второй ход.
По непонятной причине кидает дору 1п вместо 1 со или 5 ман.
For example for riichi we have a choice what to discard: 1 or 4. If we will discard 1 we will get tanyao, in that case bot should discard 1 to get more han.
Theoretically it should significantly increase average place.
I think for the first version beatori will be enough. So, when bot in the defence mode it will fold 100% safe and suji tiles.
To be able debug local games with tenhou log viewer
Если есть возможность взять чи или пон несколькими способами, то:
Сортируем все варианты по укеире, берем самый выгодный. При этом учитываем, что нам после объявления не придется кидать дору.
We had to minus already discarded tiles from "tiles_count" to build more effective waiting
Something like:
And etc.
For example we have a form 4-7, it is can be more profitable to wait a couple of draws to improve it before calling riichi
It should be the runner that will run 4 copy of our bots and will play a lot of hanchans.
We need it to test our improvements in bot strategy.
So, for example we have version 0.0.1 of our bot logic and we did some improvements in our code, for example our bot can build hand more effective now. We will load three copy of bot with v.0.0.1 and one copy with new logic. Runner will play a lot of hanchans (for example 1000), and calculate what is winning rate of new bot version.
Currently bot can discard completed set of tiles (for example it discarded pon of dragons).
We need to improve the situation with hand building.
Based on current bot level it should select correct lobby to play (kyu, first dan, second dan).
Thanks.
Allow to easily integrate new AI (from other developers) to the project. Need to think about some kind of plugins system
2017-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
For now we are not working with this information. It will help to build defence logic
Hi Nihisil,
thank you so much for developing this repo, when I used it to play an online match(with my little dumb AI), it seems encountered a bug described in the title, here are some logs:
2017-01-17 16:50:33 DEBUG: Send: <Z />
2017-01-17 16:50:33 DEBUG: Send: <NEXTREADY />
2017-01-17 16:50:35 DEBUG: Get: <INIT seed="3,0,0,2,5,82" ten="350,158,334,158" oya="1" hai="119,77,68,116,4,37,71,74,73,90,64,66,132"/> <U/>
2017-01-17 16:50:35 INFO: Round: 3, Honba: 0, Dora Indicators: [82]
2017-01-17 16:50:35 INFO: Players: [NoName (35,000), 上野あいみ (33,400), no_D (15,800), 紅稀 (15,800)]
2017-01-17 16:50:35 INFO: Dealer: no_D (15,800)
2017-01-17 16:50:35 INFO: Round wind: East
2017-01-17 16:50:35 INFO: Player wind: North
2017-01-17 16:50:41 DEBUG: Get: <E114/>
2017-01-17 16:50:42 DEBUG: Get: <N who="2" m="44139" />
2017-01-17 16:50:42 INFO: Meld: pon, who 2
2017-01-17 16:50:44 DEBUG: Get: <F3/> <W/>
2017-01-17 16:50:46 DEBUG: Get: <G121/> <T54/>
2017-01-17 16:50:47 INFO: Hand: 2m158899p1125s337z
2017-01-17 16:50:47 DEBUG: Send: <D p="132"/>
2017-01-17 16:50:47 INFO: Remaining tiles: 67
2017-01-17 16:50:48 DEBUG: Send: <Z />
2017-01-17 16:50:48 DEBUG: Get: <D132/> <U/>
2017-01-17 16:50:49 DEBUG: Get: <E123/> <V/>
2017-01-17 16:50:53 DEBUG: Get: <F60/>
2017-01-17 16:50:58 DEBUG: Get: <W/>
2017-01-17 16:50:59 DEBUG: Get: <G124/> <T63/>
2017-01-17 16:51:00 INFO: Hand: 2m1578899p1125s33z
2017-01-17 16:51:00 DEBUG: Send: <D p="37"/>
2017-01-17 16:51:00 INFO: Remaining tiles: 63
2017-01-17 16:51:01 DEBUG: Get: <D37/> <U/>
2017-01-17 16:51:02 DEBUG: Get: <E34/> <V/>
2017-01-17 16:51:03 DEBUG: Send: <Z />
2017-01-17 16:51:03 DEBUG: Get: <F135/> <W/>
2017-01-17 16:51:08 DEBUG: Get: <G133/> <T81/>
2017-01-17 16:51:09 INFO: Hand: 2m578899p11235s33z
2017-01-17 16:51:09 DEBUG: Send: <D p="4"/>
2017-01-17 16:51:09 INFO: Remaining tiles: 59
2017-01-17 16:51:10 DEBUG: Get: <D4/>
2017-01-17 16:51:11 DEBUG: Get: <U/>
2017-01-17 16:51:12 DEBUG: Get: <E32/> <V/>
2017-01-17 16:51:13 DEBUG: Get: <F127/> <W/>
2017-01-17 16:51:16 DEBUG: Get: <G107/> <T16/>
2017-01-17 16:51:17 INFO: Hand: 5m578899p11235s33z
2017-01-17 16:51:17 DEBUG: Send: <D p="16"/>
2017-01-17 16:51:17 INFO: Remaining tiles: 55
2017-01-17 16:51:18 DEBUG: Send: <Z />
2017-01-17 16:51:18 DEBUG: Get: <D16/> <U/>
2017-01-17 16:51:20 DEBUG: Get: <E98/> <V/>
2017-01-17 16:51:22 DEBUG: Get: <F101/>
2017-01-17 16:51:23 DEBUG: Get: <W/>
2017-01-17 16:51:24 DEBUG: Get: <G36/> <T91/>
2017-01-17 16:51:25 INFO: Hand: 578899p112355s33z
2017-01-17 16:51:25 DEBUG: Send: <D p="54"/>
2017-01-17 16:51:25 INFO: Remaining tiles: 51
2017-01-17 16:51:26 DEBUG: Get: <D54/> <U/>
2017-01-17 16:51:27 DEBUG: Get: <E131/> <V/>
2017-01-17 16:51:31 DEBUG: Get: <F27/>
2017-01-17 16:51:33 DEBUG: Send: <Z />
2017-01-17 16:51:33 DEBUG: Get: <W/>
2017-01-17 16:51:34 DEBUG: Get: <g118 t="1"/>
2017-01-17 16:51:35 DEBUG: Send: <N />
2017-01-17 16:51:36 DEBUG: Get: <T31/>
2017-01-17 16:51:37 INFO: Hand: 8m78899p112355s33z
2017-01-17 16:51:37 DEBUG: Send: <D p="31"/>
2017-01-17 16:51:37 INFO: Remaining tiles: 47
2017-01-17 16:51:38 DEBUG: Get: <D31/> <U/>
2017-01-17 16:51:39 DEBUG: Get: <E106/> <V/>
2017-01-17 16:51:41 DEBUG: Get: <F129/> <W/>
2017-01-17 16:51:44 DEBUG: Get: <g130/> <T41/>
2017-01-17 16:51:45 INFO: Hand: 278899p112355s33z
2017-01-17 16:51:45 DEBUG: Send: <D p="41"/>
2017-01-17 16:51:45 INFO: Remaining tiles: 43
2017-01-17 16:51:46 DEBUG: Get: <D41/> <U/>
2017-01-17 16:51:48 DEBUG: Send: <Z />
2017-01-17 16:51:48 DEBUG: Get: <E0/> <V/>
2017-01-17 16:51:50 DEBUG: Get: <F83/> <W/>
2017-01-17 16:51:52 DEBUG: Get: <g109/> <T65/>
2017-01-17 16:51:53 INFO: Hand: 788899p112355s33z
2017-01-17 16:51:53 DEBUG: Send: <D p="63"/>
2017-01-17 16:51:53 INFO: Remaining tiles: 39
2017-01-17 16:51:54 DEBUG: Get: <D63/>
2017-01-17 16:51:58 DEBUG: Get: <U/>
2017-01-17 16:51:59 DEBUG: Get: <e1/> <V/>
2017-01-17 16:52:00 DEBUG: Get: <f35/>
2017-01-17 16:52:03 DEBUG: Send: <Z />
2017-01-17 16:52:03 DEBUG: Get: <W/>
2017-01-17 16:52:04 DEBUG: Get: <g96/> <T89 t="32"/>
2017-01-17 16:52:05 INFO: Hand: 88899p1123555s33z
2017-01-17 16:52:05 DEBUG: Send: <REACH hai="64" />
2017-01-17 16:52:07 DEBUG: Send: <D p="64"/>
2017-01-17 16:52:07 INFO: Remaining tiles: 35
2017-01-17 16:52:08 DEBUG: Get: <REACH who="0" step="1"/>
2017-01-17 16:52:09 DEBUG: Get:
2017-01-17 16:52:10 DEBUG: Get:
2017-01-17 16:52:11 DEBUG: Get:
2017-01-17 16:52:12 DEBUG: Get:
2017-01-17 16:52:13 DEBUG: Get:
2017-01-17 16:52:14 DEBUG: Get:
2017-01-17 16:52:15 DEBUG: Get:
2017-01-17 16:52:16 DEBUG: Get:
2017-01-17 16:52:17 DEBUG: Get:
2017-01-17 16:52:18 DEBUG: Send: <Z />
2017-01-17 16:52:18 DEBUG: Get:
2017-01-17 16:52:19 DEBUG: Get:
2017-01-17 16:52:20 DEBUG: Get:
2017-01-17 16:52:21 DEBUG: Get:
2017-01-17 16:52:22 DEBUG: Get:
2017-01-17 16:52:23 DEBUG: Get:
2017-01-17 16:52:24 DEBUG: Get:
2017-01-17 16:52:25 DEBUG: Get:
2017-01-17 16:52:26 DEBUG: Get:
2017-01-17 16:52:27 DEBUG: Get:
2017-01-17 16:52:28 DEBUG: Get:
2017-01-17 16:52:29 DEBUG: Get:
2017-01-17 16:52:30 DEBUG: Get:
2017-01-17 16:52:31 DEBUG: Get:
2017-01-17 16:52:32 DEBUG: Get:
2017-01-17 16:52:33 DEBUG: Send: <Z />
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/usr/lib/python3.4/threading.py", line 868, in run
self._target(*self._args, **self._kwargs)
File "/home/hao/mahjong/tenhou-python-bot/project/tenhou/client.py", line 304, in send_request
self._send_message('<Z />')
File "/home/hao/mahjong/tenhou-python-bot/project/tenhou/client.py", line 280, in _send_message
self.socket.sendall(message.encode())
BrokenPipeError: [Errno 32] Broken pipe
2017-01-17 16:52:33 DEBUG: Get:
2017-01-17 16:52:34 DEBUG: Get:
2017-01-17 16:52:35 DEBUG: Get:
2017-01-17 16:52:36 DEBUG: Get:
2017-01-17 16:52:37 DEBUG: Get:
2017-01-17 16:52:38 DEBUG: Get:
2017-01-17 16:52:39 DEBUG: Get:
2017-01-17 16:52:40 DEBUG: Get:
2017-01-17 16:52:41 DEBUG: Get:
2017-01-17 16:52:42 DEBUG: Get:
2017-01-17 16:52:43 DEBUG: Get:
2017-01-17 16:52:44 DEBUG: Get:
2017-01-17 16:52:45 DEBUG: Get:
2017-01-17 16:52:46 DEBUG: Get:
2017-01-17 16:52:47 DEBUG: Get:
2017-01-17 16:52:48 DEBUG: Get:
2017-01-17 16:52:49 DEBUG: Get:
2017-01-17 16:52:50 DEBUG: Get:
2017-01-17 16:52:51 DEBUG: Get:
2017-01-17 16:52:52 DEBUG: Get:
2017-01-17 16:52:53 DEBUG: Get:
2017-01-17 16:52:54 DEBUG: Get:
2017-01-17 16:52:55 DEBUG: Get:
2017-01-17 16:52:56 DEBUG: Get:
2017-01-17 16:52:57 DEBUG: Get:
2017-01-17 16:52:58 DEBUG: Get:
2017-01-17 16:52:59 DEBUG: Get:
2017-01-17 16:53:00 DEBUG: Get:
2017-01-17 16:53:01 DEBUG: Get:
2017-01-17 16:53:02 DEBUG: Get:
2017-01-17 16:53:03 DEBUG: Get:
2017-01-17 16:53:04 DEBUG: Get:
2017-01-17 16:53:05 DEBUG: Get:
2017-01-17 16:53:06 DEBUG: Get:
2017-01-17 16:53:07 DEBUG: Get:
2017-01-17 16:53:08 DEBUG: Get:
2017-01-17 16:53:09 DEBUG: Get:
2017-01-17 16:53:10 DEBUG: Get:
2017-01-17 16:53:11 DEBUG: Get:
2017-01-17 16:53:12 DEBUG: Get:
2017-01-17 16:53:13 DEBUG: Get:
2017-01-17 16:53:14 DEBUG: Get:
2017-01-17 16:53:15 DEBUG: Get:
2017-01-17 16:53:16 DEBUG: Get:
2017-01-17 16:53:17 DEBUG: Get:
2017-01-17 16:53:18 DEBUG: Get:
2017-01-17 16:53:19 DEBUG: Get:
2017-01-17 16:53:20 DEBUG: Get:
2017-01-17 16:53:21 DEBUG: Get:
2017-01-17 16:53:22 DEBUG: Get:
2017-01-17 16:53:23 DEBUG: Get:
2017-01-17 16:53:24 DEBUG: Get:
2017-01-17 16:53:25 DEBUG: Get:
2017-01-17 16:53:26 DEBUG: Get:
2017-01-17 16:53:27 DEBUG: Get:
2017-01-17 16:53:28 DEBUG: Get:
2017-01-17 16:53:29 DEBUG: Get:
2017-01-17 16:53:30 DEBUG: Get:
2017-01-17 16:53:31 DEBUG: Get:
2017-01-17 16:53:32 DEBUG: Get:
2017-01-17 16:53:33 DEBUG: Get:
2017-01-17 16:53:34 DEBUG: Get:
2017-01-17 16:53:35 DEBUG: Get:
2017-01-17 16:53:36 DEBUG: Get:
2017-01-17 16:53:37 DEBUG: Get:
2017-01-17 16:53:38 DEBUG: Get:
2017-01-17 16:53:39 DEBUG: Get:
2017-01-17 16:53:40 DEBUG: Get:
2017-01-17 16:53:41 DEBUG: Get:
2017-01-17 16:53:42 DEBUG: Get:
2017-01-17 16:53:43 DEBUG: Get:
2017-01-17 16:53:44 DEBUG: Get:
2017-01-17 16:53:45 DEBUG: Get:
2017-06-22 17:20:01 INFO: Round: 3, Honba: 1, Dora Indicators: [73]
2017-06-22 17:20:01 INFO: Players: [isi1017 (61,400), 辺銀堂 (25,500), ToukaBot (13,100), にこぷり麻雀道. (2級)]
2017-06-22 17:20:01 INFO: Dealer: 辺銀堂 (25,500)
2017-06-22 17:20:01 INFO: Round wind: East
2017-06-22 17:20:01 INFO: Player wind: West
Here is the link of full log file.
https://app.box.com/s/futa0t1619l1g848trmeihzq8as0lv20
Sometimes bot can discard 9 from already read tanyao-like hand, even if it will ruin the tempai
Lets assume bot has already 1s
and draws 1s
.
If bot wants to discard 1s
, current version (0.2.7
) discards 1s
in its hand.
In my opinion, it should tsumogiri if it could, because it gives less information to other players.
p.s. It should check akadora, because it is different pai. (e.g. 5p
vs 0p
)
2017-06-22 13:45:12 INFO: Meld: Type: pon, Tiles: 555s [88, 90, 91] by 0
2017-06-22 13:45:12 INFO: With hand: 34m455666p + 5s [345m, 555s]
2017-06-22 13:45:12 INFO: Discard tile after called meld: 4p
2017-06-22 13:45:12 DEBUG: Send: <D p="48"/>
2017-06-22 13:45:13 DEBUG: Get: <D48/> <U/>
2017-06-22 13:45:16 DEBUG: Get: <e47/> <V/>
2017-06-22 13:45:20 DEBUG: Send: <Z />
2017-06-22 13:45:21 DEBUG: Get: <f59 t="3"/>
2017-06-22 13:45:21 DEBUG: Send: <N type="2" />
2017-06-22 13:45:21 INFO: We called a kan set!
2017-06-22 13:45:22 DEBUG: Get: <N who="0" m="15106" /> <T45/>
2017-06-22 13:45:22 ERROR: Unexpected exception
Traceback (most recent call last):
File "/_github/tenhou-python-bot-0.2.6/project/tenhou/main.py", line 21, in connect_and_play
client.start_game()
File "/_github/tenhou-python-bot-0.2.6/project/tenhou/client.py", line 316, in start_game
self.table.add_called_meld(meld.who, meld)
File "/_github/tenhou-python-bot-0.2.6/project/mahjong/table.py", line 75, in add_called_meld
self.get_player(player_seat).add_called_meld(meld)
File "/_github/tenhou-python-bot-0.2.6/project/mahjong/player.py", line 214, in add_called_meld
self.tiles.remove(meld.called_tile)
ValueError: list.remove(x): x not in list
2017-06-22 13:45:22 INFO: Ending the game...
2017-06-22 13:45:22 ERROR: Game was ended without success
Here is the log.
To decrease memory usage and improve the speed
Based on the Table object, can we do the score calculation ourselves?
There are two bugs.
Game log to reproduce: bad_kan.log
Продумать решение о пропуске первого тайла в якухай
Проверять стоит ли активировать стратегию (формальный темпай, якухай и т.п.) после броска каждого соперника.
Тут ещё нужно проверить насколько адекватно бот проставляет шантены и укеире в момент активации стратегии, возможно это нужно будет тоже поменять.
When we close a bot with ctrl + c it will rise KeyboardInterrupt exception
For example not valuable winds should be discarded earlier than terminal or valuable winds.
Also, dora should be more valuable than usual tile.
When bot calls others tile, its logs gets weird.
Here is the screenshot of this problem. http://imgur.com/roEDAfv
From http://arcturus.su/wiki/Tenhou.net_rules
At the end of the game, if there is a tie, the tie is broken in favor of the person having the earlier dealership.
「終了時に同点の場合は東1局の風順で順位を決定」
It means that if you are oya in 東1 (East 1), you will always win when score is tie. (東>南>西>北)
Bot logs scores when each round is started, such as [A (30,300), B (24,900), C (22,900), D (21,900)]
. It sorts players by scores. But when score is even (eg. 東1), it sorts players by player numbers. (0-3)
For consistency, it should sort players as,
In Tenhou client, if the overhead of AI takes approximately longer than 3s, then it'll show some socket timeout messages, the fix should be trivial.
Many thanks.
Edit:
Sample output:
2017-03-06 11:19:40 INFO: Bot AI enabled: True
2017-03-06 11:19:52 DEBUG: Send: <HELO name="NoName" tid="f0" sx="M" />
2017-03-06 11:19:52 DEBUG: Get:
2017-03-06 11:19:52 DEBUG: Send: <BYE />
2017-03-06 11:19:52 INFO: End of the game
Maybe it make sense to set game mode (hanchan, tonpusen, hirosima and etc.) attribute for main.py script.
It will be helpful to debug bot AI locally, without tenhounet
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.