{"id":31358681,"url":"https://github.com/evaisse/the-great-analysis-challenge","last_synced_at":"2026-05-24T09:01:35.878Z","repository":{"id":313914670,"uuid":"1051350324","full_name":"evaisse/the-great-analysis-challenge","owner":"evaisse","description":"A multi-language base application to test performance of static analysis","archived":false,"fork":false,"pushed_at":"2026-04-23T12:39:42.000Z","size":13594,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-23T14:30:03.644Z","etag":null,"topics":["benchmark","chess","chess-engine","code","programming-language"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/evaisse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-09-05T20:49:50.000Z","updated_at":"2026-04-23T11:17:47.000Z","dependencies_parsed_at":"2025-12-17T06:04:31.664Z","dependency_job_id":null,"html_url":"https://github.com/evaisse/the-great-analysis-challenge","commit_stats":null,"previous_names":["evaisse/the-great-analysis-challenge"],"tags_count":69,"template":false,"template_full_name":null,"purl":"pkg:github/evaisse/the-great-analysis-challenge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evaisse%2Fthe-great-analysis-challenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evaisse%2Fthe-great-analysis-challenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evaisse%2Fthe-great-analysis-challenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evaisse%2Fthe-great-analysis-challenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evaisse","download_url":"https://codeload.github.com/evaisse/the-great-analysis-challenge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evaisse%2Fthe-great-analysis-challenge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33427584,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"online","status_checked_at":"2026-05-24T02:00:06.296Z","response_time":57,"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":["benchmark","chess","chess-engine","code","programming-language"],"created_at":"2025-09-26T22:58:34.116Z","updated_at":"2026-05-24T09:01:35.866Z","avatar_url":"https://github.com/evaisse.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Great Analysis Challenge: Multi-Language Chess Engine Project\n\nPolyglot chess engine benchmark: same functional spec, multiple language implementations, Docker-first workflow, shared tests.\n\n## Documentation\n\nStart here: [Documentation Hub](docs/README.md)\n\nCore references:\n- [CHESS_ENGINE_SPECS.md](CHESS_ENGINE_SPECS.md) - authoritative engine and CLI requirements\n- [AI_ALGORITHM_SPEC.md](AI_ALGORITHM_SPEC.md) - minimax + alpha-beta deterministic behavior\n- [AGENTS.md](AGENTS.md) - agent operating rules for this repository\n- [llms.txt](llms.txt) - compact file map for LLM tooling\n\n## Available Implementations\n\nAll implementations target parity for core features: `perft`, `fen`, `ai`, `castling`, `en_passant`, `promotion`.\n\n\u003c!-- status-table-start --\u003e\n| Language | Complexity | LOC | make build | make analyze | make test | make test-chess-engine | Features |\n|----------|------------|-----|------------|--------------|-----------|------------------------|----------|\n| 📦 C | [7,151.5](implementations/c/src/chess.c) | 2,406 | 894ms, - MB | 174ms, - MB | 885ms, - MB | 18.1s, - MB | 🟢 9/9 |\n| 💠 Crystal | [8,040.5](implementations/crystal/src/chess_engine.cr) | 3,308 | 1.3s, - MB | 182ms, - MB | 4.1s, - MB | 19.1s, - MB | 🟢 9/9 |\n| 🎯 Dart | [15,055.25](implementations/dart/bin/main.dart) | 5,006 | 528ms, - MB | 262ms, - MB | 542ms, - MB | 20.3s, - MB | 🟡 9/9 |\n| 💧 Elixir | [5,312.75](implementations/elixir/mix.exs) | 2,084 | 587ms, - MB | 1s, - MB | 612ms, - MB | 20.7s, - MB | 🟢 9/9 |\n| 🌳 Elm | [5,109.75](implementations/elm/src/ChessEngine.elm) | 1,811 | 205ms, - MB | 191ms, - MB | 196ms, - MB | 18.5s, - MB | 🟢 9/9 |\n| ✨ Gleam | [28,222.5](implementations/gleam/src/chess_engine.gleam) | 4,275 | 157ms, - MB | 306ms, - MB | 365ms, - MB | 20.4s, - MB | 🟢 9/9 |\n| 🐹 Go | [15,016.25](implementations/go/chess.go) | 5,703 | 568ms, - MB | 973ms, - MB | 1.1s, - MB | 24.5s, - MB | 🟢 9/9 |\n| 📐 Haskell | [8,143.25](implementations/haskell/src/Main.hs) | 2,312 | 253ms, - MB | 442ms, - MB | 134ms, - MB | 21s, - MB | 🟢 9/9 |\n| 🪶 Imba | [6,167](implementations/imba/chess.imba) | 1,708 | 479ms, - MB | 458ms, - MB | 150ms, - MB | 19s, - MB | 🟡 9/9 |\n| 🟨 Javascript | [4,396.5](implementations/javascript/chess.js) | 1,602 | \u003c1ms, - MB | 153ms, - MB | 172ms, - MB | 39.9s, - MB | 🟢 9/9 |\n| 🔮 Julia | [5,997.25](implementations/julia/chess.jl) | 2,083 | \u003c1ms, - MB | 871ms, - MB | 3.2s, - MB | 22.1s, - MB | 🟡 9/9 |\n| 🧡 Kotlin | [6,774](implementations/kotlin/src/main/kotlin/ChessEngine.kt) | 1,974 | 9.7s, - MB | 9.2s, - MB | 219ms, - MB | 20s, - MB | 🟡 9/9 |\n| 🪐 Lua | [15,254.25](implementations/lua/chess.lua) | 4,192 | \u003c1ms, - MB | 157ms, - MB | 168ms, - MB | 32.2s, - MB | 🟢 9/9 |\n| 🦊 Nim | [7,067](implementations/nim/chess.nim) | 1,636 | 938ms, - MB | 880ms, - MB | 138ms, - MB | 18.6s, - MB | 🟢 9/9 |\n| 🐘 Php | [18,067.25](implementations/php/chess.php) | 5,879 | \u003c1ms, - MB | 408ms, - MB | 165ms, - MB | 24.1s, - MB | 🟢 9/9 |\n| 🐍 Python | [12,581.25](implementations/python/chess.py) | 4,978 | \u003c1ms, - MB | 235ms, - MB | 1.8s, - MB | 41.1s, - MB | 🟡 9/9 |\n| 🧠 Rescript | [6,827.75](implementations/rescript/src/Chess.res) | 2,381 | 376ms, - MB | 607ms, - MB | 223ms, - MB | 21.8s, - MB | 🟡 9/9 |\n| ❤️ Ruby | [5,466](implementations/ruby/chess.rb) | 2,469 | \u003c1ms, - MB | 1.8s, - MB | 237ms, - MB | 18.3s, - MB | 🟡 9/9 |\n| 🦀 Rust | [9,721.75](implementations/rust/src/main.rs) | 2,834 | 230ms, - MB | 597ms, - MB | 817ms, - MB | 18.3s, - MB | 🟢 9/9 |\n| 🐦 Swift | [5,497.5](implementations/swift/src/main.swift) | 1,506 | 2s, - MB | 9s, - MB | 11.7s, - MB | 18.6s, - MB | 🟢 9/9 |\n| 📘 Typescript | [7,773.5](implementations/typescript/src/chess.ts) | 2,586 | 2.1s, - MB | 4s, - MB | 2.2s, - MB | 25.1s, - MB | 🟡 9/9 |\n| ⚡ Zig | [13,193](implementations/zig/src/main.zig) | 2,509 | 217ms, - MB | 167ms, - MB | 156ms, - MB | 33.8s, - MB | 🟢 9/9 |\n\u003c!-- status-table-end --\u003e\n\nLegend:\n- `Features`: `🟢/🟡/🔴` status badge followed by implemented features count from metadata, e.g. `🟡 6/9`.\n- `Complexity`: weighted `tokens-v3` semantic `complexity_score`, linked to the implementation entrypoint.\n- `LOC`: source lines of code from Git-discovered source files filtered by metadata `org.chess.source_exts`.\n- `make ...` columns: `\u003cduration\u003e, \u003cpeak memory\u003e`.\n- `-`: metric missing or intentionally skipped.\n\n## Semantic Token Metrics (tokens-v3)\n\nThe README matrix uses the weighted `complexity_score` from `tokens-v3`. Raw `tokens-v2` counts and the full semantic breakdown remain available in the versioned report JSON files and through the shared Bun tooling. These metrics are powered by Shiki and classify tokens into semantic categories while down-weighting punctuation and excluding comments from scoring.\n\n### Running semantic analysis\n\n```bash\n# Single implementation\nbun run scripts/semantic-tokens/semantic_tokens.mjs implementations/rust --pretty\n\n# All implementations\nbun run scripts/semantic-tokens/semantic_tokens.mjs --all implementations/ --pretty\n\n# Shared metrics pipeline (tokens-v2 + optional tokens-v3)\n./workflow code-size-metrics --impl implementations/rust\n\n# Refresh semantic metrics inside versioned reports\n./workflow refresh-report-metrics\n```\n\n### Complexity score\n\n| Category | Weight | Examples |\n| --- | --- | --- |\n| `keyword` | 1.0 | `if`, `fn`, `return`, `class` |\n| `identifier` | 1.0 | variables, functions, methods |\n| `type` | 1.0 | type annotations, generics |\n| `operator` | 0.5 | `+`, `==`, `\u0026\u0026`, `-\u003e` |\n| `literal` | 0.5 | numbers, strings |\n| `punctuation` | 0.25 | `{}`, `()`, `;`, `,` |\n| `comment` | 0.0 | excluded from scoring |\n| `unknown` | 0.5 | fallback classification |\n\n`complexity_score = Σ(weight × count)`.\n\n## Quick Commands\n\n```bash\nmake list-implementations\nmake image DIR=\u003clanguage\u003e\nmake build DIR=\u003clanguage\u003e\nmake analyze DIR=\u003clanguage\u003e\nmake test DIR=\u003clanguage\u003e\nmake test-unit-contract DIR=\u003clanguage\u003e\nmake test-chess-engine DIR=\u003clanguage\u003e\n./workflow semantic-tokens implementations/\u003clanguage\u003e --pretty\n./workflow refresh-report-metrics\n```\n\nAll implementation build/test/analyze operations are Docker-only.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevaisse%2Fthe-great-analysis-challenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevaisse%2Fthe-great-analysis-challenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevaisse%2Fthe-great-analysis-challenge/lists"}