It is currently Fri Oct 18, 2019 5:04 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2
Author Message
Offline
 Post subject: Re: Why isn't playing a move you want a bot to analyze obvio
Post #21 Posted: Tue Oct 08, 2019 4:15 am 
Honinbo

Posts: 8671
Liked others: 1488
Was liked: 1471
KGS: Kirby
Tygem: 커비라고해
About the komi advantage at the start of the game...

Usually, my goal in using LZ is not to see who is leading - it’s to see where I made mistakes in my game, and to see other strong options.

From this perspective, it is irrelevant who is leading at the start of the game, because it doesn’t give information about a mistake I have made - I haven’t played any moves, yet! What matters to me is interpreting later parts of the game where I can potentially find mistakes.

_________________
it's be happy, not achieve happiness


This post by Kirby was liked by: Bill Spight
Top
 Profile  
 
Offline
 Post subject: Re: Why isn't playing a move you want a bot to analyze obvio
Post #22 Posted: Tue Oct 08, 2019 5:34 am 
Lives in sente

Posts: 1180
Location: Earth
Liked others: 392
Was liked: 195
(You can always change the komi in the sgf file before analyzing if you like to.)

Top
 Profile  
 
Offline
 Post subject: Re: Why isn't playing a move you want a bot to analyze obvio
Post #23 Posted: Tue Oct 08, 2019 6:24 am 
Gosei
User avatar

Posts: 1386
Location: Ghent, Belgium
Liked others: 196
Was liked: 611
Rank: Bel 2d KGS 3d TG 4d
KGS: Artevelde
Tygem: Knotwilg
Kirby wrote:
About the komi advantage at the start of the game...

Usually, my goal in using LZ is not to see who is leading - it’s to see where I made mistakes in my game, and to see other strong options.

From this perspective, it is irrelevant who is leading at the start of the game, because it doesn’t give information about a mistake I have made - I haven’t played any moves, yet! What matters to me is interpreting later parts of the game where I can potentially find mistakes.


Sure, but I would find it pleasing if the game started with a 50-50 chance. It would increase my confidence in the differential analysis.

Top
 Profile  
 
Offline
 Post subject: Re: Why isn't playing a move you want a bot to analyze obvio
Post #24 Posted: Tue Oct 08, 2019 7:00 am 
Lives in gote

Posts: 630
Location: Austin, Texas, USA
Liked others: 45
Was liked: 209
Knotwilg wrote:
Kirby wrote:
About the komi advantage at the start of the game...

Usually, my goal in using LZ is not to see who is leading - it’s to see where I made mistakes in my game, and to see other strong options.

From this perspective, it is irrelevant who is leading at the start of the game, because it doesn’t give information about a mistake I have made - I haven’t played any moves, yet! What matters to me is interpreting later parts of the game where I can potentially find mistakes.


Sure, but I would find it pleasing if the game started with a 50-50 chance. It would increase my confidence in the differential analysis.


With KataGo (easy using LZ 0.7) set komi to 7.0, and it will say the game starts at close to 50-50.

Top
 Profile  
 
Offline
 Post subject: Re: Why isn't playing a move you want a bot to analyze obvio
Post #25 Posted: Tue Oct 08, 2019 7:54 am 
Honinbo

Posts: 8671
Liked others: 1488
Was liked: 1471
KGS: Kirby
Tygem: 커비라고해
Knotwilg wrote:
Kirby wrote:
About the komi advantage at the start of the game...

Usually, my goal in using LZ is not to see who is leading - it’s to see where I made mistakes in my game, and to see other strong options.

From this perspective, it is irrelevant who is leading at the start of the game, because it doesn’t give information about a mistake I have made - I haven’t played any moves, yet! What matters to me is interpreting later parts of the game where I can potentially find mistakes.


Sure, but I would find it pleasing if the game started with a 50-50 chance. It would increase my confidence in the differential analysis.



i think of it like a game theory problem where the expected payoff is negative.

for example, let's say you are going to play tic-tac-toe with your friend. if you win, you have to pay him $5. if you tie, you have to pay him $10, and if you lose you have to pay him $20. all situations are bad for you, but there is still an optimal way to play - if your goal is to end up with the most amount of money, you should aim to have minimal loss. (unless you say that the optimal strategy is to not play the game - in that case, just don't play go as black :-p)

i suppose that go is a zero-sum game, so you can argue that if it's a losing position, it doesn't matter what you play. but from that perspective, we don't really need win rates - we just need a binary value from LZ that says, "black is winning" or "white is winning". i think it's useful to have a more descriptive quantification of the amount of gain/loss.

