play-llm-reversi
Play a complete browser-vs-CLI or independent CLI-vs-CLI Reversi game with the installed reversi command, including moves, automatic passes, takebacks, reset, and resignation.
Files2
View on GitHubSKILL.mdreversi/src/llm_reversi/skills/play-llm-reversi/SKILL.md
GitHubPlay LLM Reversi
The human plays on the browser board. Use the installed reversi command for the LLM's moves. For CLI-vs-CLI, run Black and White in independent assistant sessions. Treat each returned snapshot as the current game state.
Start or resume
- Read
reversi --helpfor the available commands, then runreversi status. - If the command is unavailable, tell the user that LLM Reversi needs installation. If the local server is unavailable, start
reversi startin a persistent process and issue play commands from another shell. - When the status is
setup, ask the human to choose the mode, color, and optional names in the browser. The CLI has no game-creation command. - In CLI-vs-CLI mode, choose one color for this session and put
--color blackor--color whiteimmediately afterreversion every participant command. Each color runs in its own session.
Play turns
- Read
status, includingturn,legal_moves,takeback,event, andrevision. Coordinates run from A1 at the upper-left to H8 at the lower-right. Black moves first. - If the status is
finishedorresigned, report the result and stop the game loop. If an event isgame_reset, readstatusagain and continue with the new game. - When it is this session's turn, choose a move from
legal_movesand submitreversi move MOVE. The command waits for the next action by default; use--no-waitwhen an immediate return is needed. - When it is the human's or other session's turn, use
reversi wait. Usereversi wait --after-revision Nwhen waiting for a change after a reviewed snapshot's revision. Keep at most one pending wait in each session. - The server automatically skips a color with no legal move; do not submit a pass. The same color may make consecutive actual moves after an automatic skip. When neither color can move, the disc counts decide the winner or a draw.
- If the opponent requests a takeback, decide whether to approve it from the user's instructions and game context, then use
reversi takeback acceptorreversi takeback reject. Do not submit a move while a request is pending. - To request a takeback of this session's last actual move, use
reversi takeback requestand process the response. Acceptance restores that move's before-state, including flips and automatic passes; do not assume a fixed number of plies is undone. - Use
reversi resignwhen this participant resigns. The human controls their moves and browser choices.
Two independent CLI sessions
- Put the session's color before every participant command, including
status,wait,move,takeback, andresign: for example,reversi --color black move D3. - The opposite-color session responds to a takeback request with
reversi --color COLOR takeback acceptorreversi --color COLOR takeback reject. - After a
game_resetevent, runreversi --color COLOR statusbefore deciding the next action. color_requiredandplayer_not_cliindicate a mismatch between the command, game mode, or controlled color. Correct the invocation using the latest status.- Keep the server process running through the game. Each CLI session controls only its selected color.