Page 2 of 2

Re: KataGo (40x384) 23689108 playouts

Posted: Wed Aug 12, 2020 6:26 am
by lightvector
goame wrote: I see now when I click i in Lizzie, then there is komi 7.5, so the result above is done with 7.5 komi.
When I change the komi to 6.5 or another one and click ok, then it doesn't work. I see it is clicked correctly a little blue button for a moment but this little window won't close...???
I can't do other thinks and need to click the red button with x but then the komi is not saved.
I have no idea, that sounds really weird. Some sort of GUI bug in Lizzie?
goame wrote: How to change the rules from Chinese to Japanese or other in Lizzie?
Lizzie has no support for changing rules on its own, therefore you need to apply a workaround:
https://github.com/lightvector/KataGo#other-questions
goame wrote: With opening symmetry reduction KataGo will be ~4x faster than some slower KataGos.
It could be that the faster KataGo with opening symmetry reduction wins every time when this improvement works in the opening between 25% and 100% or a stone.
After the first 4 symmetry moves KataGo would be 1 stone or even up to 4 stones better.
It's like changing the komi from 7.5 to 6.5 or from 7.5 to 3.5.
And after the symmetry KataGo will have much more playouts and play with his move for example with 24 million playouts compared to the KataGo opponent with 6 million playouts.
I think you are off here. As far as I can tell, opening symmetry reduction should be almost worthless for practical playing strength. If the game opens on a 3-4 point, then symmetry is broken on move 1 and stays broken. If it opens on all 4-4s, then symmetry is broken on move 5 when the first 3-3 invasion happens and usually stays broken. After that, there is no difference in the efficiency of search. If a typical game lasts 250 moves, this means we get a speedup on 1-2% of the moves of the game, so that's roughly similar to speeding up the overall bot by 1%-2%... which is negligible. There are waaaay better things to work on than a whole bunch of code complexity for such a tiny gain.

Relatively speaking, the game is usually won or lost in the range from around move 8 to the macroendgame. The very early opening and the microendgame probably don't benefit as much from deeper search, the former because you don't need deeper search to play a 4-4 point or a 3-4 point or to start a 3-3 invasion that you would have played anyways, and the microendgame because often the game is already decided and if not, bots are very good at the microendgame already and with enough playouts will often be searching deep enough to solve it, past which you get quickly diminishing returns for more search.

So if one were to implement more fancy time management (which *would* be worth doing and would be worth a lot more than 1-2%), in addition to a lot of other important heuristics about choosing how long to search, one would probably greatly downweight the time spent on the first several moves of the game. Which means the gain from symmetry would be even less than 1% - you're getting a speedup on the moves that you would spend less than 1% of your time on anyways.

The idea that a bot is going to find a variation that is up to 4 points better by move 5 is silly. (By current top bot standards. obviously in theory we can't prove that something crazy doesn't happen with optimal play, but even if so, as far as practical statistics by real bots at their current level of play, there is no sign that these opening moves differ by more than tiny fractions of a point on average).

You might ask - how about 9x9, where the game is shorter and the first few moves actually matter a huge amount? Actually there I think symmetries are still worthless too. Because if you really care about optimizing 9x9, forget about searching the first few moves in real time, you should just build an opening book... and by the time you get out of book almost always you'll have broken symmetry.

Re: KataGo (40x384) 23689108 playouts

Posted: Wed Aug 12, 2020 6:44 am
by lightvector
Bill Spight wrote:
lightvector wrote:I'm not going to implement opening symmetry reduction in KataGo - it causes a lot of additional code complexity and even the potential for artificial training bias for almost no practical gain for real games. Especially when you can capture a lot of this gain via a simple workaround:

If you want to save a factor of 4 or 8, then just play the first move manually to break the symmetry. Play the 4-4 point manually, and do the search on the position after that, and then play the 3-4 point manually, and do the search on the position after that, and record those results.
Just curious. I have wondered about the utility of dictating a few opening plays for training purposes. For instance, even nirensei vs. nirensei will break rotational symmetry. And doing so might be a way of increasing exploration without jiggering the code. Does that make sense?
As I mentioned above, one should almost completely neglect breaking symmetry as any reason for choosing anything. But as far as forcing openings to increase exploration - yes, that's a good idea. Except for the fact that it's made redundant by even better ideas. ;-)

Namely: if you're willing to go as far as manually dictating openings, you might as well go further - just take a lot of historical pro and amateur games and play starting from randomly sampled positions from those games. If you wish, you can weight the sampling more heavily towards the opening instead of later in the game. You'll see a huge variety of openings, more than anything you could reasonably input manually. KataGo did this for the last phase of its training, when it departed from its "semi-zero" status. It didn't seem to help with raw playing strength, but I like to hope that it improved KataGo's evaluation quality slightly on the kinds of positions that occur in human games that might not always follow purely bot-favored lines, positions which humans still care about good evaluation quality for teaching and analysis.

Also even prior to departing "semi-zero", KataGo used high entropy in the first few moves of the game in self-play (often playing them via raw policy with no search), and occasionally used a technique where the game was initialized by picking a random early move (like move 1, or move 3, or move 10) and forcing the next stone to be played on the best of a random N possible places, for small N. So in some tiny percentage of games you get an opening move on the 5-5 point, or the 3-7 point, or some crazy center move, or whatever, because the N random spots didn't include any of the 4-4, 4-3, 3-3 points. This was also intended to ensure there was a little bit of training data on handling very unusual opening configurations.

Re: KataGo (40x384) 23689108 playouts

Posted: Wed Aug 12, 2020 7:35 am
by RobertJasiek
"bots are very good at the microendgame"

How do you know? Do they apply endgame theory correctly? Have you verified this?

Re: KataGo (40x384) 23689108 playouts

Posted: Wed Aug 12, 2020 7:43 am
by Bill Spight
lightvector wrote:Namely: if you're willing to go as far as manually dictating openings, you might as well go further - just take a lot of historical pro and amateur games and play starting from randomly sampled positions from those games. If you wish, you can weight the sampling more heavily towards the opening instead of later in the game. You'll see a huge variety of openings, more than anything you could reasonably input manually. KataGo did this for the last phase of its training, when it departed from its "semi-zero" status. It didn't seem to help with raw playing strength, but I like to hope that it improved KataGo's evaluation quality slightly on the kinds of positions that occur in human games that might not always follow purely bot-favored lines, positions which humans still care about good evaluation quality for teaching and analysis.
(Emphasis mine.)

Thanks. My main emphasis is on the use of bots for tools to assist human understanding. OC, right now top humans have their hands full learning to imitate bots, but in 10 or 15 years we will have pros who not only play more like bots but who will be able to explain their own thinking. :)

Re: KataGo (40x384) 23689108 playouts

Posted: Wed Aug 12, 2020 8:43 am
by Bill Spight
RobertJasiek wrote:"bots are very good at the microendgame"

How do you know? Do they apply endgame theory correctly? Have you verified this?
Depends on what you think is very good. Here is a game position from over 1,000 years ago, GoGoD 1150C&IP01, edited by me. I switched colors and added a comment at move 228. It was played under ancient Chinese rules with territory scoring and a group tax. White played first. Black won by 1 pt., but I discovered, in a few minutes, how White could get jigo in the microendgame. AFAICT, I am the first to have discovered that in all the time the game record has been available. However, I have the advantage of having studied mathematical go. :)

With the switched colors and the fact that each side has three groups, Black to play can win after W228 under modern area scoring with zero komi. :) I expect that KataGo can find a correct line of play in a few seconds, but I don't know about other bots.