i guess my conclusion is that if we accept that non-binary evaluation of board state in the form of percentages to be a useful form of analysis, looking for move recommendations that minimize loss, even from a losing position, is useful for identifying mistakes.

_________________
it's be happy, not achieve happiness

Top
 Profile  
 
Offline
 Post subject: Re: Why isn't playing a move you want a bot to analyze obvio
Post #26 Posted: Tue Oct 08, 2019 9:59 am 
Dies in gote

Posts: 56
Liked others: 0
Was liked: 15
Bill Spight wrote:
It's the first player, Black, who has the possible advantage as the skill level increases. So if anything, as bots get better we should see the estimated advantage for White decrease with the 7½ pt. komi.

Could you explain this? If 7.5 is too much (very likely) then W winrate will approach 100% as the level increase, won't it?

Top
 Profile  
 
Offline
 Post subject: Re: Why isn't playing a move you want a bot to analyze obvio
Post #27 Posted: Tue Oct 08, 2019 11:22 am 
Honinbo

Posts: 8898
Liked others: 2664
Was liked: 3023
jann wrote:
Bill Spight wrote:
It's the first player, Black, who has the possible advantage as the skill level increases. So if anything, as bots get better we should see the estimated advantage for White decrease with the 7½ pt. komi.

Could you explain this? If 7.5 is too much (very likely) then W winrate will approach 100% as the level increase, won't it?


I was not assuming that 7.5 komi is too much. If that is given, then indeed the White winrate will equal 100% with perfect play with 7.5 komi.

Uberdude wrote:
That such an advantage exists in games of a superhuman player doesn't mean a weaker player can make significant use of that advantage.


Assuming that both players are evenly matched, in general it is Black who is better able to make use of the advantage of the first move, so that the statistical komi generally increases with their skill level. Statistical komi might be 3.5 for DDKs, for instance. For Black to give 5.5 komi at that level may favor White. But 5.5 komi favors Black at the pro level. And if 7.5 komi favors White at the level of today's top bots, it surely favors White at the human level. That's what I should have said, instead of predicting what will happen as bots get stronger. That was speculation.

But there is no guarantee that, as bots get stronger, 7.5 komi will continue to favor White.

_________________
The Adkins Principle:

At some point, doesn't thinking have to go on?

— Winona Adkins

I think it's a great idea to talk during sex, as long as it's about snooker.

— Steve Davis

Top
 Profile  
 
Offline
 Post subject: Re: Why isn't playing a move you want a bot to analyze obvio
Post #28 Posted: Tue Oct 08, 2019 3:20 pm 
Dies with sente

Posts: 73
Location: Adelaide, South Australia
Liked others: 17
Was liked: 49
Rank: Australian 2 dan
GD Posts: 200
ez4u wrote:
Uberdude wrote:
Katago likes White with a winrate of about 55.3%. Now go into the Game menu at the top, click on Set gameinfo and set the komi to 6.5 instead of 7.5. Now katago likes Black with a winrate about 54.3%. So we are talking about nearly a 10% difference due to one point of komi.

These numbers are pretty much what I'd expect if seven points is the "correct" komi:
  • 44.7% of playouts end up with black 8 or more points ahead on the board, so a win for black with either komi.
  • 45.7% of playouts end up with black no more than 6 points ahead on the board, so a win for white with either komi.
  • 9.6% of playouts end up with black exactly 7 points ahead on the board, so could go either way depending on komi.
The third number being so small tells us that perfect play is still some way off.

Top
 Profile  
 
Offline
 Post subject: Re: Why isn't playing a move you want a bot to analyze obvio
Post #29 Posted: Tue Oct 08, 2019 7:16 pm 
Dies in gote

Posts: 39
Liked others: 1
Was liked: 17
Rank: 2 kyu
GD Posts: 109
Universal go server handle: EricBackus
xela wrote:
With modern computing power, there should be no problem rewiring an engine to give, say, 10 playouts to every legal move before going into the usual search strategy. You'd lose a bit of strength, especially in fast games, but it might improve things as an analysis tool?
I'm skeptical.

Does it really help to analyze every legal top-level move but not every legal response to those moves? You clearly don't want to force analysis of every response to every move at every level of the tree, because then you're just doing a brute-force search and you don't have anywhere close to the computing power you would need for that. But with only 10 playouts for each legal move, do you really get any kind of accurate estimate of the value of those moves?

But, of course, it is worth trying anyway just to see what happens.

Top
 Profile  
 
Offline
 Post subject: Re: Why isn't playing a move you want a bot to analyze obvio
Post #30 Posted: Tue Oct 08, 2019 11:56 pm 
Judan

