asdfjkl / neural_network_chess

Free Book about Deep-Learning approaches for Chess (like AlphaZero, Leela Chess Zero and Stockfish NNUE)
287 stars 27 forks source link

'Board' object has no attribute 'outcome' #5

Closed barvinog closed 2 years ago

barvinog commented 2 years ago

I just executed python mcts.py and received an error message: 34 0 Traceback (most recent call last): File "mcts.py", line 134, in payout = simulate(node) File "mcts.py", line 63, in simulate while(board.outcome(claim_draw = True) == None): AttributeError: 'Board' object has no attribute 'outcome'

barvinog commented 2 years ago

Please help me run the script

asdfjkl commented 2 years ago

looks to me as if you are using a very old version of python-chess?

This was tested with python-chess 1.999. I am using python 3.8 and python chess was installed with pip install pychon-chess

barvinog commented 2 years ago

I'm also using 1.999 and still getting 'Board' object has no attribute 'outcome' error message

asdfjkl commented 2 years ago

There is apparently something wrong with your setup. This is working on a fresh Ubuntu 20.04:

git clone https://github.com/asdfjkl/neural_network_chess.git cd neural_network_chess cd chapter_03 sudo apt install python3 pip3 install --user python-chess python3 mcts.py

asdfjkl commented 2 years ago

(I guess this can be closed)