Skip to content

3031 source-verified AI-built games from 2724 repos, attributed to GPT-6 Astra, GPT-6.1 Sol, Gemini 4 Argon, Claude Opus, Claude Sonnet and Claude Fable

4.0 KB
Raw Blame
{
  "repo": "fidgetrope/chess-ai",
  "created_at": "2026-10-04T11:31:27Z",
  "pushed_at": "2026-10-04T11:31:34Z",
  "description": "3D chess against the computer (no online play) — vs AI version",
  "homepage": null,
  "default_branch": "main",
  "language": "TypeScript",
  "readme": "# Chess vs AI (3D Chess, computer opponent only)\n\nA browser-based chess game with a 3D perspective board and an AI opponent with selectable difficulty levels.\n\n## Features\n\n- Full chess rules via [chess.js](https://github.com/jhlywa/chess.js) — castling (with correct loss of rights), en passant, promotion with an under-promotion picker, check / checkmate / stalemate, threefold repetition, the fifty-move rule, and insufficient-material draws\n- AI opponent with three difficulty levels:\n  - **Easy** — depth-2 alpha-beta search, plays a visible blunder about a third of the time\n  - **Medium** — depth-3 alpha-beta search\n  - **Hard** — iterative deepening within a ~2-second time budget, so it stays responsive on any machine\n  - All three use material + piece-square-table evaluation and run in a Web Worker, off the main thread\n- Two board views, toggled from the HUD and remembered between sessions:\n  - **3D** — Three.js, turned (lathe) piece geometry for a Staunton-style set in ivory and walnut (the bishop's mitre slit is a real boolean cut via `three-bvh-csg`), a cosy study backdrop, orbit/zoom controls, and move / capture / castling / promotion animations\n  - **2D** — a flat top-down board in the BBC \"Master Game\" style: lavender squares, Unicode Staunton glyphs, coordinate labels\n- Minimal HUD that keeps the board clear: a turn pill and a compact captured-piece strip, with move history (SAN) and difficulty / restart tucked behind the \"Moves\" and ⚙ buttons; plus check banner and undo\n- Continuous play — the in-progress game is saved to the browser's local storage after every move, so closing the tab and coming back later resumes the exact position\n\n## Tech stack\n\n- [TypeScript](https://www.typescriptlang.org/)\n- [Vite](https://vite.dev/) — dev server and build tool\n- [Three.js](https://threejs.org/) — 3D rendering\n- [chess.js](https://github.com/jhlywa/chess.js) — rules engine (BSD 2-Clause)\n- [Vitest](https://vitest.dev/) — unit tests for the rules wrapper and AI\n\nNo backend — it's a fully static, client-side app.\n\n## Running locally\n\nRequires [Node.js](https://nodejs.org/) (LTS).\n\n```bash\nnpm install\nnpm run dev\n```\n\nThen open the printed `http://localhost:5173` link in your browser.\n\n## Other commands\n\n```bash\nnpm run test        # run the unit test suite (Vitest)\nnpm run typecheck   # type-check without emitting\nnpm run build       # production build -> dist/\nnpm run preview     # preview the production build locally\n```\n\n## Project structure\n\n```\nsrc/\n  core/        chess.js wrapper + localStorage persistence: game state, moves, check/mate/draw detection\n  ai/          minimax + alpha-beta, evaluation, difficulty presets, Web Worker entry point\n  render/      Three.js scene, board/piece meshes (lathe profiles + knight), picking, highlights, animation\n  ui/          plain HTML/CSS overlay (difficulty select, move list, captured tray, promotion picker, banners)\n  controller/  wires core + ai + render + ui together\ntests/         Vitest unit tests (rules wrapper, AI move legality, mate-in-1, evaluation)\n```\n\n## Deployment\n\nHosted on **GitHub Pages** at https://fidgetrope.github.io/chess-ai/ . The\n[`Deploy to GitHub Pages`](.github/workflows/deploy.yml) workflow runs on every push to `main`: it runs the\ntest suite, builds with Vite, and publishes `dist/`. `vite.config.ts` sets `base: '/chess-ai/'` so asset URLs\nresolve under the project-pages path.\n\nTo update: commit and `git push` — the workflow redeploys automatically.\n\n## Licensing\n\nPieces and board are built from code, so there is no piece-art attribution to track. chess.js is BSD 2-Clause —\nits copyright notice stays in `node_modules`; no other obligation.",
  "commits": []
}