{"id":50844616,"url":"https://github.com/wtbates99/openboard","last_synced_at":"2026-06-14T08:34:03.362Z","repository":{"id":354070379,"uuid":"1221963009","full_name":"wtbates99/openboard","owner":"wtbates99","description":"Computer vision tools for detecting a physical chess board, warping it top-down, and reporting occupied squares from webcam frames.","archived":false,"fork":false,"pushed_at":"2026-05-02T18:00:29.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T08:34:03.185Z","etag":null,"topics":["chess","computer-vision","opencv","python","webcam"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wtbates99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-26T22:40:05.000Z","updated_at":"2026-05-02T18:00:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/wtbates99/openboard","commit_stats":null,"previous_names":["wtbates99/openboard"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wtbates99/openboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtbates99%2Fopenboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtbates99%2Fopenboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtbates99%2Fopenboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtbates99%2Fopenboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wtbates99","download_url":"https://codeload.github.com/wtbates99/openboard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtbates99%2Fopenboard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34315073,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["chess","computer-vision","opencv","python","webcam"],"created_at":"2026-06-14T08:34:03.288Z","updated_at":"2026-06-14T08:34:03.353Z","avatar_url":"https://github.com/wtbates99.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenBoard\n\nAn open-source chess engine trained on GM games with AlphaZero-style self-play, built to run on Apple Silicon.\n\n## How it works\n\n- **Neural network** — 6-block ResNet with a policy head (4096 move logits) and value head (position evaluation), implemented in MLX\n- **Training** — supervised pretraining on GM games fetched from Lichess, followed by a self-play loop where the engine generates its own training data\n- **Search** — Monte Carlo Tree Search (MCTS) guided by the network's policy and value outputs\n- **Hardware** — optimized for Apple Silicon via MLX; runs on CPU elsewhere\n\n## Install\n\n```bash\nuv sync\n```\n\n## Fetch training games\n\n```bash\nuv run python main.py\n```\n\nFetches 1000 blitz/rapid games from each of several GM Lichess accounts and saves them to `games.pgn`.\n\n## Train\n\n```bash\nuv run python train.py\n```\n\nSupervised pretraining on the PGN data. Runs 20 epochs and saves weights to `model.safetensors`.\n\n## Self-play loop\n\n```bash\nuv run python selfplay.py\n```\n\nRuns 10 iterations of: generate 50 self-play games → retrain on GM + self-play data → repeat. Each iteration the model improves its own training distribution.\n\n## Play against the engine\n\n```bash\nuv run python play.py white 200\n```\n\nSecond argument is your color (`white` or `black`), third is engine simulations per move (higher = stronger, slower).\n\nEnter moves in standard notation (`e4`, `Nf3`, `O-O`) or from-to squares (`e2e4`, `g1f3`). Commands: `undo`, `flip`, `quit`.\n\n```\n 8 r n b q k b n r\n 7 p p p p p p p p\n 6 . . . . . . . .\n 5 . . . . . . . .\n 4 . . . . . . . .\n 3 . . . . . . . .\n 2 P P P P P P P P\n 1 R N B Q K B N R\n  a b c d e f g h\n```\n\n## Files\n\n| File | Purpose |\n|------|---------|\n| `main.py` | Fetch games from Lichess GM accounts |\n| `data.py` | Parse PGN into training tensors |\n| `model.py` | ResNet policy+value network |\n| `train.py` | Supervised training loop |\n| `mcts.py` | Monte Carlo Tree Search |\n| `selfplay.py` | Self-play training loop |\n| `play.py` | Terminal UI to play against the engine |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtbates99%2Fopenboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwtbates99%2Fopenboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtbates99%2Fopenboard/lists"}