JoshVarty / AlphaZeroSimple

The absolute most basic example of AlphaZero and Monte Carlo Tree Search I could come up with
MIT License
186 stars 33 forks source link

Changes required for execution on CPU (without CUDA) #10

Open shanemcandrewai opened 1 year ago

shanemcandrewai commented 1 year ago

Hi Josh,

In order to better understand the code, I tested it with plain pytorch without CUDA but it failed with AssertionError: Torch not compiled with CUDA enabled from File trainer.py, line 83, in train boards = boards.contiguous().cuda(). Is it sufficient to simply comment out the three lines with ending in .cuda() starting from boards = boards.contiguous().cuda()?