Closed CharlesLiuyx closed 5 years ago
Env bugs solved
When I try to use python cchess_alphazero/run.py self --ucci
, I got error following:
2018-11-03 13:21:48.626280: I tensorflow/core/common_runtime/gpu/gpu_device.cc:976] DMA: 0
2018-11-03 13:21:48.626285: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 0: Y
2018-11-03 13:21:48.626291: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080, pci bus id: 0000:01:00.0)
2018-11-03 13:21:48,627@cchess_alphazero.agent.model DEBUG # loading model from /media/yaoxingliu/Project/DeepLearning/ChineseChess-AlphaZero/data/model/model_best_config.json
2018-11-03 13:21:49,913@cchess_alphazero.agent.model DEBUG # loaded model digest = b14704b8970f4b178deb5cac44d7ca16c75f2dbb267d88b856a8d22d7c9fc96b
2018-11-03 13:21:49,927@cchess_alphazero.worker.play_with_ucci_engine DEBUG # Initialize selfplay worker
2018-11-03 13:21:49,935@cchess_alphazero.worker.play_with_ucci_engine DEBUG # Selfplay#Start Process index = 0, pid = 11499
2018-11-03 13:21:49,957@cchess_alphazero.agent.api ERROR # EOF error:
Exception in thread prediction_worker:
Traceback (most recent call last):
File "/home/yaoxingliu/.conda/envs/CCZero/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/yaoxingliu/.conda/envs/CCZero/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/media/yaoxingliu/Project/DeepLearning/ChineseChess-AlphaZero/cchess_alphazero/agent/api.py", line 50, in predict_batch_worker
while pipe.poll():
File "/home/yaoxingliu/.conda/envs/CCZero/lib/python3.6/multiprocessing/connection.py", line 255, in poll
self._check_closed()
File "/home/yaoxingliu/.conda/envs/CCZero/lib/python3.6/multiprocessing/connection.py", line 136, in _check_closed
raise OSError("handle is closed")
OSError: handle is closed
Partial same with #21
If you want to play with it in UCI mode, please run python cchess_alphazero/uci.py
.
Or if you want to let it self-play, just run python cchess_alphazero/run.py self
.
Thanks for reply. I chekc whole file structure. Is there an api to watch GUI self play by AI? Or I need to generate the record first and run it with another tool?
Unfortunately, you need to generate the record first and watch it in other tools. However, the training records are not recorded in standard format (such as PGN
file), you should transfer it to standard format first. The good news is that the CChessEnv
class in environment/env.py
actually has the transfer functionality, and there is a script to invoke its api. Just put and run the script in the environment
folder (also copy lib/data_helper.py
into envrionment
).
Got it! Thanks for answer. Close this issue is fine
After install the requirements, I typed the
python cchess_alphazero/run.py play
I got this error raised