Bug 90594

Summary: xboard/gnuchess not configured with opening book
Product: [Retired] Red Hat Linux Reporter: Need Real Name <phr-redhat>
Component: xboardAssignee: Karsten Hopp <karsten>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: mitr
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-25 13:17:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2003-05-10 02:20:15 UTC
Description of problem:
Starting xboard appears not to load the gnuchess opening book.  Oopening with 1
e4 always results with the computer thinking for several seconds and then
replying 1... Nf6.  It's just not configured right.

Version-Release number of selected component (if applicable):
It's the default "everything" install with red hat 9.

How reproducible:
Start xboard and play 1 e4 (sometimes called "pawn to king four")

Steps to Reproduce:
1. start xboard
2. put cursor on pawn directly in front of white king
3. drag pawn forward two squares and drop it
    
Actual results:
Computer thinks for several seconds and plays 1... Nf6 (Alekhine defense, an ok
move but not played very often in real games).

Expected results:
Computer should choose a reply from opening book and play it immediately without
thinking.  The reply should vary from game to game.

Additional info:

Comment 1 Karsten Hopp 2005-01-25 13:17:19 UTC
gnuchess opens the book as soon as you kame the first move:
 >gnuchess
GNU Chess 5.07
Adjusting HashSize to 1024 slots
Transposition table:  Entries=1K Size=40K
Pawn hash table: Entries=0K Size=28K
White (1) : e4
1. e4

black  KQkq  e3
r n b q k b n r
p p p p p p p p
. . . . . . . .
. . . . . . . .
. . . . P . . .
. . . . . . . .
P P P P . P P P
R N B Q K B N R

Thinking...
Looking for opening book in book.dat...
Looking for opening book in /var/lib/games/gnuchess/book.dat...
Read opening book (/var/lib/games/gnuchess/book.dat)...
Loading book from /var/lib/games/gnuchess/book.dat.
40304 hash collisions...  Opening database: 265053 book positions.
 In this position, there are 11 book moves:
 Nc6(71/77/22/32)  Nf6(54/113/88/113)  a6(75/3/1/0)  b6(67/11/3/9)
 c6(52/451/376/743)  d6(52/178/153/229)  e6(52/651/582/970) 
g6(59/155/88/117)
 c5(56/2535/1691/2912)  d5(54/47/38/35)  e5(54/2518/1938/3369)

 c5(1322)  e5(1312)  e6(376)  c6(277)  d6(141)  g6(136)  Nf6(109) 
Nc6(108)
 a6(76)  d5(76)  b6(70)
....

Same is valid for xboard, but only noticable with strace:
 >strace -e open -f -F xboard
...
first move:
[pid 25653] open("book.dat", O_RDONLY)  = -1 ENOENT (No such file or
directory)
[pid 25653] open("/var/lib/games/gnuchess/book.dat", O_RDONLY) = 3

It first looks for a book.dat file in the current directory and then
opens the system book,dat.