Search code examples
artificial-intelligence

Making Alphago myself is possible?


For studying AI in python(Image recognition) I want to test and develop my AI model like Alphago(doing go AI) with shared source(maybe python) Also I searched some DQN(Deep Q Network) source but these source code dose not run windows well and very hard to visualize as studying purpose. I searched some books, but there are almost no books for studying alphago or DQN(with shared source, self testable)

Any there are some materials for AI beginner? (Windows is my preferred environments) (And stack overflow is adaptable website for questing AI?)


Solution

  • AlphaGo Zero has an elegantly simple architecture that makes it simpler than one expects to reimplement yourself.

    It has 2 important parts, the Monte Carlo tree search(MCTS) and the neural network.

    Because the same architecture would work for different board games. I would suggest starting with a simpler game to implement than Go, like Checkers or Gomoku, so you can see the improvement quicker and you can spend more time implementing the AI instead of the game.

    I would recommend implementing it in this order:

    1. The game itself

    You will need the part where you check for game termination, visualizing the game state, etc.

    1. MCTS

    You can follow this implementation or these slides on MCTS, reimplementing it from pseudocode is better for learning, but there's nothing wrong with just copying the ones online.

    At this point, you will already have an AI that can play a simple game, and you can play with it or have it self-play to confirm it is working.

    1. The neural network

    If you want to run it on your computer you will need to install TensorFlow and Keras or other neural network libraries on your Windows environment, which might be the hardest part of this whole thing if you don't have the right hardware and software. If that doesn't work you can use an online service like Kaggle.com.

    If you are familiar with a high-level neural network library like Keras, this part is not too hard, this is a great course to learn the basics. The AlphaGo paper has all the details on the net and how to connect it to the MCTS.

    And that's it! Good luck!