Comments (20)
In a QQ group, N.O.V.A. proposed that group tax could be implemented as an alternative rule in the KataGo engine/NN. This rule is in the "original" rule of Go and was in use in China even during the Qing dynasty before the back-influence from Japan (Dohei Takabe, 1909, reference). The idea is that only stones on the board count towards the player's score). Since a group needs to eyes to live which can't be filled, if a group of yours is split into two you effectively loses two points. This rule likely contributed to the combative style in ancient Chinese Go, and likely reduces the favorability of 3-3 invasions.
It would be a great addition to your engine: no AI to this date, even the polymath Golaxy, claims to support analysis under this rule, though it's pretty in demand to analyze ancient games and determine the level of play. An inconvenience is that one now needs to fill in all except two points in each of one's area to get the accurate score (with normal Tromp-Taylor rules you just need to remove the opponent's dead stones), especially in your setting, where all games are not resigned, but since you already have Benson's algorithm implemented to determine live groups and remove dead stones, it shouldn't take much more time to train under this rule. Hope to see this in a future run!
from katago.
I'm N.O.V.A. in the QQ group for Leela (Zero). Thanks for introducing the Group Tax, one of the simplified prejudgment scoring methods for the original rule of Go in Ancient China, in English.@alreadydone
To make a long story short, the original rule of Go only count stones alive in the end of games. Group Tax are equivalent to the original rule, and it's a simplification scoring method used during the Ming and Qing dynasty. Each group alive should remain two eyes, these eyes are not scored.
There are two benefits to implement this rule in KataGo.
The one @alreadydone mentioned is that no NN AI engine nowadays supports the rule, but Chinese amateurs are dying to analysis Chinese ancient games. And the rule are still used by some Chinese amateurs in matches.
The other one is that the original rule of Go is simpler, more convenient and more elegant mathamatically compared with the current Chinese rule. With Group Tax, the Tromp-Taylor scoring rules can be also simplified, since the score is just counting stones remain on the board in the end of games.
Thanks a lot. @lightvector
from katago.
Re: simplicity
Arguably no-pass Go (the first player without legal moves loses) has the simplest rule, but it's a very different game than the Go we play today. The next simplest rule is probably Tromp-Taylor with group tax, or more correctly, TT rules without counting empty points that only reach one player's color. Miraculously, this rule is mostly equivalent to no-pass Go with prisoner return which is also super simple mathematically and fits combinatorial game theory naturally.
By the way, @hzyhhzy has trained nets to play no-pass Go (without prisoner return) (7x7 IIRC) with modified LZ engine. (Edit: what he trained was acutally first-capture Go, another simple variant with very different play (likely simpler in this case).)
from katago.
Just do not let be persuaded to move to a huge net like 40 blocks or more. It would kill your project.
from katago.
Hi @alreadydone - thanks. Yes, I'm aware that he was a researcher at DeepMind, that was presumably why he was one of the individuals able to clarify things ambiguous in the publication.
Yes, a square root is missing there, I will correct that shortly along with a few other minor errors and typos that have been discovered. Thanks for pointing it out!
I have not done a detailed investigation of komi on even boards, but once you get the code working, you're very welcome to investigate! :)
It would be hard to extend my code to handle disjoint unions of boards, but rectangular boards would be straightforward, I might do that in a future run. Almost all of the code is theoretically written to support rectangular size, just some of the highest-level parts are not, in part because for some strange reason neither GTP nor SGF files have any support for it?
from katago.
You need to adjust this in src/config.h
/*
* BOARD_SIZE: Define size of the board to compile Leela with, must be an odd
number due to winograd tiles
*/
static constexpr auto BOARD_SIZE = 19;
from katago.
I could run a test versus 13x13. Do you need to do something special when compiling for LZ to play on 13x13, or does it work out of the box if you just give it the adjusted network?
from katago.
Though unlikely to happen in real play, there actually exist positions, under the situational/positional superko rules, in which one side must fill in all (but one) of the eyes in a pass-alive group (to be captured by the opponent) in order to win. An example is presented in https://tieba.baidu.com/p/1287975900.
from katago.
Yep. You can make much simpler positions too that have this property, see https://senseis.xmp.net/?1EyeFlaw. (variations on 1 eye flaw are easy ways to construct these). The training I implemented I believe makes no assumptions about this, although probably the neural net wouldn't get it right anyways given that they already fail on much simpler things.
But it is always safe to assume that your pass-alive groups and their single-eye-points - and, if the rules let you claim opponent stones that are pass-dead as pass-dead without physically capturing them during normal play, also your pass-alive territories that are larger than single eyes - together give a lower bound on your score under optimal play, even if you might choose to sacrifice them to do better.
You can also construct rules beast positions where it's not possible or not desirable to capture stones that are pass-dead and remove them from the board due to superko considerations, so even though they are surrounded by pass alive groups and themselves being pass-dead can never even possibly become "alive". Under Tromp-Taylor, you would then have to leave them uncaptured, unable to claim the points for killing them, which maybe could prevent you from winning. I've mostly chosen to ignore this issue, since it's not as if Tromp-Taylor is a standard ruleset that human games use in practice either. I imagine if such a situation occurred in a real and/or important game, the rules argumentation would be very interesting.
from katago.
@alreadydone
LZ converted weights work quite well. On 13x13, it's about 140 Elo stronger than KataGo when both have 1600 visits, with a winloss record of 563 - 255 in the test match I did.
The converted weights are still 40 block and 256 channels, right? If I multiply KataGo visits by 4 up to 6400, still using 15 blocks 192 channels, then it looks like a pretty even matchup. In that case, they're almost equal in strength based on the test run I did. KataGo winning 309-291.
from katago.
@lightvector Thanks for doing the tests! Congrats for KataGo winning the time-parity test despite being trained with much less resource!
from katago.
Games attached, in case anyone's curious.
lz-v-kata13x13-1600.txt
lz-v-kata13x13-1600-4800.txt
from katago.
These contain invalid moves in the SGF: if LZ fills its own territory as Black, there are W[tt] nodes from KataGo.
from katago.
Why are W[tt] nodes invalid? I agree this is a pretty ugly way to indicate a pass compared to W[], but they're part of the SGF specification and this notation does seem to be the one that gomill library produces by default, which is the GTP controller library I downloaded to run the matches.
from katago.
I looked at it again, and it seems [tt] is an FF[3] thing, retained for compatibility in FF[4]. I just hadn't encountered this before and thus q5go currently doesn't handle it well.
I still think it would be better not to do this - what happens on larger boards, does it use the [] syntax?
from katago.
I don't know. I didn't write Gomill! :)
Maybe talk to the author of the library? Looks like there's a contact address at the bottom of this page: https://mjw.woodcraft.me.uk/gomill/ and also a Github here https://github.com/mattheww/gomill/
from katago.
You'll probably encounter this elsewhere too, I'm surprised you haven't yet. Some of the tests for LZ or MiniGo I think I've heard people using "ringmaster" in some cases, which is also a script from the Gomill library.
from katago.
Going ahead and closing this issue, as it seems everything here is handled. Wheee. :)
edit: (And it is on my long-term todo list to investigate group-tax rules, but it's not quite as urgent as a lot of other things, so it might be some time)
from katago.
The paper is (still) missing footnote 33, which I suspect would have covered what combination of z and Q to train the value prediction on (like what's in LeelaChessZero/lc0#84 (comment)).
from katago.
Thanks for pointing that out. There is no missing footnote at all, it's just a numbering issue. I'm not using Q at all either, I would absolutely have mentioned that as a section in the paper if I did since that would be a big difference from any other prior bot (AZ, ELF, LZ, etc).
from katago.
Related Issues (20)
- Train a weight‘s weight, to predict the value of the next Katago weight HOT 3
- How to use Katago 1.14.1 with time cache? HOT 1
- Issue in training: low visit counts and strange initial conditions(board dimensions, komi settings, piece position) HOT 2
- kata-genmove_analyze with KEYVALUEPAIR not working HOT 1
- A problem building for CUDA HOT 2
- Why does lc0 ship cuda dlls with engine but katago doesn't?
- Minor document questions
- Error checks for kata-raw-human-nn HOT 1
- How to set rules to "twisted cross and eating" for beginner HOT 2
- Throwback HOT 3
- Lack of ability HOT 3
- Katago cannot give a definitive answer for the best move. HOT 2
- Report an error HOT 3
- allowResignation affects humanSL strength?? HOT 4
- Loose ladder
- katago 1.15.1 build failure HOT 1
- Do you have a plan to create a GUI? HOT 4
- kata-analyze reports a non-human-like move for the preaz_20k human profile HOT 1
- Evaluate the value of moves HOT 2
- KataGo works with old libssl versions only HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from katago.