Gomoku player
What it does
Play a full game of Gomoku (Five in a Row) directly within your chat interface on a 9x9 grid. It handles the game state, move validation, and visual rendering of the board using an alphanumeric coordinate system. This is particularly useful for testing basic game logic, passing time, or prototyping turn-based interaction patterns without needing to build a separate frontend. By enforcing a strict coordinate axis (A-I, 1-9), it eliminates ambiguity in move placement and ensures the AI tracks the board state accurately across multiple turns.Use cases
- Quick Mental Break: Playing a fast-paced strategy game during a coding break.
- Interaction Testing: Testing how an LLM maintains state and follows spatial constraints over a long conversation.
- Logic Prototyping: Observing how the AI calculates winning patterns (horizontal, vertical, and diagonal) to inform your own game dev logic.
- Onboarding: Introducing non-technical stakeholders to LLM capabilities via a familiar game.
How to use
Paste the prompt below into your chat. The AI will initialize the 9x9 board and make the first move. To play, simply reply with the coordinate of your move (e.g., "E5").text
Let's play Gomoku. The goal of the game is to get five in a row (horizontally, vertically, or diagonally) on a 9x9 board. Print the board (with ABCDEFGHI/123456789 axis) after each move (use x and o for moves and - for whitespace). You and I take turns in moving, that is, make your move after my each move. You cannot place a move an top of other moves. Do not modify the original board before a move. Now make the first move.Tips
- Coordinate Precision: Always use the
LetterNumberformat (e.g.,D4) to avoid any parsing errors.
- Verify the Grid: Quickly scan the printed board after each turn to ensure the AI hasn't "hallucinated" a piece position.
- Challenge the AI: If the AI seems too easy, tell it to "play optimally" or "use an aggressive strategy" in your first few moves.
- Resetting: If the board state becomes corrupted, simply restart the chat or paste the prompt again to clear the grid.
Notes
- Spatial Memory: In very long games, LLMs can occasionally lose track of a specific cell; double-check the board if a win is disputed.
- Board Size: This prompt is locked to 9x9; if you need a standard 15x15 board, you will need to modify the dimensions in the prompt before starting.