Rebel Book Draw?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

JVMerlino
Posts: 1357
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Rebel Book Draw?

Post by JVMerlino »

Today, Myrddin played six games on ICC against a human rated ~2150. Myrddin won five of the games, but one was a draw. The curious thing is that all of the moves Myrddin played in that draw were from the Rebel "mainbook" book.

[pgn] [Event "ICS rated blitz match"] [Site "chessclub.com"] [Date "2018.10.02"] [Round "-"] [White "goranm21"] [Black "MyrddinComp"] [Result "1/2-1/2"] [WhiteElo "2138"] [BlackElo "2335"] [TimeControl "180"] 1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Be7 6. Re1 b5 7. Bb3 O-O 8. h3 d6 9. c3 Bb7 10. d4 Re8 11. Ng5 Rf8 12. Nf3 Re8 13. Ng5 Rf8 14. Nf3 Re8 15. Ng5 Rf8 [/pgn]

So, the question is whether or not Myrddin's moves are theoretically correct - meaning, was Black playing from an inferior position and a draw was a "good" outcome. Or is there a bad branch in the Rebel book?

I'd appreciate everybody's thoughts (and CPU cycles). :-)

jm
odomobo
Posts: 96
Joined: Fri Jul 06, 2018 1:09 am
Location: Chicago, IL
Full name: Josh Odom

Re: Rebel Book Draw?

Post by odomobo »

Are you saying that even moves 14 and 15 were played from the book?
JVMerlino
Posts: 1357
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: Rebel Book Draw?

Post by JVMerlino »

Yes, that is what the log file shows.

But I definitely said something incorrect. This is the ProDeo book. I assume my implementation is correct, however, in that I simply send a FEN to the book code and if it returns a move I play it. Perhaps I should be checking for repetition moves returned from the book? I've just been assuming that the book knows better than Myrddin. :)
Joost Buijs
Posts: 1563
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: Rebel Book Draw?

Post by Joost Buijs »

This is a very well known variation of the Ruy Lopez, even very strong human players repeat moves at this position sometimes. If white wants to win he has to break this repetition, and play something else than Ng5. I guess the human playing white was just satisfied with a draw.

When a book is based on positions instead of variations this sometimes happens, if you don't want this behaviour you have to add code to your book routine to avoid these kind of repetitions.
JVMerlino
Posts: 1357
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: Rebel Book Draw?

Post by JVMerlino »

Joost Buijs wrote: Wed Oct 03, 2018 7:29 am This is a very well known variation of the Ruy Lopez, even very strong human players repeat moves at this position sometimes. If white wants to win he has to break this repetition, and play something else than Ng5. I guess the human playing white was just satisfied with a draw.

When a book is based on positions instead of variations this sometimes happens, if you don't want this behaviour you have to add code to your book routine to avoid these kind of repetitions.
Exactly what I suspected. I definitely think that the ProDeo book knows better than Myrddin how to play openings, so I'm not going to add any code. Thanks very much, Joost!
Joost Buijs
Posts: 1563
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: Rebel Book Draw?

Post by Joost Buijs »

JVMerlino wrote: Wed Oct 03, 2018 7:42 am
Joost Buijs wrote: Wed Oct 03, 2018 7:29 am This is a very well known variation of the Ruy Lopez, even very strong human players repeat moves at this position sometimes. If white wants to win he has to break this repetition, and play something else than Ng5. I guess the human playing white was just satisfied with a draw.

When a book is based on positions instead of variations this sometimes happens, if you don't want this behaviour you have to add code to your book routine to avoid these kind of repetitions.
Exactly what I suspected. I definitely think that the ProDeo book knows better than Myrddin how to play openings, so I'm not going to add any code. Thanks very much, Joost!
The last HGM tourney, although in a different position, I had the same thing happening in the game Singularity vs Nightmare, I was expecting that Nightmare would win this game, but suddenly there was a repetition straight out of book.

This is not so easy to solve, when you want to divert from the repetition you have to play an inferior move with black and that is somehing you don't want. The only solution is to remove lines where this usually happens from the book altogether, but that is not optimal either.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Rebel Book Draw?

Post by hgm »

This should be considered a bad book line. There should be no reason for engines to verify book lines for their quality; this is the task of the book builder.
Joost Buijs
Posts: 1563
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: Rebel Book Draw?

Post by Joost Buijs »

hgm wrote: Wed Oct 03, 2018 10:12 am This should be considered a bad book line. There should be no reason for engines to verify book lines for their quality; this is the task of the book builder.
Sorry, but I don't agree. These lines are not bad, the fact is that some lines with good play from both sides lead to a forced draw by repetition, and that it is not wise to play inferior moves by trying to avoid this. You can compare it with contempt, playing lesser moves to avoid a draw by repetition against weaker players. The book-builder doesn't know against what type of player the engine plays, so if you want to try to solve this it can only be done in the routine that finally uses the book.

Another option is removing these lines from the book, this is something the book-builder can do, but this is not something I would prefer.
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Rebel Book Draw?

Post by Ras »

After 10. d4, Black has also other playable moves than Re8, e.g. Nd7, Na5 or h6. Adding these to the book for this position would make a repetition improbable.
Rasmus Althoff
https://www.ct800.net
Joost Buijs
Posts: 1563
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: Rebel Book Draw?

Post by Joost Buijs »

Ras wrote: Wed Oct 03, 2018 12:52 pm After 10. d4, Black has also other playable moves than Re8, e.g. Nd7, Na5 or h6. Adding these to the book for this position would make a repetition improbable.
True, most books will have this, but without random the engine probably selects the move with the highest frequency or best WLD ratio. When you play against a stronger player you probably want to select Re8, when you play against a weaker player, you don't, so this is something for the engine to decide and not for the book-builder.