{"id":31800074,"url":"https://github.com/zsc/gp_2048_demo","last_synced_at":"2025-10-10T22:59:20.090Z","repository":{"id":305850090,"uuid":"1020525027","full_name":"zsc/gp_2048_demo","owner":"zsc","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-22T08:50:23.000Z","size":426,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-22T10:41:26.940Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OCaml","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/zsc.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}},"created_at":"2025-07-16T02:33:49.000Z","updated_at":"2025-07-22T09:14:44.000Z","dependencies_parsed_at":"2025-07-22T10:51:49.367Z","dependency_job_id":null,"html_url":"https://github.com/zsc/gp_2048_demo","commit_stats":null,"previous_names":["zsc/gp_2048_demo"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zsc/gp_2048_demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsc%2Fgp_2048_demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsc%2Fgp_2048_demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsc%2Fgp_2048_demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsc%2Fgp_2048_demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zsc","download_url":"https://codeload.github.com/zsc/gp_2048_demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsc%2Fgp_2048_demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005449,"owners_count":26083902,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","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":[],"created_at":"2025-10-10T22:59:14.448Z","updated_at":"2025-10-10T22:59:20.071Z","avatar_url":"https://github.com/zsc.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 2048 Genetic Programming Solver (OCaml)\n\nAn OCaml implementation of a 2048 game solver using expectimax search and genetic programming, achieving 30-40x performance improvement over Python.\n\n## Web Interface\n\nThe project includes a Flask web app with OCaml backend for fast AI inference:\n\n```bash\n# Run the web server\ncd python \u0026\u0026 python app.py\n# Visit http://localhost:5000\n```\n\nFeatures:\n- Train GP models via web UI\n- Play 2048 with OCaml-powered AI (30-40x faster than Python)\n- Real-time inference time display\n\n## Directory Structure\n\n- **lib/** - Core library (game engine, GP trees, expectimax)\n- **experiments/** - Various experiments and analysis\n- **benchmarks/** - Performance comparison tools\n- **python/** - Original Python implementation\n- **results/** - Experiment results and leaderboards\n- **tests/** - Test data and controlled experiments\n- **archive/** - Old/deprecated code\n\n## Quick Start\n\n```bash\n# Build everything\ndune build\n\n# Run main program\ndune exec gp_2048\n\n# Test score-based strategy (best performer)\ndune exec ./test_score_based.exe\n\n# Run experiments\ncd experiments \u0026\u0026 dune exec ./experiment_node_limited.exe\n```\n\n## Key Results\n\n**Best Strategy**: Score-based dynamic node allocation\n- Average score: 8,788\n- Speed: 11.4 games/sec\n- Adapts computation based on game progress\n\nSee CLAUDE.md for detailed documentation and results.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzsc%2Fgp_2048_demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzsc%2Fgp_2048_demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzsc%2Fgp_2048_demo/lists"}