Posts: 6119
Location: Cambridge, UK
Liked others: 350
Was liked: 3293
Rank: UK 4 dan
KGS: Uberdude 4d
OGS: Uberdude 7d
Here is a screenshot of LZ 247 network with the normal LZ engine pondering on the Takemiya reduction position form John's original thread after 100k playouts. Note that in Lizzie 0.7 I changed the default setting to show stats on all moves considered rather than the default threshold of only showing if they have at least 0.1 of the total playouts (n which case you get just a dull red circle). It is very single-minded and focuses almost all of its resources on further exploring the shoulder hit.

Attachment:
JF Takemiya reduce LZ.PNG
JF Takemiya reduce LZ.PNG [ 1.33 MiB | Viewed 162 times ]


And here is the same position using the LZ review mode engine which is modified to force LZ to consider more moves (from https://github.com/AncalagonX/leela-zer ... v0.16-next)
Quote:
First, 800 visits of unmodified search are performed like normal. Beyond 800 visits, LZ is only allowed to spend 25% of its total visits per second drilling down onto its standard preferred "most optimal" move(s). The remaining 75% of total visits are then split equally among a large number of other top move candidates.

Attachment:
JF Takemiya reduce LZ review.PNG
JF Takemiya reduce LZ review.PNG [ 1.32 MiB | Viewed 162 times ]

It didn't actually look at as many alternatives as I'd hoped: it worked better with older weaker networks that weren't so single minded. The 4 options reflects a hardcoded parameter of the modified engine, that could be increased if desired. But at least they have more playouts so have a better winrate estimate.

Also for completeness here is LZ247's view after I play Takemiya's gentler reduction, -6% over the shoulder hit. Interesting to note that even after the gentle reduction, it still ends up wanting to go in deep as black when white clamps the attachment of 2 in the principal variation (which only happens because it thinks white's knight response at o10 is a little better than Takemiya's opponent's block at o9, that seems to be because it thinks o10 has a good follow up at n8 if black tenuki, whilst o11 is easier to tenuki and leaves n11 as a good forcing move before Takemiya's m7).
Attachment:
JF Takemiya reduce LZ on Takemiya.PNG
JF Takemiya reduce LZ on Takemiya.PNG [ 1.22 MiB | Viewed 162 times ]


This post by Uberdude was liked by: Bill Spight
Top
 Profile  
 
Offline
 Post subject: Re: Why isn't playing a move you want a bot to analyze obvio
Post #31 Posted: Thu Oct 10, 2019 3:40 am 
Dies in gote

Posts: 40
Liked others: 1
Was liked: 7
Rank: 1d
Universal go server handle: iopq
Bill Spight wrote:
But there is no guarantee that, as bots get stronger, 7.5 komi will continue to favor White.


It might seem like a reasonable thing to say, but it's not.

I've trained a 9x9 bot and the white advantage with 7.5 on the first move only grows as the bot gets stronger. I can say fairly certainly that on 9x9 boards the correct komi is 7. We are much less certain about the correct komi on 19x19, but it's far more likely to be 7 than any other value (assuming Chinese counting). The real winrates of white are going up in Leela Zero as White is more able to keep the point advantage. Similarly, with 5.5 komi (if that was the one used in self-play) Black would have a growing winrate.

KataGo has a close to 50% win rate using 7 komi.

There's a lot of evidence pointing to 7 komi on 19x19 and none that may suggest otherwise. There's no guarantee the correct komi is 7, but that's the same as saying there is no guarantee the sun will shine tomorrow. Where is the proof otherwise?

Top
 Profile  
 
Offline
 Post subject: Re: Why isn't playing a move you want a bot to analyze obvio
Post #32 Posted: Thu Oct 10, 2019 4:43 am 
Dies with sente

Posts: 73
Location: Adelaide, South Australia
Liked others: 17
Was liked: 49
Rank: Australian 2 dan
GD Posts: 200
EricBackus wrote:
Does it really help to analyze every legal top-level move but not every legal response to those moves? You clearly don't want to force analysis of every response to every move at every level of the tree, because then you're just doing a brute-force search and you don't have anywhere close to the computing power you would need for that. But with only 10 playouts for each legal move, do you really get any kind of accurate estimate of the value of those moves?


My reasoning is that you don't need an accurate estimate, as the search works off error bounds rather than exact winrates. Consider:
  • Move A: the one that the bot would pick as the best move with a winrate of 52%
  • Move B: the "pro move" that the bot ignored, which if it were analysed would get a winrate of 51.5%
  • Move C: pretty hopeless
On ten visits for every move, you might find:
  • Move A: winrate looks like it's somewhere between 30% and 70%
  • Move B: winrate looks like it's between 28% and 71%
  • Move C: winrate looks like it's between 2% and 40%
Then moves A and B will both get a few extra playouts to refine the winrate estimate, but C won't. You end up being able to see an estimate for move B without the trouble of explicitly asking for it.

EricBackus wrote:
But, of course, it is worth trying anyway just to see what happens.

Done (for LZ). I feel like the apocryphal plumber: the code changes only took a few minutes, but it was more than an hour's work to figure out that I needed to change the UCTNode::uct_select_child function. This is a dodgy first cut: the number 10 is hard-coded. If I get some more spare time, I'll add a command line option to change the number of playouts. Of course this is all open source, so no reason why someone else couldn't pick it up and run with it.

Initial results look promising but not spectacular. Using LZ network 242, in the medium term (5,000-10,000 playouts) you see a wider range of moves, but then it converges on to what the unmodified LZ-242 would have done anyway. Using the "bubblesId" network packaged with Lizzie 0.7, there seems to be more variety. Over the weekend I'll play with some different positions and different networks, and post some examples here unless I get distracted by the next shiny thing.


This post by xela was liked by: Bill Spight
Top
 Profile  
 
Offline
 Post subject: Re: Why isn't playing a move you want a bot to analyze obvio
Post #33 Posted: Thu Oct 10, 2019 6:18 am 
Honinbo

Posts: 8898
Liked others: 2664
Was liked: 3023
xela wrote:
My reasoning is that you don't need an accurate estimate, as the search works off error bounds rather than exact winrates. Consider:
  • Move A: the one that the bot would pick as the best move with a winrate of 52%
  • Move B: the "pro move" that the bot ignored, which if it were analysed would get a winrate of 51.5%
  • Move C: pretty hopeless
On ten visits for every move, you might find:
  • Move A: winrate looks like it's somewhere between 30% and 70%
  • Move B: winrate looks like it's between 28% and 71%
  • Move C: winrate looks like it's between 2% and 40%
Then moves A and B will both get a few extra playouts to refine the winrate estimate, but C won't. You end up being able to see an estimate for move B without the trouble of explicitly asking for it.

EricBackus wrote:
But, of course, it is worth trying anyway just to see what happens.

Done (for LZ). I feel like the apocryphal plumber: the code changes only took a few minutes, but it was more than an hour's work to figure out that I needed to change the UCTNode::uct_select_child function. This is a dodgy first cut: the number 10 is hard-coded. If I get some more spare time, I'll add a command line option to change the number of playouts. Of course this is all open source, so no reason why someone else couldn't pick it up and run with it.

Initial results look promising but not spectacular. Using LZ network 242, in the medium term (5,000-10,000 playouts) you see a wider range of moves, but then it converges on to what the unmodified LZ-242 would have done anyway. Using the "bubblesId" network packaged with Lizzie 0.7, there seems to be more variety. Over the weekend I'll play with some different positions and different networks, and post some examples here unless I get distracted by the next shiny thing.


Analysis, particularly if the analyst focuses on only a few key moves instead of trying to analyze the whole game at once, can be too slow for actually playing a game. I would be willing, in certain cases, to spend 36k playouts on the first pass (100 on each of 360 moves) to discover playable moves, even possibly a "best" move that the bot would otherwise have overlooked.

_________________
The Adkins Principle:

At some point, doesn't thinking have to go on?

— Winona Adkins

I think it's a great idea to talk during sex, as long as it's about snooker.

— Steve Davis

Top
 Profile  
 
Offline
 Post subject: Re: Why isn't playing a move you want a bot to analyze obvio
Post #34 Posted: Fri Oct 11, 2019 6:07 am 
Dies with sente

Posts: 73
Location: Adelaide, South Australia
Liked others: 17
Was liked: 49
Rank: Australian 2 dan
GD Posts: 200
Bill Spight wrote:
Analysis, particularly if the analyst focuses on only a few key moves instead of trying to analyze the whole game at once, can be too slow for actually playing a game. I would be willing, in certain cases, to spend 36k playouts on the first pass (100 on each of 360 moves) to discover playable moves, even possibly a "best" move that the bot would otherwise have overlooked.

OK, I've modified my code so that you can use different numbers of playouts. And I've had a go at making a Windows binary so that other people can more easily play with this -- although I'm not sure if this will work, as I'm used to doing this sort of thing on linux instead. Download from here. During the next day or three I might start a new thread to post some screen shots of results so far.


This post by xela was liked by: Bill Spight
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group