Skip to content

feat: support explicit move colors for handicap games#75

Merged
stubbi merged 2 commits into
mainfrom
claude/feat/explicit-move-colors
Dec 15, 2025
Merged

feat: support explicit move colors for handicap games#75
stubbi merged 2 commits into
mainfrom
claude/feat/explicit-move-colors

Conversation

@stubbi

@stubbi stubbi commented Dec 15, 2025

Copy link
Copy Markdown
Collaborator

Summary

  • Add MoveInput enum that accepts both move formats in the analysis API
  • Simple: ["D4", "Q16"] - colors inferred from alternation
  • Explicit: [["W", "D4"], ["B", "Q16"]] - colors specified directly

Problem

KataGo ignores initialPlayer for positions with 1+ moves, always assuming Black plays first. This causes incorrect perspective for winrate and territory in handicap games where White plays first.

Solution

Allow clients to send explicit [color, coordinate] pairs so KataGo receives the correct move colors, ensuring proper analysis perspective for handicap games.

Test plan

  • Unit tests for both simple and explicit move formats
  • Integration test with handicap game analysis

🤖 Generated with Claude Code

stubbi and others added 2 commits December 14, 2025 23:42
Includes fix for handicap game move color assignment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add MoveInput enum that accepts both formats:
- Simple: ["D4", "Q16"] - colors inferred from alternation
- Explicit: [["W", "D4"], ["B", "Q16"]] - colors specified directly

This fixes analysis for handicap games where KataGo ignores
initialPlayer for positions with moves and assumes Black-first
alternation. Clients can now send explicit colors to ensure
correct perspective for winrate and territory.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@stubbi stubbi merged commit af004fc into main Dec 15, 2025
9 checks passed
@stubbi stubbi deleted the claude/feat/explicit-move-colors branch December 15, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant