I made an AI for Reversi, aka Othello (8×8), like Alpha Zero, using this book. This book is written in Japanese. The source code of the AI I implemented can be found in this Github repository. There are comments written in Japanese, but there are also comments written in English. Check the master branch's README file and source code on GitHub for more details.

I finished writing the code and I trained the model on Google Colab with a GPU. I stopped learning around the 3rd training cycle because it is very slow. I tried to rewrite to bitboard, but, it also very slow. So, how can I make my implementation faster or, in general, how can I improve my implementation, given that I have a limited amount or resources (including computing resources and money)?

Here are some ideas.

  • Reduce the number of hidden layers (it can be weak)
  • Rewrite the source code with Cython (it also run on Google Colab).
  • Rewrite the source code in C++, and run on my PC with GPU.
  • Increase the learning rate (it can do over-fitting)
  • $\begingroup$ What do you mean by "bitboard"? Anyway, I think that this question may be off-topic here. Have a look at ai.stackexchange.com/help/on-topic, which tells you which questions are on-topic here. Try asking this question on Data Science SE. $\endgroup$ – nbro Nov 13 '19 at 22:40
  • $\begingroup$ C++ may not be enough. To radically increase speed you may want to use CUDA. However only bitboard in CUDA would be inefficient due to long transfer time RAM<->GPU. Whole MCTS stack in CUDA would be efficient and fast, but that is highly nontrivial project (there were some MCTS implementation in CUDA). Also, there are some tutorials how to run your own c++/cuda code on colab (never tried it) $\endgroup$ – mirror2image Nov 14 '19 at 10:29
  • 1
    $\begingroup$ I'm sorry. I should have asked there. Thank you for pointing out. I posted here. So, Please check and answer if you can. By the way, bitboard expresses reversi board with bits. In this case, I'm using two variables that is hexadecimal of 8 bits. $\endgroup$ – TKTK-ST Nov 14 '19 at 11:31
  • $\begingroup$ >mirror2image I see. I found a article that explain how to run CUDA in Colab. I didn't know that. Thanks! I want to research more and try. $\endgroup$ – TKTK-ST Nov 14 '19 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.