Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/novoselov-ab/ai-zero
Implementation of an AlphaGo Zero paper in one C++ header file without any dependencies
https://github.com/novoselov-ab/ai-zero
alphago alphago-zero convolutional-neural-networks cpp deep-learning deep-neural-networks machine-learning mcts mcts-implementations mnist-nn reinforcement-learning self-play
Last synced: 3 days ago
JSON representation
Implementation of an AlphaGo Zero paper in one C++ header file without any dependencies
- Host: GitHub
- URL: https://github.com/novoselov-ab/ai-zero
- Owner: novoselov-ab
- License: mit
- Created: 2017-11-27T12:46:29.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-18T14:11:48.000Z (over 6 years ago)
- Last Synced: 2023-12-04T20:29:15.067Z (11 months ago)
- Topics: alphago, alphago-zero, convolutional-neural-networks, cpp, deep-learning, deep-neural-networks, machine-learning, mcts, mcts-implementations, mnist-nn, reinforcement-learning, self-play
- Language: C++
- Homepage:
- Size: 11.5 MB
- Stars: 5
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AI-Zero
Implementation of an AlphaGo Zero paper in one C++ header file without any dependencies.
To achieve that [include/ai.h](include/ai.h) implements:
* Basic multilayer neural networks
* Multiple input and multiple output layers
* Convolution layers
* MSE and cross entropy loss
* Model serialization
* Extendable optimizer, currently: Adagrad, Adam, SGD
* Basic RL environment: game, player, replay buffer
* Monte Carlo Tree Tearch with policy NN
* Self-play, optimization, evaluation and validation workersThe idea is to have simple, minimal and easy to understand implementation. That means that performance was not a priority. Howeever the whole training process runs in parallel on 4 threads (4 workers) and optimizer also spawns some threads, it was easy to do that without sacrificing simplicity of the project.
Examples include (all single main.cpp files):
* Mnist CNN training
* Gradient checking
* Connect4 game RL training## Building
Run `premake.bat` to generate solutions.
It was tested only on windows. But since it's just 2 files of code for every example, it should work out of the box. There is no platform specific code.