{"id":19847464,"url":"https://github.com/olety/reverpy","last_synced_at":"2025-07-20T12:05:52.290Z","repository":{"id":21277542,"uuid":"92091295","full_name":"olety/Reverpy","owner":"olety","description":"Reversi game bot written in python","archived":false,"fork":false,"pushed_at":"2022-06-22T02:58:45.000Z","size":3118,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-20T02:05:01.295Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olety.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}},"created_at":"2017-05-22T19:24:44.000Z","updated_at":"2020-11-09T10:27:14.000Z","dependencies_parsed_at":"2022-09-20T19:53:28.332Z","dependency_job_id":null,"html_url":"https://github.com/olety/Reverpy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/olety/Reverpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olety%2FReverpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olety%2FReverpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olety%2FReverpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olety%2FReverpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olety","download_url":"https://codeload.github.com/olety/Reverpy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olety%2FReverpy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266120304,"owners_count":23879293,"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":[],"created_at":"2024-11-12T13:14:25.376Z","updated_at":"2025-07-20T12:05:52.272Z","avatar_url":"https://github.com/olety.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reverpy - Reversi game and bot written in python\n\n![](pictures/gameplay.png)\n\n## Why?\n\nThis is a project done for the undergraduate course \"Introduction to Artificial Intelligence\" in Wrocław University of Science and Technology. The task was to make a \"bot\" that could outsmart a human in the game of Reversi (alt. name: Othello). \n\nThis repository implements three different solvers:\n\n- **Naive** (Tries to go for a corner and then goes through every possible move)\n- [**MinMax** algorithm](https://en.wikipedia.org/wiki/Minimax)\n- MinMax algorithm with [**Alpha/Beta pruning**](https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning)\n\n## Game rules ([Source](https://www.mastersofgames.com/rules/reversi-othello-rules.htm))\n\nPlayer's toss a coin to decide who will play first. Each turn, the player places one piece on the board with their colour facing up.\n\nFor the first four moves, the players must play to one of the four squares in the middle of the board and no pieces are captured or reversed.\n\nEach piece played must be laid adjacent to an opponent's piece so that the opponent's piece or a row of opponent's pieces is flanked by the new piece and another piece of the player's colour. All of the opponent's pieces between these two pieces are 'captured' and turned over to match the player's colour.\n\nIt can happen that a piece is played so that pieces or rows of pieces in more than one direction are trapped between the new piece played and other pieces of the same colour. In this case, all the pieces in all viable directions are turned over.\n\nThe game is over when neither player has a legal move (i.e. a move that captures at least one opposing piece) or when the board is full.\n\n## How to run\n\nJust install the requirements (numpy and pygame) and run the game.py file!\n\n```\npip3 install -r requirements.txt\npython3 game.py\n```\n\n## Attribution\nFont used: Philosopher-Regular (License is in the res folder)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folety%2Freverpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folety%2Freverpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folety%2Freverpy/lists"}