Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A question about unwanted transpositions in the opening book

Author: Dieter Buerssner

Date: 15:55:48 10/07/04

Go up one level in this thread


On October 07, 2004 at 18:07:25, Alessandro Scotti wrote:

>Hi,
>in the simple book I implemented for Kiwi 0.2a, there was the risk of incurring
>in some classical blunders such as 1. e4 e5 2. Bb5 a6 3. Nf3 => Nc6 from book,
>or 1. Nf3 Nf6 2. Ng1 => Ng8 from book. To avoid this I play from book only if
>the start and end positions are both present. The above cases work ok but today
>I was testing an idea from Dan Honeycutt and played: 1. e3 e5 2. e4 Nf6 3. Nf3
>and Kiwi played 3... Ng8?? from the book! Argh! I have now added a check to
>never play the reverse of a move that was already played... is this solution
>good enough or there are more subtle bugs to discover? In my book, I only store
>position hashcodes together with a frequency counter...

I think it is still not enough. Without storing moves, you can get unwanted
transpositions, even when the postition before and after the move is in the
book.

I give a post of mine in the Arena forum some time ago.

Regards,
Dieter

Some of you may remember parts of the discussion about an opening book format.
One idea was, to not store moves in the opening book, but rather only positions.
The moves would be found implicetly, by trying all legal moves of the current
position, and when the position after the move is found in the book, you have an
opening move. I complained, that this would not be good in general, but was not
able to give a convincing example. With the help of Peter Berger, I now have
some good examples.

Assume your opening book has for example the following line.

1. d4 Nf6 2. Bg5 e6

You also have other lines for black with 1. d4 e6. You play with black. After 1.
d4, you play sometimes Nf6, and sometimes e6. The game goes:

1. d4 e6 2. Bg5??

You try all legal moves in this position. And when trying 2...Nf6, you find that
the position is in the book. So you will play out of book Nf6??, now, instead of
Qxg5. Peter Schäfe mentioned, that one should check, that the current position
is also in the book, and if not, search instead of looking for book moves. And
in this small example, it is not in the book, yet. But assume you add another
line to the book.

1. d4 e6 2. Bg5 Qxg5.

Now the position after Bg5 is in the book. The position based book move
searching algorithm will find 2 moves, now after 1. d4 e6 2. Bg5?? - Qxg5 and
Nf6. A typical algorithm will play half of the time the stupid move Nf6. I
think, this clearly shows, that a position only based book will not work
reliably in general. In engine matches, this may not be very obvious, because
engines will not make such gross errors like Bg5?? typically. But more subtle
cases are possible.

Another example (also shown to me by Peter Berger):

1. e4 e5 2. Nf3 a6 3. Bb5??

An engine can answer 3...Nc6 now, because it will probably know the line

1. e4 e5 2. Nf3 Nc6 3. Bb5 a6

And therfore the end position after

1. e4 e5 2. Nf3 a6 3. Bb5?? Nc6??

Note, that a typical book author might even flag the end position as desirable
(we still assume a position only based book, so the only sensible way to process
!!, is to store it with the position after the move), because he might have
input something like

1. e4 e5 2. Nf3 Nc6 3. Bb5 a6!!

in an "repertoire book" for black. This also shows, that such flags make no
sense, when stored with the position after the move. They really need to be
stored with a move





This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.