Skip to content

fix: use correct player color for moves in handicap games#74

Merged
stubbi merged 2 commits into
mainfrom
fix/handicap-initial-stones
Dec 14, 2025
Merged

fix: use correct player color for moves in handicap games#74
stubbi merged 2 commits into
mainfrom
fix/handicap-initial-stones

Conversation

@stubbi

@stubbi stubbi commented Dec 14, 2025

Copy link
Copy Markdown
Collaborator

Summary

  • In handicap games, White plays first (after Black's handicap stones are placed)
  • The move color assignment was always starting with Black, causing analysis to be from the wrong perspective
  • Now detects handicap games (when initial_stones is present) and starts moves with White
  • Also supports explicit initial_player parameter

Impact

This fixes the territory/score/winrate inversion bug in handicap games. Previously, analysis for positions after move 1 in handicap games would have the wrong perspective, showing Black as losing when Black should be winning.

🤖 Generated with Claude Code

stubbi and others added 2 commits December 14, 2025 17:57
Pass through the initialStones field from API requests to KataGo,
enabling proper analysis of handicap games where black stones are
pre-placed on the board.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
In handicap games, White plays first (after Black's handicap stones are
placed). The move color assignment was always starting with Black,
causing analysis to be from the wrong perspective.

Now detects handicap games (when initial_stones is present) and starts
moves with White. Also supports explicit initial_player parameter.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@stubbi stubbi merged commit 1064d63 into main Dec 14, 2025
4 checks passed
@stubbi stubbi deleted the fix/handicap-initial-stones branch December 14, 2025 21:15
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