KataGo rules bug - and seeking help/sanity check

For discussing go rule sets and rule theory
pgwq
Dies with sente
Posts: 119
Joined: Sat Nov 14, 2020 1:23 pm
GD Posts: 0
Has thanked: 21 times
Been thanked: 22 times

Re: KataGo rules bug - and seeking help/sanity check

Post by pgwq »

RobertJasiek wrote:
pgwq wrote:3. We should avoid the problem of last dame's profit caused by 1
Why do you perceive it as a problem?
If the above conditions are met, then the Japanese rule is more logical and self consistent.
How to meet above conditions without introducing pass-fights?

If rulesets A and B are logical, then one of them is not more logical than the other. Therefore, even if made logical, Japanese rules cannot be MORE logical than other rules.

Self-consistency of go rules needs context. What shall we perceive as self-consistent? Under which axioms? One possible characteristic of self-consistency is absence of exceptions. To start with the most fundamental exception in Japanese rulesets, they have different rules for moves before and after the game end. Therefore, they can never be self-consistent. Sakai Takeshi, J1989 co-author, has understood this so defends them having flaws as fulfilling Yin and Yang;) Japanese rules may conform to Japanese tradition but such consistent, sic, culture is not self-consistency of the rules themselves.
First, because the people in Tang & Song Dynasties think that the last dame's profit is a problem.It is unfair.

Second, current Japanese rules is not logical and self consistent.
if amend by above mentioned 1/2/3, Japanese rules will logical and self consistent a bit.

(If the above conditions are met, then the Japanese rule is more logical and self consistent. <<<< It is a mistake of translation software.)

You are right and smart. "they have different rules for moves before and after the game end."
Very good! Good job.
Because Japanese rules tamper with the rules of the Tang and Song dynasties.
Zhang-hu 章浒
Committed to the restoration Chinese traditional Weiqi
Research on ancient Weiqi rules & Classic (Dunhuang Classic and the Thirteen Chapters Classic)
From Suzhou, Jiangsu Province, China
RobertJasiek
Judan
Posts: 6272
Joined: Tue Apr 27, 2010 8:54 pm
GD Posts: 0
Been thanked: 797 times
Contact:

Re: KataGo rules bug - and seeking help/sanity check

Post by RobertJasiek »

The last dame is as fair or unfair as the last ko threat etc. Without planning, it comes as a random gift to a player. With planning, a player works to get it.
lightvector
Lives in sente
Posts: 759
Joined: Sat Jun 19, 2010 10:11 pm
Rank: maybe 2d
GD Posts: 0
Has thanked: 114 times
Been thanked: 916 times

Re: KataGo rules bug - and seeking help/sanity check

Post by lightvector »

Harleqin wrote:Do you have a test suite with that list, lightvector?
1. Simple ko: A player cannot gain an extra point by trying to leave the ko mouth open, even if they have many ko threats on the board.
2. Bent 4 in corner: Dead even if there are unremovable ko threats on the board.
3. Regions surrounded by one side only in seki: Do not count as territory.
4. Seki one-sided dame: One-sided dame will not result in gains to the player able to fill them.
5. Two-step ko: Defender does not need to lose an extra point defending if they have enough ko threats. (Life-and-Death Example 10 in https://www.cs.cmu.edu/~wjh/go/rules/Japanese.html)
6. Double ko seki: Should resolve as a seki, through all cleanup phases.
7. Moonshine life: The false eye group will die, regardless of the presence of the double ko seki.
8. Double ko death: Should resolve as a death, without the player having to lose a point for defending an extra time. (*** this is what we're trying to address with the patch ***)
9. Matti's double-ko+chained-ko (viewtopic.php?p=251373#p251373) Should resolve as a seki.
10. Matti's triple-chained-ko-death (viewtopic.php?p=251327#p251327) Should resolve as a death, without the player having to lose a point for defending an extra time. (*** and this ***)
11. Life-and-Death Example 14 in https://www.cs.cmu.edu/~wjh/go/rules/Japanese.html - white must lose the point for an extra play, in agreement with the commentary, and there is no way to avoid this with a pass fight.
12. A lot of "compound" positions resolve the way that Japanese pro intuition wants them to resolve, for example Life-and-Death Example 16,17,18,... in https://www.cs.cmu.edu/~wjh/go/rules/Japanese.html are all in agreement as far as I can tell.
13. I am not aware of any pass fights at all right now. Maybe one exists, but the mechanism I know of that could normally cause it (such as the one I mentioned in a post above) doesn't seem to pose a problem here.
1. No because this happens often enough in ordinary play that it should be easily noticeable if this was wrong - and it's pretty easy to reason out from the rules directly how this behaves.
2. (bent4incorner.sgf) three positive examples, one negative example. (bent4incornerwithseki.sgf) black can win under area scoring rules, due to the seki ko threat, although KataGo' neural net has trouble with it, territory white easily wins)
3. (sekitest.sgf) - should be a draw
Attachments
bent4incornerwithseki.sgf
(770 Bytes) Downloaded 628 times
sekitest.sgf
(384 Bytes) Downloaded 638 times
bent4incorner.sgf
(712 Bytes) Downloaded 640 times
lightvector
Lives in sente
Posts: 759
Joined: Sat Jun 19, 2010 10:11 pm
Rank: maybe 2d
GD Posts: 0
Has thanked: 114 times
Been thanked: 916 times

Re: KataGo rules bug - and seeking help/sanity check

Post by lightvector »

4. (sekitest3.sgf) - white+0.5 chinese, black+1.5 japanese due to one-sided seki dame.
5. (approachko.sgf) - black wins by 0.5. If black needed to defend, black would lose by 0.5.
6. (doublekoseki.sgf) - should be a draw
Attachments
doublekoseki.sgf
(1.1 KiB) Downloaded 656 times
sekitest3.sgf
(1.29 KiB) Downloaded 611 times
approachko.sgf
(506 Bytes) Downloaded 627 times
lightvector
Lives in sente
Posts: 759
Joined: Sat Jun 19, 2010 10:11 pm
Rank: maybe 2d
GD Posts: 0
Has thanked: 114 times
Been thanked: 916 times

Re: KataGo rules bug - and seeking help/sanity check

Post by lightvector »

7. (moonshine.sgf) - should be black win, obviously it would be a massive white win if white could survive.
8. (doublekodeath.sgf) - we can see the issue here since of course the patch is not made yet, and the neural nets not retrained with that patch.
9. (multikoseki.sgf) - Actually I didn't have a test case for this one before now, and upon making it it looks like there's a clever order to capture and recapture the kos and pass for kos to destabilize it in cleanup. Cool! It doesn't seem intuitively obvious to me that this result is anomalous though upon seeing the sequence, it's at least a natural consequence of simply how the altered ko rule works along with Spight-style once-only rule. Maybe the whole thing is moot anyways though, since KataGo wants to play it as a endless cycle (void-game, like triple ko) during regular play.
Attachments
multikoseki.sgf
(469 Bytes) Downloaded 633 times
doublekodeath.sgf
(449 Bytes) Downloaded 638 times
moonshine.sgf
(517 Bytes) Downloaded 666 times
lightvector
Lives in sente
Posts: 759
Joined: Sat Jun 19, 2010 10:11 pm
Rank: maybe 2d
GD Posts: 0
Has thanked: 114 times
Been thanked: 916 times

Re: KataGo rules bug - and seeking help/sanity check

Post by lightvector »

10. (chainedkodeath.sgf) - Again you'll see KataGo has problems on this one since this is what the patch is trying to fix. I spent some time now hacking KataGo's neural net to manually suggest the correct moves for white with a candidate version with the rules patch, and it evaluates correctly now if you give it enough playouts. So I think that's promising. Also the hack works for a basic double ko death too, so the main question in my mind would be now if there are any bad side effects, since the patch seems to solve the intended cases as intended now.

11. (nopassfight.sgf) - Seems correct. White loses by 0.5, but would win by 0.5 if they could get away with not defending on the top. White has plenty of huge ko threats.

12. I don't have specific tests for these, except for having worked through them by hand with the rules.

13. Hard to have tests to show the nonexistence of a thing, but at least case 11 should demo that the pass fight that should exist under Spight Japanese style rules does not exist for KataGo rules.
Attachments
nopassfight.sgf
(1.13 KiB) Downloaded 441 times
chainedkodeath.sgf
(449 Bytes) Downloaded 426 times
Post Reply