{"id":15726510,"url":"https://github.com/aashrafh/unbeatabletictactoe","last_synced_at":"2026-04-27T12:01:35.790Z","repository":{"id":122911685,"uuid":"195135675","full_name":"aashrafh/UnbeatableTicTacToe","owner":"aashrafh","description":"A tic-tac-toe game that never loses using the Mini-max Algorithm.","archived":false,"fork":false,"pushed_at":"2019-07-04T14:41:24.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-31T01:29:31.071Z","etag":null,"topics":["ai","ai-games","css","games","html","javascript","minimax","minimax-algorithm","tic-tac-toe","tictactoe","tictactoe-game"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/aashrafh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-07-03T22:49:29.000Z","updated_at":"2019-07-08T13:31:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"1782166f-b0cd-4a06-b70f-fecda8853726","html_url":"https://github.com/aashrafh/UnbeatableTicTacToe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aashrafh/UnbeatableTicTacToe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aashrafh%2FUnbeatableTicTacToe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aashrafh%2FUnbeatableTicTacToe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aashrafh%2FUnbeatableTicTacToe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aashrafh%2FUnbeatableTicTacToe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aashrafh","download_url":"https://codeload.github.com/aashrafh/UnbeatableTicTacToe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aashrafh%2FUnbeatableTicTacToe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32335297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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":["ai","ai-games","css","games","html","javascript","minimax","minimax-algorithm","tic-tac-toe","tictactoe","tictactoe-game"],"created_at":"2024-10-03T22:27:31.265Z","updated_at":"2026-04-27T12:01:35.760Z","avatar_url":"https://github.com/aashrafh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unbeatable TicTacToe Game\nThis is a simple tic-tac-toe game that uses the mini-max algorithm as an AI player against the human player so it never loses.\n\n## Minimax Algorithm\nIn real life, a human would think of all the possible consequences for each move. This is where the minimax algorithm comes handy.\nThe algorithm evaluates the moves that lead to a terminal state based on the players’ turn. It will choose the move with maximum score when it is the AI’s turn and choose the move with the minimum score when it is the human player’s turn. Using this strategy, Minimax avoids losing to the human player.\n\n## Demo\n[Play it on CodePen](https://codepen.io/aashrafh/full/ZdRMYV)\n\n\n![Demo](https://s3.gifyu.com/images/InteractiveDictionarydfa13c2407c324a9.md.gif)\n\n## Inspiration\nThis implementation of the Mini-Max Algorithm based on the following tutorial: [FreeCodeCamp](https://www.freecodecamp.org/news/how-to-make-your-tic-tac-toe-game-unbeatable-by-using-the-minimax-algorithm-9d690bad4b37/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faashrafh%2Funbeatabletictactoe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faashrafh%2Funbeatabletictactoe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faashrafh%2Funbeatabletictactoe/lists"}