{"id":20940943,"url":"https://github.com/timhanewich/2048-ai","last_synced_at":"2026-04-24T15:31:41.851Z","repository":{"id":117077726,"uuid":"603799000","full_name":"TimHanewich/2048-AI","owner":"TimHanewich","description":"Training a sequential neural network to play the game 2048 using TensorFlow","archived":false,"fork":false,"pushed_at":"2023-02-19T15:58:41.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-28T02:50:22.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TimHanewich.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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":"2023-02-19T15:57:51.000Z","updated_at":"2023-02-19T15:58:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"a29ea50f-d479-4149-8db5-174704a4dfb8","html_url":"https://github.com/TimHanewich/2048-AI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TimHanewich/2048-AI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimHanewich%2F2048-AI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimHanewich%2F2048-AI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimHanewich%2F2048-AI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimHanewich%2F2048-AI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimHanewich","download_url":"https://codeload.github.com/TimHanewich/2048-AI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimHanewich%2F2048-AI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32228951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: 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":[],"created_at":"2024-11-18T23:12:25.368Z","updated_at":"2026-04-24T15:31:41.833Z","avatar_url":"https://github.com/TimHanewich.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 2048 AI\nI tried to train a sequential neural network to play the game 2048 using TensorFlow (keras). As seen below, this attempt seemed to be unsuccessful or not enough learning time was allocated.\n\n## Exlaining the folders\n- **models** - First implementation. Development ended on this commit *3cbd1287113f01dc7fc61f25e0850c716140733d*\n- **models2** - Added more hidden layers, started new model from scratch.\n\n## Structure 1 Tests\n- 2023-01-29 04-35-08.354122\n    - Avg Max Value: 94.72  \n    - Avg Concentration: 17.55\n- 2023-01-29 04-45-13.728451\n    - Avg Max Value: 125.44  \n    - Avg Concentration: 20.365\n- 2023-01-29 21-26-03.641107\n    - Avg Max Value: 124.16  \n    - Avg Concentration: 23.3\n- 2023-01-30 03-18-12.587640\n    - Avg Max Value: 163.84  \n    - Avg Concentration: 26.55\n- 2023-01-30 13-56-54.905192\n    - Avg Max Value: 181.76\n    - Avg Concentration: 28.305\n- 2023-01-31 04-08-31.118039\n    - Avg Max Value: 126.72\n    - Avg Concentration: 24.215\n\n## Structure 2\nI'm adding significantly more hidden neurons to a model and training from there. \n\nI halted it's training on January 31, 2023 @ 11:43 PM. It clearly is not working.\n\n### Tests\n- 2023-01-31 04-46-14.085862 (start/after only 1 training)\n    - Avg Max Value: 105.4\n    - Avg Concentration: 19.24375\n- 2023-01-31 05-06-47.336688\n    - Avg Max Value: 113.6\n    - Avg Concentration: 21.1109375\n- 2023-01-31 13-44-33.655633\n    - Avg Max Value: 104.4\n    - Avg Concentration: 16.6125\n- 2023-01-31 15-45-44.891697\n    - Avg Max Value: 82.4\n    - Avg Concentration: 17.421875\n- 2023-01-31 18-45-10.140012\n    - Avg Max Value: 108.4\n    - Avg Concentration: 18.45\n- 2023-02-01 04-26-09.856992\n    - Avg Max Value: 104.8\n    - Avg Concentration: 18.059375\n\n## models4\nThis uses a different learning method. This plays X number of games side by side. Then selects the game that worked out the best. Then trains the neural network on every decision that was made during that game.\n\n**I did notice a critical error in my code around 9:50 AM EST on February 3, 2023. I was declaring the list properties of classes outside of the __init__ which is they they were building up so many child elements (shared amongst all instances of the class). I corrected it and continued on. Any model after 2023-02-03 12-41-39.969567 is trained using the new version**\n\n### Tests\n- 2023-02-01 20-06-10.626808\n    - Avg Max Value: 128.4\n    - Avg Concentration: 18.5890625\n- 2023-02-01 23-52-37.388295\n    - Avg Max Value: 135.2\n    - Avg Concentration: 19.7078125\n- 2023-02-02 02-46-35.077023\n    - Avg Max Value: 125.8\n    - Avg Concentration: 18.215625\n- 2023-02-02 12-39-01.253694\n    - Avg Max Value: 114.8\n    - Avg Concentration: 17.4875\n- 2023-02-02 12-39-01.253694\n    - Avg Max Value: 126.8\n    - Avg Concentration: 17.9609375\n- 2023-02-02 16-42-30.178057\n    - Avg Max Value: 136.0\n    - Avg Concentration: 19.3109375\n- 2023-02-03 04-19-27.234289\n    - Avg Max Value: 167.0\n    - Avg Concentration: 22.625\n- 2023-02-03 12-41-39.969567\n    - Avg Max Value: 148.8\n    - Avg Concentration: 21.196875\n- 2023-02-03 16-14-58.159941\n    - Avg Max Value: 165.6\n    - Avg Concentration: 22.9265625\n- 2023-02-03 18-30-26.653947\n    - Avg Max Value: 150.4\n    - Avg Concentration: 21.30625\n- 2023-02-05 21-25-17.395001\n    - Avg Max Value: 170.4\n    - Avg Concentration: 23.3328125\n- 2023-02-05 22-53-50.155704\n    - Avg Max Value: 164.4\n    - Avg Concentration: 22.6171875\n- 2023-02-06 18-18-31.158156\n    - Avg Max Value: 172.0\n    - Avg Concentration: 23.771875\n- 2023-02-07 02-10-55.288370\n    - Avg Max Value: 176.0\n    - Avg Concentration: 24.2921875\n- 2023-02-10 06-49-57.094073\n    - Avg Max Value: 163.2\n    - Avg Concentration: 21.8828125\n- 2023-02-10 19-48-12.580502\n    - Avg Max Value: 122.6\n    - Avg Concentration: 18.0046875\n\n\n## models5\nI added more hidden neurons for this one. And it plays 10 games and chooses the best, not 20. I'm hoping this will allow it to train a bit faster (not spending so much time simulating a game).\n\n### Tests\n- 2023-02-12 19-31-40.975074\n    - Avg Max Value: 155.8\n    - Avg Concentration: 21.1671875\n- 2023-02-12 21-36-06.716441\n    - Avg Max Value: 126.8\n    - Avg Concentration: 18.08125\n- 2023-02-13 03-35-13.286957\n    - Avg Max Value: 124.4\n    - Avg Concentration: 18.875\n- 2023-02-13 17-55-12.164313\n    - Avg Max Value: 116.4\n    - Avg Concentration: 17.61875\n- 2023-02-14 12-42-35.487415\n    - Avg Max Value: 142.0\n    - Avg Concentration: 19.9578125\n- 2023-02-14 19-46-22.543401\n    - Avg Max Value: 130.8\n    - Avg Concentration: 18.753125\n- 2023-02-15 03-20-23.840451\n    - Avg Max Value: 125.2\n    - Avg Concentration: 18.4609375\n- 2023-02-16 01-54-27.101415\n    - Avg Max Value: 124.0\n    - Avg Concentration: 18.534375\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimhanewich%2F2048-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimhanewich%2F2048-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimhanewich%2F2048-ai/lists"}