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

Handicap games need special gtp commands #409

Closed
lemonsqueeze opened this issue Jun 10, 2018 · 20 comments
Closed

Handicap games need special gtp commands #409

lemonsqueeze opened this issue Jun 10, 2018 · 20 comments

Comments

@lemonsqueeze
Copy link

Hi,
Following up on pasky/pachi#82, it seems sabaki is sending handicap stones as play b commands instead of using dedicated gtp commands, so engines are mislead into thinking it's an even game. Pachi resigns high handicap games when playing through sabaki right now because of this.

For chinese rules set_free_handicap / place_free_handicap command should be used to send/get handicap stones. Or just fixed_handicap with japanese rules.

gtp2ogs had the same issue some time ago, could check online-go/gtp2ogs#65 for details.

@lemonsqueeze
Copy link
Author

Thanks, that was fast !
Just tried latest master with d755f2b, looks like it's still resigning though,
getting play b commands like before. Or did i miss something ?

@yishn
Copy link
Member

yishn commented Jun 10, 2018

Hmm... Did you check the GTP console to see if Sabaki was sending the right commands?

@lemonsqueeze
Copy link
Author

Yes, looking at pachi's log actually. This is the commands i'm seeing for an 8-stones game:

boardsize 19
clear_board
play B D16
play B D10
play B D4
play B K16
play B K4
play B Q16
play B Q10
play B Q4
genmove W

@yishn
Copy link
Member

yishn commented Jun 10, 2018

How did you create the game? When I create an 8-stone handicap game in Sabaki and attach an engine, Sabaki sends the following commands:

name
version
protocol_version
list_commands
komi 7.5
clear_board
set_free_handicap D10 D16 D4 K16 K4 Q10 Q16 Q4
genmove W

@lemonsqueeze
Copy link
Author

Something weird going on then, i did:
Alt->File->New, (Don't save), then setup game and click ok.

@rooklift
Copy link
Contributor

Works for me (albeit I don't have Pachi to try it with).

@lemonsqueeze
Copy link
Author

Wait, do i have to npm update or something to pick up the changes ?

@rooklift
Copy link
Contributor

Yeah I think you'll need npm install and npm run build (it used to be that one could run electron . but that doesn't seem to work now...)

@lemonsqueeze
Copy link
Author

Ok, working now, yay.
Basic npm commands in README would be helpful for those of us that are hopelessly unfamiliar with it =)

@yishn
Copy link
Member

yishn commented Jun 10, 2018

For future reference, the README refers to the documentation in section 'Building & Testing'. You can find a list of available npm run commands there. Basically, it suffices to run:

$ npm run watch
$ npm start

That said, npm start is just electron . and it's working fine on my machine, @fohristiwhirl what specifically isn't working on your end?

@rooklift
Copy link
Contributor

electron . or npm start just hangs for me with no output in the console. (Electron is a bit useless if something stops it from working, I've found previously. I can't say exactly what the problem is.)

@rooklift
Copy link
Contributor

Uh, I upgraded Electron and now npm start seems to work though electron ./ doesn't. Odd.

@rooklift
Copy link
Contributor

Arg! The upgrade hadn't taken me to Electron 2. Having fixed that, now it works properly.

@omidmnz
Copy link

omidmnz commented Nov 8, 2018

This issue was fixed in version 0.35, but I just upgraded to version 0.40 and the issue seems to be back. Can anyone confirm?

@rooklift
Copy link
Contributor

rooklift commented Nov 8, 2018

Tried just now, it used set_free_handicap D16 D4 K10 Q16 Q4 for an H5 game.

@omidmnz
Copy link

omidmnz commented Nov 8, 2018

Thank you.
I tried building 0.40.1, which has the same problem for me. I guessed it might be a cache issue, but the problems persists using the AppImage too.
But I'm still guessing this is a cache issue or something. I just tried removing the configuration directory, but it didn't help. It still plays all the handicap stones.
Any ideas what to look for next?

@rooklift
Copy link
Contributor

rooklift commented Nov 8, 2018

Actually - the behaviour seems to differ based on how play is started.

With preference "start game right after attaching" OFF, the set_free_handicap command is used.

But with that preference set to ON, the play command is used instead.

@yishn
Copy link
Member

yishn commented Nov 8, 2018

@fohristiwhirl Unfortunately, I can't reproduce this behavior. Can you write down the steps that led to it? But funnily enough, I stumbled upon another bug: If there are handicap stones, engine synchronization is always starting from an empty board.

@yishn
Copy link
Member

yishn commented Nov 8, 2018

Ok, I was able to reproduce it on v0.40.1, but it has already been fixed on master branch.

@omidmnz
Copy link

omidmnz commented Nov 8, 2018

Actually - the behaviour seems to differ based on how play is started.

With preference "start game right after attaching" OFF, the set_free_handicap command is used.

But with that preference set to ON, the play command is used instead.

Thanks. I can reproduce this exact behavior.

Ok, I was able to reproduce it on v0.40.1, but it has already been fixed on master branch.

So the issue is still closed. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants