{"id":17923970,"url":"https://github.com/blueskyson/chess-bot","last_synced_at":"2025-08-15T11:34:22.391Z","repository":{"id":112404741,"uuid":"321989525","full_name":"blueskyson/chess-bot","owner":"blueskyson","description":"Play Chess with Line Bot Message Application","archived":false,"fork":false,"pushed_at":"2020-12-25T13:22:39.000Z","size":8659,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-28T20:49:12.421Z","etag":null,"topics":["bot","chess","line-bot","python"],"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/blueskyson.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":"2020-12-16T13:23:13.000Z","updated_at":"2024-05-20T09:13:05.000Z","dependencies_parsed_at":"2023-05-14T14:45:42.252Z","dependency_job_id":null,"html_url":"https://github.com/blueskyson/chess-bot","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/blueskyson%2Fchess-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blueskyson%2Fchess-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blueskyson%2Fchess-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blueskyson%2Fchess-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blueskyson","download_url":"https://codeload.github.com/blueskyson/chess-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229915372,"owners_count":18144008,"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":["bot","chess","line-bot","python"],"created_at":"2024-10-28T20:46:27.103Z","updated_at":"2024-12-16T05:29:34.911Z","avatar_url":"https://github.com/blueskyson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chessbot\nPlay chess with a line message bot and your friends! Inspired by [fbchess](https://www.facebook.com/fbchess/).\n\n\u003cimg src=\"images/1.png\" width=\"350\"\u003e\n\n## FSM\n\nA finite state machine that shows the operation flow of chessbot. Each position is specified as a **state**, and each move will trigger a **transition** that change the state of chessbot.\n\n#### User Chat FSM\n![](/images/fsm.png)\n\n#### Room Chat FSM\n![](/images/roomfsm.png)\n\n\n## How to Build\n#### Build on your ubuntu machine and test via [ngrok](https://ngrok.com/)\nset up environment variables\n```\n$ ngrok http 8000\n$ export LINE_CHANNEL_SECRET=         [your channel secret]\n$ export LINE_CHANNEL_ACCESS_TOKEN=   [your channel access token]\n$ export DOMAIN=                      [ngrok url]\n$ export PORT=                        8000\n```\ninstall dependancies and run\n```\n$ sudo apt install graphviz libgraphviz-dev pkg-config\n$ pip3 install -r requirements.txt\n$ python src/app.py\n```\nuse \"[ngrok url]/callback\" as **webhook settings** on your line bot messaging API panel\n\n#### Build on [heroku](https://www.heroku.com)\n```\n$ heroku git:remote -a [your app name]\n$ heroku buildpacks:set heroku/python\n$ heroku buildpacks:add --index 1 heroku-community/apt\n$ heroku config:set LINE_CHANNEL_SECRET=         [your channel secret]\n$ heroku config:set LINE_CHANNEL_ACCESS_TOKEN=   [your channel access token]\n$ heroku config:set DOMAIN=                      [heroku app url]\n$ heroku config:set PORT=                        8000\n$ git push heroku master\n```\n\nuse \"[heroku app url]/callback\" as **webhook settings** on your line bot messaging API panel\n\n## Play With AI\n\n###### Type \"help\" to in chat room will show commands.\n\n\u003cimg src=\"images/help.png\" width=\"350\"\u003e\n\n###### Tpye \"play\", \"play white\", \"play black\" to play with AI.\n\n\u003cimg src=\"images/play.png\" width=\"350\"\u003e\n\n###### To move pieces, use [Long Algebaric Notation](https://en.wikipedia.org/wiki/Algebraic_notation_(chess)#Long_algebraic_notation) without using 'x' when you capture a piece. E.g., e2e4, g8f6.\n\n\u003cimg src=\"images/e2e4.png\" width=\"350\"\u003e\n\n###### Use \"o-o\" or \"o-o-o\" to castle\n\n\u003cimg src=\"images/o-o.png\" width=\"350\"\u003e\n\n###### Pawns will be promoted to Queen after moving to side. If you want to promote a pawn to other piece type, use \"=r\" (Rook), \"=n\" (Knight), \"=b\" (Bishop), \"=q\" (Queen). E.g., \"b7b8=r\".\n\n###### Checks are detected automatically.\n\n\u003cimg src=\"images/check.png\" width=\"350\"\u003e\n\n###### Type \"undo\" to cancel AI's and your last move\n\n###### Type \"resign\" to give up the game\n\n## Play Yourself or With Friends\n\n###### Type \"play self\" to move both white and black yourself.\n\n###### Type \"play 2p\" or \"play 2p black\" to create a game. Afterwards, player2 type \"accept\" to join the game.\n\n\u003cimg src=\"images/play2p.png\" width=\"350\"\u003e\n\n###### Type \"play 2p\" or \"play 2p black\" to create a game. Afterwards, type \"cancel\" to cancel a game\n\n\u003cimg src=\"images/cancel.png\" width=\"350\"\u003e\n\n###### Type \"undo\" and player2 type \"y\" to cancel last move.\n\n\u003cimg src=\"images/undo.png\" width=\"350\"\u003e\n\n#### Notice: All the chess board pictures are removed from server in the end of a game.\n\n## Credit [ChessAI](https://github.com/Dirk94/ChessAI)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblueskyson%2Fchess-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblueskyson%2Fchess-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblueskyson%2Fchess-bot/lists"}