{"id":16165999,"url":"https://github.com/zjeffer/connect4-deep-rl","last_synced_at":"2026-04-17T17:31:02.299Z","repository":{"id":53863092,"uuid":"521731591","full_name":"zjeffer/connect4-deep-rl","owner":"zjeffer","description":"Deep reinforcement learning algorithm to solve Connect 4, based on AlphaZero","archived":false,"fork":false,"pushed_at":"2024-06-29T11:11:17.000Z","size":992,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-12T14:55:20.732Z","etag":null,"topics":["ai","alphazero","deep-learning","machine-learning","reinforcement-learning"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zjeffer.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-05T17:57:19.000Z","updated_at":"2025-05-05T12:56:31.000Z","dependencies_parsed_at":"2024-11-02T10:40:40.446Z","dependency_job_id":"9be910f8-b7c1-486e-aa0a-85cb3eb1b916","html_url":"https://github.com/zjeffer/connect4-deep-rl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zjeffer/connect4-deep-rl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjeffer%2Fconnect4-deep-rl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjeffer%2Fconnect4-deep-rl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjeffer%2Fconnect4-deep-rl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjeffer%2Fconnect4-deep-rl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zjeffer","download_url":"https://codeload.github.com/zjeffer/connect4-deep-rl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjeffer%2Fconnect4-deep-rl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31938578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ai","alphazero","deep-learning","machine-learning","reinforcement-learning"],"created_at":"2024-10-10T02:52:56.565Z","updated_at":"2026-04-17T17:31:02.232Z","avatar_url":"https://github.com/zjeffer.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AlphaZero on a Connect 4 environment\n\nA deep reinforcement learning algorithm that plays Connect 4, based on AlphaZero. I'm creating this because [my chess algorithm](https://github.com/zjeffer/chess-deep-rl-cpp) learns too slowly, and I wanted to know if the problem is the amount of data needed, or my implementation of the algorithm itself.\n\nSee https://zjeffer.github.io/connect4-deep-rl/ for Doxygen documentation.\n\n## TODO\n\n* [X] Connect 4 environment\n* [X] MCTS algorithm\n* [X] Neural network\n* [X] AlphaZero self-play\n* [X] Argument parsing\n* [ ] Load settings from file\n* [X] Unit tests:\n  * [X] Horizontal win\n  * [X] Vertical win\n  * [X] Diagonal win\n  * [X] Easy puzzle\n  * [ ] Harder puzzle\n  * [ ] ...?\n* [X] Save played moves to memory, and memory to file\n* [X] AlphaZero training\n* [ ] AlphaZero evaluation\n* [ ] Automatic pipeline for selfplay, training and evaluation\n* [ ] Play against computer\n* [ ] GUI?\n\n\n[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fzjeffer%2Fconnect4-deep-rl\u0026count_bg=%235E81AC\u0026title_bg=%23555555\u0026icon=\u0026icon_color=%235E81AC\u0026title=hits\u0026edge_flat=false)](https://hits.seeyoufarm.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzjeffer%2Fconnect4-deep-rl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzjeffer%2Fconnect4-deep-rl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzjeffer%2Fconnect4-deep-rl/lists"}