{"id":19389497,"url":"https://github.com/novoselov-ab/ai-zero","last_synced_at":"2025-06-27T03:11:28.575Z","repository":{"id":210759819,"uuid":"112195390","full_name":"novoselov-ab/ai-zero","owner":"novoselov-ab","description":"Implementation of an AlphaGo Zero paper in one C++ header file without any dependencies","archived":false,"fork":false,"pushed_at":"2018-04-18T14:11:48.000Z","size":12072,"stargazers_count":5,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T00:38:00.720Z","etag":null,"topics":["alphago","alphago-zero","convolutional-neural-networks","cpp","deep-learning","deep-neural-networks","machine-learning","mcts","mcts-implementations","mnist-nn","reinforcement-learning","self-play"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/novoselov-ab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-11-27T12:46:29.000Z","updated_at":"2023-05-14T14:28:34.000Z","dependencies_parsed_at":"2023-12-04T20:39:31.639Z","dependency_job_id":null,"html_url":"https://github.com/novoselov-ab/ai-zero","commit_stats":null,"previous_names":["novoselov-ab/ai-zero"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/novoselov-ab/ai-zero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novoselov-ab%2Fai-zero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novoselov-ab%2Fai-zero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novoselov-ab%2Fai-zero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novoselov-ab%2Fai-zero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/novoselov-ab","download_url":"https://codeload.github.com/novoselov-ab/ai-zero/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novoselov-ab%2Fai-zero/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262181059,"owners_count":23271319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alphago","alphago-zero","convolutional-neural-networks","cpp","deep-learning","deep-neural-networks","machine-learning","mcts","mcts-implementations","mnist-nn","reinforcement-learning","self-play"],"created_at":"2024-11-10T10:16:25.038Z","updated_at":"2025-06-27T03:11:28.549Z","avatar_url":"https://github.com/novoselov-ab.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI-Zero\n\nImplementation of an AlphaGo Zero paper in one C++ header file without any dependencies.\n\nTo achieve that [include/ai.h](include/ai.h) implements:\n* Basic multilayer neural networks\n* Multiple input and multiple output layers\n* Convolution layers\n* MSE and cross entropy loss\n* Model serialization\n* Extendable optimizer, currently: Adagrad, Adam, SGD\n* Basic RL environment: game, player, replay buffer\n* Monte Carlo Tree Tearch with policy NN\n* Self-play, optimization, evaluation and validation workers\n\nThe 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.\n\nExamples include (all single main.cpp files):\n* Mnist CNN training\n* Gradient checking\n* Connect4 game RL training\n\n## Building\n\nRun `premake.bat` to generate solutions. \n\nIt 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.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovoselov-ab%2Fai-zero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnovoselov-ab%2Fai-zero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovoselov-ab%2Fai-zero/lists"}