← Back to Skills Marketplace
imcaptor

Go Next Move Skill

by imcaptor · GitHub ↗ · v0.0.4 · MIT-0
cross-platform ✓ Security Clean
63
Downloads
0
Stars
1
Active Installs
3
Versions
Install in OpenClaw
/install go-next-move
Description
Analyze a Go/Weiqi position from an image or board state, use KataGo to recommend the next move at beginner, intermediate, or advanced playing strength. Use...
README (SKILL.md)

Go Next Move

Current Scope

This skill is being built as a separate move-selection layer from count-go-black-stones.

The intended workflow is:

  1. Convert a board photo into a 19x19 position.
  2. Ask the user or infer who is to move when possible.
  3. Send the position to KataGo using Chinese rules and a fixed visit budget.
  4. Return a recommended move matched to the requested playing-strength level.
  5. Include candidate moves and enough analysis data to explain or audit the choice.

Local KataGo Defaults

KataGo is installed through Homebrew and verified on this machine:

katago version

Expected important line:

Using Metal backend

Use this project config after KataGo's bundled GTP config:

katago gtp \
  -model /opt/homebrew/share/katago/g170e-b20c256x2-s5303129600-d1228401921.bin.gz \
  -config /opt/homebrew/share/katago/configs/gtp_example.cfg \
  -config katago/gtp_skill.cfg

Set komi through GTP, not the config file:

boardsize 19
komi 7.5
clear_board
genmove b

For scripted next-move analysis, prefer the JSON analysis engine:

python3 scripts/next_move.py /path/to/board.jpg \
  --input image \
  --side-to-move black \
  --level intermediate \
  --visits 400 \
  --overlay /tmp/go-next-overlay.jpg \
  --source-overlay /tmp/go-source-overlay.jpg \
  --source-result-image /tmp/go-source-result.jpg \
  --result-image /tmp/go-next-result.jpg

For photo input, the default user-facing image should be the combined original-photo result. It marks existing white stones with black W, existing black stones with white B, and the recommended move as a numbered stone so the user can compare the recognition against the real board at a glance. Use --result-image only when you explicitly want the clean warped-board rendering with a red ring/dot.

Use --source-overlay for user-facing recognition verification. It marks detected stones on the original photo. --overlay is a warped/cropped board view for debugging and may not look like the original photo.

For photo input, the tool should surface the combined original-photo result by default. It is the verification/result image: existing white stones are marked with black W, existing black stones are marked with white B, and the recommended move is drawn as a new stone with the numbered label 1. This makes recognition mistakes easier to spot and leaves room for future multi-step labels. Use --result-image only when you explicitly want the clean warped-board rendering.

For an already recognized board:

python3 scripts/next_move.py /path/to/board_ascii.txt \
  --input ascii \
  --side-to-move white \
  --level beginner

board_ascii is 19 rows of 19 characters:

  • X or B: black stone
  • O or W: white stone
  • .: empty point

The script returns JSON containing:

  • board_ascii
  • recommendation
  • reason
  • recommendations_by_level
  • candidate_moves
  • root_info
  • optional result_image when --result-image is passed
  • default source_result_image for photo input, or optional source_result_image when --source-result-image is passed explicitly
  • optional recognition metadata when input is an image

Playing-Strength Levels

The level controls move strength, not explanation depth.

  • Beginner: choose a plausible but intentionally softer move from KataGo's candidates. It should usually be playable, but may lose several points compared with the best move.
  • Intermediate: choose a solid near-top candidate. It should be close to the best move but not always the engine's first choice.
  • Advanced: choose KataGo's top searched candidate.

Use --level all when the caller wants all three recommendations at once. Use recommendation for the selected level and recommendations_by_level to compare the three outputs.

The current script chooses levels by candidate rank plus score/winrate loss from KataGo's best move. These thresholds are a practical first pass, not calibrated ranks. The next improvement should tune them with real game examples.

User-Facing Response

When answering a user, include:

  1. The recommended coordinate.
  2. The generated source_result_image for photo input, or result_image for ASCII input.
  3. Why this move was chosen, using reason.summary plus the bullet-like items in reason.explanation.
  4. Technical parameters from reason.technical_parameters, especially winrate, score lead, visits, score loss vs best, and PV.
  5. Candidate comparison from reason.comparison_candidates when there are meaningful alternatives.
  6. The recognition.source_overlay image when available.
  7. A recognition caveat if the rendered board or source overlay does not match the real photo.

Do not only return the coordinate. The user-facing answer should always include enough engine data to audit the recommendation: winrate, score lead, visits, and whether the chosen move is the top KataGo move or a deliberately softer level-based move.

Do not invent tactical explanations that are not supported by KataGo data or visible board context. If recognition looks wrong, say the recommendation is not reliable until the board is corrected.

Notes

  • Do not rely on the language model alone for high-strength move choice.
  • Use KataGo for candidate moves; use the requested level to choose the playing strength of the move.
  • A board photo usually does not prove whose turn it is. Ask or require the side to move unless the surrounding context makes it clear.
  • If board recognition is uncertain, surface the uncertainty before giving a move recommendation.
  • White-stone classification includes center low-saturation and center/ring contrast checks to reduce false positives from glare or bright wood grain.
Usage Guidance
Install only if you are comfortable letting the agent run the bundled Python scripts and a local KataGo binary on board images or text positions you choose. Verify the KataGo binary and model paths yourself, avoid passing unrelated private files as inputs, and choose output paths carefully because overlay/result images will be written there.
Capability Tags
crypto
Capability Assessment
Purpose & Capability
The documented purpose is to analyze Go board images or ASCII positions and recommend moves; the Python scripts, KataGo configs, and output images all support that purpose.
Instruction Scope
The skill asks the agent to run local Python/KataGo commands and read user-provided image, text, config, model, and executable paths. That authority is disclosed and purpose-aligned, but users should keep inputs scoped to intended game files.
Install Mechanism
Artifacts consist of Markdown instructions, Python scripts, simple KataGo config overrides, and a requirements file for common image-processing packages. No auto-start installer, hidden bootstrap, or opaque install step was found.
Credentials
Local file access, image writes, and subprocess use are proportionate for OpenCV board recognition and KataGo analysis. The scripts do not make network calls or access credentials.
Persistence & Privilege
No privilege escalation, background worker, credential/session use, or automatic modification of account/business data was found. Persistence is limited to user-requested output images and KataGo log directories configured for local analysis.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install go-next-move
  3. After installation, invoke the skill by name or use /go-next-move
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.0.4
Add detailed move rationale and technical parameters including winrate, score lead, visits, PV, and candidate comparisons.
v0.0.3
Fix edge white stone recognition for partially clipped board-edge stones such as N1.
v0.0.1
Initial release: image/ASCII Go board recognition, KataGo next-move analysis, strength levels, source-photo result overlay, and move rationale.
Metadata
Slug go-next-move
Version 0.0.4
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 3
Frequently Asked Questions

What is Go Next Move Skill?

Analyze a Go/Weiqi position from an image or board state, use KataGo to recommend the next move at beginner, intermediate, or advanced playing strength. Use... It is an AI Agent Skill for Claude Code / OpenClaw, with 63 downloads so far.

How do I install Go Next Move Skill?

Run "/install go-next-move" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Go Next Move Skill free?

Yes, Go Next Move Skill is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Go Next Move Skill support?

Go Next Move Skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Go Next Move Skill?

It is built and maintained by imcaptor (@imcaptor); the current version is v0.0.4.

💬 Comments