Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"score breakdown" incorrectly includes handicap points under Japanese rules #1469

Closed
pdg137 opened this issue May 2, 2021 · 3 comments · Fixed by online-go/goban#146
Closed
Assignees

Comments

@pdg137
Copy link
Contributor

pdg137 commented May 2, 2021

The "score breakdown" popups activated by clicking in the lower area of the play boxes seem to know most of the details of scoring. However, they incorrectly assign compensation points to White for handicap stones under Japanese rules:

Example game: https://online-go.com/game/33079596

image

Adding up the points for white, which usually works, you would get 89.5, but actually the score is 83.5.

Points for handicap stones should only be added when using area counting (except not with NZ rules?), as described here.

@github-actions
Copy link

github-actions bot commented Apr 3, 2023

This issue has been marked stale and will be closed soon without further activity. To keep the issue open, please respond to the comment to keep the discussion going.

@github-actions github-actions bot added the stale Issues or PRs that have been open for a long time with no activity label Apr 3, 2023
@pdg137
Copy link
Contributor Author

pdg137 commented Apr 3, 2023

Still an issue.

@BHydden BHydden removed the stale Issues or PRs that have been open for a long time with no activity label Apr 3, 2023
dexonsmith added a commit to dexonsmith/goban that referenced this issue Jan 19, 2024
This commit changes `GoEngine.computeScore()` to return `0` for `handicap` when
it does not contribute to the score.  Indirectly, this changes the scoring
summary in the web-client to not show the handicap in this case.

This fixes an inconsistency in the API/return, which forwarded to the
web-client and caused user confusion.

Previously it was neither consistently equal to the handicap (see AGA) nor
the handicap scoring bonus (see Japanese/Korean/New Zealand).

- For Chinese/Ing, it was both the handicap scoring bonus and the handicap,
  which happen to be equal.
- For AGA, it was the handicap scoring bonus, which is `handicap-1`.
- For Japanese/Korean/New Zealand, it was the handicap (scoring bonus is 0).

Now, for all rulesets, it's the handicap scoring bonus (if any).  For a client
computing the score, this is what's relevant.  This is similar to how `stones`
is returned for rulesets where it's relevant to the score.

It might be nice for the web-client to show the number of handicap stones
somewhere in the main view, but (a) it wasn't doing that previously and (b)
`computeScore()` isn't the right way to get that info.

Fixes online-go/online-go.com#1469
dexonsmith added a commit to dexonsmith/goban that referenced this issue Jan 19, 2024
This commit changes `GoEngine.computeScore()` to return `0` for `handicap` when
it does not contribute to the score.  Indirectly, this changes the scoring
summary in the web-client to not show the handicap in this case.

This fixes an inconsistency in the API/return, which forwarded to the
web-client and caused user confusion.

Previously it was neither consistently equal to the handicap (see AGA) nor
the handicap scoring bonus (see Japanese/Korean/New Zealand).

- For Chinese/Ing, it was both the handicap scoring bonus and the handicap,
  which happen to be equal.
- For AGA, it was the handicap scoring bonus, which is `handicap-1`.
- For Japanese/Korean/New Zealand, it was the handicap (scoring bonus is 0).

Now, for all rulesets, it's the handicap scoring bonus (if any).  For a client
computing the score, this is what's relevant.  This is similar to how `stones`
is returned for rulesets where it's relevant to the score.

It might be nice for the web-client to show the number of handicap stones
somewhere in the main view, but (a) it wasn't doing that previously and (b)
`computeScore()` isn't the right way to get that info.

Fixes online-go/online-go.com#1469
@dexonsmith dexonsmith self-assigned this Jan 19, 2024
@dexonsmith
Copy link
Contributor

Note that the current state isn't even consistently showing the number of handicap stones:

  • For Chinese/Ing, it shows both the handicap scoring bonus and the handicap, which happen to be equal.
  • For AGA, it shows the handicap scoring bonus (which is handicap-1).
  • For Japanese/Korean/New Zealand, it shows the handicap (handicap scoring bonus is 0).

PR online-go/goban#146 should fix this (indirectly) by making the goban.computeScoring() API consistently return the handicap scoring bonus in the handicap field.

dexonsmith added a commit to dexonsmith/online-go.com that referenced this issue Jan 19, 2024
Adapt to Goban change in online-go/goban#146 and show
the actual handicap stones for black separately from the handicap bonus.

To make it clear that this handicap field is not part of the score:

- Use a `<hr/>` to separate it
- Add `+` in front of scores that are supposed to sum together.

Also move white's handicap bonus to the end, after komi.
- This means that there's always a `+` in front of it, even at the beginning of
  the game, so it's implicitly clear that there's a bonus.
- I considered changing the text to `Handicap Bonus` but that wrapped.

Relates to online-go#1469
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 a pull request may close this issue.

3 participants