{"id":22792097,"url":"https://github.com/zhixiangli/gomoku-battle","last_synced_at":"2025-04-16T07:43:43.293Z","repository":{"id":32144420,"uuid":"35717245","full_name":"zhixiangli/gomoku-battle","owner":"zhixiangli","description":"Gomoku Battle is a cross-language cross-system battle platform.","archived":false,"fork":false,"pushed_at":"2023-06-14T22:28:50.000Z","size":4658,"stargazers_count":18,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T05:12:26.213Z","etag":null,"topics":["agent","ai","ai-agents","alpha-beta-pruning","battle-platform","five-in-row","game","gobang","gomoku","java","javafx"],"latest_commit_sha":null,"homepage":"","language":"Java","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/zhixiangli.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":"2015-05-16T09:13:32.000Z","updated_at":"2024-03-14T11:45:47.000Z","dependencies_parsed_at":"2022-09-11T17:23:47.945Z","dependency_job_id":null,"html_url":"https://github.com/zhixiangli/gomoku-battle","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/zhixiangli%2Fgomoku-battle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhixiangli%2Fgomoku-battle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhixiangli%2Fgomoku-battle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhixiangli%2Fgomoku-battle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhixiangli","download_url":"https://codeload.github.com/zhixiangli/gomoku-battle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249214073,"owners_count":21231096,"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":["agent","ai","ai-agents","alpha-beta-pruning","battle-platform","five-in-row","game","gobang","gomoku","java","javafx"],"created_at":"2024-12-12T03:09:18.277Z","updated_at":"2025-04-16T07:43:43.265Z","avatar_url":"https://github.com/zhixiangli.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GOMOKU BATTLE\n\n## An Example Game between Alpha-Beta-Search Agents\n\u003c!---\n{\"command\":\"NEXT_WHITE\",\"rows\":15,\"columns\":15,\"chessboard\":\"B[76];W[65];B[55];W[66];B[67];W[58];B[74];W[75];B[57];W[64];B[53];W[54];B[63];W[85];B[95];W[86];B[87];W[97];B[a8];W[43];B[47];W[77];B[46];W[32];B[21];W[37];B[48];W[45];B[4a];W[49];B[35];W[24];B[79];W[68];B[44];W[62];B[26];W[17];B[52];W[99];B[88];W[98];B[9a];W[89];B[41];W[30];B[11];W[31];B[33];W[22];B[16];W[36];B[18];W[7a];B[6b];W[5b];B[29];W[1a];B[3a];W[a7];B[b6];W[5c];B[5a];W[2a];B[4b];W[07];B[3c];W[69];B[3b];W[8b];B[9c];W[3d];B[94];W[83];B[84];W[b7];B[38];W[39];B[c7];W[a4];B[a5];W[d8];B[96];W[b4];B[8d];W[ab];B[d6];W[c6];B[28];W[08];B[93];W[92];B[9e];W[7c];B[2d];W[1e];B[25];W[27];B[9b];W[9d];B[1d];W[2c];B[4e];W[09];B[4c];W[4d];B[a9];W[b8];B[0a];W[a2];B[b2];W[c9];B[a3];W[ba];B[e7];W[bb];B[b9];W[eb];B[da];W[cb];B[db];W[82];B[72];W[06];B[05];W[ca];B[d0];W[c1];B[8e];W[cc];B[6e]\"}\n--\u003e\n![an example game between alpha-beta-search agents](https://github.com/zhixiangli/gomoku-battle/blob/master/example-game.gif)\n\n## Overview\n**Gomoku**, also called Gobang or Five in a Row, is an abstract strategy board game.\n\nPlayers alternate turns placing a stone of their color on an empty intersection. The winner is the first player to form an unbroken chain of five stones horizontally, vertically, or diagonally.\n\nMore details see [wikipedia](https://en.wikipedia.org/wiki/Gomoku).\n\n**Gomoku Battle** is a cross-language cross-system **battle platform** with lots of AI agent.\n\n+ **gomoku-battle-core**: Basic Gomoku library.\n\n+ **gomoku-battle-console**: A referee between AI agents. It also sends and receives commands to set up communication with AI agents.\n\n+ **gomoku-battle-dashboard**: Dashboard is a viewer of a situation of the chessboard.\n\n## Launch Battle Platform\n```\ngit clone https://github.com/zhixiangli/gomoku-battle.git\ncd gomoku-battle\nsh build.sh\nsh battle.sh -c battle.properties\n```\n\n## Configuration\n**AI Agent** can be changed by modifying the **player.properties**\n\n+ **player.xxxxx.alias**: set an alias for the agent.\n+ **player.xxxxx.cmd**: a shell script to start an agent. No agent will start if the command is empty. Every agent should implement the following command.\n\n## A Configuration Example\n```\nplayer.black.cmd=java -jar bin/gomoku-battle-alphabetasearch-0.0.1-SNAPSHOT-jar-with-dependencies.jar\nplayer.black.alias=alpha-beta-search\nplayer.white.cmd=java -jar bin/gomoku-battle-alphabetasearch-0.0.1-SNAPSHOT-jar-with-dependencies.jar\nplayer.white.alias=alpha-beta-search\n```\n\n## AI Agent API\nThe console will create a subprocess for an AI agent.\n\nThe communication commands between console and AI agent is by **stdin** and **stdout**\n\n### Request\nField | Description\n------|------------\ncommand | NEXT\\_BLACK (next color is black) or NEXT\\_WHITE (next color is white)\nrows | the number of rows in a chessboard\ncolumns | the number of columns in a chessboard\nchessboard | SGF\n\n### Sample Request\n{\"command\":\"NEXT_BLACK\",\"rows\":15,\"columns\":15,\"chessboard\":\"B[96];W[a5];B[a4];W[95]\"}\n\n### Response\nreturn the position to make a move\n\n### Sample Response\n{\"rowIndex\":3,\"columnIndex\":10}\n\n## AI Agent Example\n\nAI | Description | Language | Command Processor\n---|---|---|---\n[alpha-beta-search](https://github.com/zhixiangli/gomoku-battle/tree/master/gomoku-battle-alphabetasearch) | Alpha Beta Search Agent | Java | [AlphaBetaSearchAgent.java](https://github.com/zhixiangli/gomoku-battle/blob/master/gomoku-battle-alphabetasearch/src/main/java/com/zhixiangli/gomoku/alphabetasearch/AlphaBetaSearchAgent.java)\n\n## Evaluation\n```\ngit clone https://github.com/zhixiangli/gomoku-battle.git\ncd gomoku-battle\nsh build.sh\nsh battle.sh -c battle.properties -d\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhixiangli%2Fgomoku-battle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhixiangli%2Fgomoku-battle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhixiangli%2Fgomoku-battle/lists"}