/install go-next-move
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:
- Convert a board photo into a 19x19 position.
- Ask the user or infer who is to move when possible.
- Send the position to KataGo using Chinese rules and a fixed visit budget.
- Return a recommended move matched to the requested playing-strength level.
- 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:
XorB: black stoneOorW: white stone.: empty point
The script returns JSON containing:
board_asciirecommendationreasonrecommendations_by_levelcandidate_movesroot_info- optional
result_imagewhen--result-imageis passed - default
source_result_imagefor photo input, or optionalsource_result_imagewhen--source-result-imageis passed explicitly - optional
recognitionmetadata 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:
- The recommended coordinate.
- The generated
source_result_imagefor photo input, orresult_imagefor ASCII input. - Why this move was chosen, using
reason.summaryplus the bullet-like items inreason.explanation. - Technical parameters from
reason.technical_parameters, especially winrate, score lead, visits, score loss vs best, and PV. - Candidate comparison from
reason.comparison_candidateswhen there are meaningful alternatives. - The
recognition.source_overlayimage when available. - 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.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install go-next-move - 安装完成后,直接呼叫该 Skill 的名称或使用
/go-next-move触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 63 次。
如何安装 Go Next Move Skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install go-next-move」即可一键安装,无需额外配置。
Go Next Move Skill 是免费的吗?
是的,Go Next Move Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Go Next Move Skill 支持哪些平台?
Go Next Move Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Go Next Move Skill?
由 imcaptor(@imcaptor)开发并维护,当前版本 v0.0.4。