{"id":17998354,"url":"https://github.com/primaryobjects/isolation","last_synced_at":"2025-04-04T06:42:11.729Z","repository":{"id":139343250,"uuid":"227677566","full_name":"primaryobjects/isolation","owner":"primaryobjects","description":"Isolation, AI game implemented in Javascript and React, using MiniMax with Alpha Beta Pruning.","archived":false,"fork":false,"pushed_at":"2020-02-03T20:55:47.000Z","size":154,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T17:47:43.696Z","etag":null,"topics":["ai","alpha-beta-pruning","artificial","artificial-intelligence","game","game-development","intelligence","isolation","javascript","js","minimax","minimax-algorithm","minimax-search","minimax-tree","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/primaryobjects.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}},"created_at":"2019-12-12T19:07:03.000Z","updated_at":"2022-04-18T12:33:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"b885babb-19d1-4240-b239-ce4f1ea866e1","html_url":"https://github.com/primaryobjects/isolation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Fisolation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Fisolation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Fisolation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Fisolation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/primaryobjects","download_url":"https://codeload.github.com/primaryobjects/isolation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135123,"owners_count":20889420,"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","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","alpha-beta-pruning","artificial","artificial-intelligence","game","game-development","intelligence","isolation","javascript","js","minimax","minimax-algorithm","minimax-search","minimax-tree","react"],"created_at":"2024-10-29T21:24:56.085Z","updated_at":"2025-04-04T06:42:11.708Z","avatar_url":"https://github.com/primaryobjects.png","language":"JavaScript","readme":"Isolation\n=========\n\nAn AI browser-based game, where the goal is to be the last player with an available move.\n\n[Play Online](http://primaryobjects.github.io/isolation/)\n\n[Intelligent Heuristics for the Game Isolation using AI and Minimax](http://www.primaryobjects.com/2020/01/26/intelligent-heuristics-for-the-game-isolation-using-ai-and-minimax/)\n\n## What is it?\n\nIsolation offers a simple environment to demonstrate the artificial intelligence AI algorithm [Minimax](https://en.wikipedia.org/wiki/Minimax) with [Alpha-beta pruning](https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning).\n\n![Isolation - game using AI player with minimax and intelligent heuristics](images/isolation-anim.gif)\n\n## How to Play\n\nAt each turn, the player may choose to move any number of spaces up, right, down, left, or diagonally as long as the path is not blocked by a previously visited cell.\n\nAfter the first player selects a cell to start, the second player may choose a starting cell. Players then take turns moving their player to a new cell, according to the rules above, until a player can no longer make a move - meaning that the player is effectively trapped. At this point, the opposing player wins.\n\nOne of the simplest implementations of the game is a 3x3 grid.\n\n## AI Opponent Using Minimax\n\nThe AI computer player uses the Minimax algorithm. This allows the AI to take the current game board state and build a tree of all possible moves and next states that each player may take. The Minimax algorithm is then applied from the bottom of the tree, upwards, in order to determine the best move to make for the current turn. The AI always assumes that the player will make an optimal move, and bases its decision accordingly.\n\nIsolation implements a port of the Minimax with Alpha-beta pruning algorithm developed for [Python](https://tonypoer.io/2016/10/28/implementing-minimax-and-alpha-beta-pruning-using-python/).\n\n## Running the Game\n\n[Play Online](https://codepen.io/primaryobjects/full/QWWGgmR)\n\nOr run locally, with the following command.\n\n```bash\ncd isolation\npython -m SimpleHTTPServer 8000\n```\n\nAny http server may be used to host the game locally. An example of using the Python SimpleHTTPServer is shown above. Execute the above command from the directory containing the game. Then navigate to http://localhost:8000 to play the game.\n\n## How is it Made?\n\nIsolation is developed with Javascript, React, Twitter Bootstrap.\n\n[Edit](https://codepen.io/primaryobjects/full/QWWGgmR) the code on CodePen.\n\n## License\n\nMIT\n\n## Author\n\nKory Becker\nhttp://www.primaryobjects.com/kory-becker\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimaryobjects%2Fisolation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprimaryobjects%2Fisolation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimaryobjects%2Fisolation/lists"}