{"id":21340710,"url":"https://github.com/artainmo/gomoku","last_synced_at":"2026-05-11T03:51:05.429Z","repository":{"id":217972690,"uuid":"707866029","full_name":"artainmo/gomoku","owner":"artainmo","description":"42 school project. Gomoku game website. Using min-max AI algorithm to simulate a dominant gomoku player.","archived":false,"fork":false,"pushed_at":"2024-01-17T13:20:49.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T02:48:14.648Z","etag":null,"topics":["42school","artificial-intelligence","css","flask","game","heuristic","html","minimax","python","web"],"latest_commit_sha":null,"homepage":"","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/artainmo.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}},"created_at":"2023-10-20T20:57:27.000Z","updated_at":"2024-01-18T23:14:40.000Z","dependencies_parsed_at":"2024-01-19T01:57:26.127Z","dependency_job_id":"ae4e5ffa-77ea-4288-a281-14aaae08028e","html_url":"https://github.com/artainmo/gomoku","commit_stats":null,"previous_names":["artainmo/gomoku"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/artainmo/gomoku","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artainmo%2Fgomoku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artainmo%2Fgomoku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artainmo%2Fgomoku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artainmo%2Fgomoku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artainmo","download_url":"https://codeload.github.com/artainmo/gomoku/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artainmo%2Fgomoku/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32880788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"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":["42school","artificial-intelligence","css","flask","game","heuristic","html","minimax","python","web"],"created_at":"2024-11-22T00:52:39.958Z","updated_at":"2026-05-11T03:51:05.403Z","avatar_url":"https://github.com/artainmo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gomoku\n\n42 school [subject](https://cdn.intra.42.fr/pdf/pdf/81333/en.subject.pdf).\n\nGomoku game website. Using min-max AI algorithm to simulate a dominant gomoku player.\n\nI will use python as it is more convenient for algorithm/AI projects.\u003cbr\u003e\nAs web framework I will use python flask over python django as python flask is sufficient for what I need and is faster to setup.\n\n## Use\nRun flask app on 127.0.0.1:5000:\n```\nmake\n```\n\nLaunch with hot-reload and see contemplated AI moves/suggestions via mouse hovering over positions:\n```\nmake debug\n```\n\nIf access to 127.0.0.1 gets denied:\n* Go to 'chrome://net-internals/#sockets' and flush socket pools.\n* [Clear cache and cookies.](https://support.google.com/accounts/answer/32050?hl=en\u0026co=GENIE.Platform%3DDesktop)\n* If necessary use a different port using associated flag `flask run --port 8000`.\n\n## Preliminary Notions\n### Gomoku and Go\nGomoku is also called five-in-a-row. It is played on a Go board by two players.\u003cbr\u003e\nGo is an abstract strategy game in which the aim is to surround more territory than the opponent. The game was invented in China 4,500 years ago and is believed to be the oldest board game continuously played to the present day. The conventional board has a size of 19x19, the number of legal board positions in Go has been calculated to be approximately 2.1x10^107.\u003cbr\u003e\nGomoku is played with same equipment as Go, however Gomoku is simpler due to five pawns in a row being sufficient for a win.\n\nDifferent versions and rules around the Gomoku game exist. To generalize, the main goal of this game is to be the first player to place five pawns in a row on the board horizontally, vertically or diagonally. Players take turns placing a pawn on the empty intersection of their choice. Black pawns start.\n\n### Minimax algorithm\nThe minimax algorithm helps find the best move, by working backwards from the end of the game. At each step it assumes that player A is trying to maximize the chances of A winning, while on the next turn player B is trying to minimize the chances of A winning (i.e., to maximize B's own chances of winning).\n\nAlpha-beta pruning is a technique used in a minimax algorithm to make it faster\nby preventing computations that are not necessary as they would not affect the outcome.\n\n## Resources\n[artainmo - python bootcamp](https://github.com/artainmo/python_bootcamp)\u003cbr\u003e\n[artainmo - Flask](https://github.com/artainmo/web-development/tree/main/back-front-end/flask)\u003cbr\u003e\n[wikipedia - Go](https://en.wikipedia.org/wiki/Go_%28game%29)\u003cbr\u003e\n[youtube - How to play Gomoku (5 in a row)](https://www.youtube.com/watch?v=-KD743yNDHc)\u003cbr\u003e\n[wikipedia - Minimax](https://en.wikipedia.org/wiki/Minimax)\u003cbr\u003e\n[youtube - What is the Minimax Algorithm? - Artificial Intelligence](https://www.youtube.com/watch?v=KU9Ch59-4vw)\u003cbr\u003e\n[youtube - Algorithms Explained – minimax and alpha-beta pruning](https://www.youtube.com/watch?v=l-hh51ncgDI)\u003cbr\u003e\n[Iowa State University thesis - New Heuristic Algorithm to improve the Minimax for Gomoku Artificial Intelligence](https://dr.lib.iastate.edu/server/api/core/bitstreams/39a805d5-8f5b-41e6-b07c-19c07229f813/content)\u003cbr\u003e\n[UCT-ADP Progressive Bias Algorithm for Solving Gomoku](https://arxiv.org/pdf/1912.05407.pdf)\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartainmo%2Fgomoku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartainmo%2Fgomoku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartainmo%2Fgomoku/lists"}