Crafty does not use the opening book

Bug #533756 reported by latrom
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
crafty (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: crafty

Hello.

With the latest crafty in lucid I get the following error

Machine is NUMA, 1 nodes (2 cpus/node)

unable to open book file [./book.bin].
book is disabled
unable to open book file [./books.bin].

Crafty v23.1 (1 cpus)

White(1):

Opening books are very crucial for computer chess to work and it is important to have this bug fixed.

ii crafty 23.1-1 state-of-the-art chess engine, compatible wi
ii crafty-books-medium 1.0.debian1-2 Medium size opening books for the crafty che

ProblemType: Bug
Architecture: amd64
Date: Sun Mar 7 13:56:48 2010
DistroRelease: Ubuntu 10.04
InstallationMedia: Error: [Errno 13] Lupa evätty: '/var/log/installer/media-info'
Package: crafty 23.1-1
ProcEnviron:
 LANG=fi_FI.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
SourcePackage: crafty
Uname: Linux 2.6.32-15-generic x86_64

Revision history for this message
latrom (moertael) wrote :
Revision history for this message
Allan (allan-stokes) wrote :

The handling of the opening book is a source of confusion with this package.

I just installed package crafty-books-medium. It appears to have installed the book into /var/lib/crafty. In Karmic, the Ubuntu package defaults the opening book to the current directory. (This shows up under strace.) The search for tablebase files, however, defaults to /usr/lib/crafty/TB so at first blush the book default appears broken and inconsistent.

My book works when I run crafty as follows:

/usr/games/crafty bookpath=/var/lib/crafty

There is also an environment variable documented on the man page to achieve this effect.

However, when run this way, it complains that my book can not be opening for writing, so learning mode is disabled. Perhaps this is why the default was left at .

Logical, on some level, perhaps. Friendly or predictable, not even close.

Revision history for this message
Zapato de Gato (zapatodegato) wrote :

I've just had the same bug
I solve it installing 20.14 version (you can find it in multiverse) and books medium-to-small
It works ok in karmy and lucid

Revision history for this message
Akranis (hexagenic) wrote :

I've also experienced this bug as well, but I think I've found a fix.

in /usr/share/doc/crafty there is a shell script, what this script does is that it copies the opening books to a .crafty folder in your homedir and gives you environmental variables to put in your .bashrc to point to that directory.

After that, all you have to do is to reload the desktop manager, by either logging out or rebooting.

Not only will this work as an easy workaround for the bug, but it also gives you a personal book file with write permissions, allowing crafty to go into learning mode.

Don't run that script as sudo btw, since it creates the files with the privileges of whatever user invokes it. Having files in your homedir with root as owner won't allow you to write to them, thus disabling learning mode :)

I also changed the crafty.rc to allow it to use both of my cores :3 (change mt=0 to mt=2 where 2 is the number of cpus/cores)

Revision history for this message
Dennis Sheil (dennis-sheil) wrote :

I have the same problem with Ubuntu 10.10, the book is there in /usr/share/crafty, but it does not load by default. I figured out the bookpath parameter from a "man crafty", and read about the /usr/share/doc/crafty shell script here, but this should exist by default upon install, and if people want to later specialize the book they can, but the book installed by default should be loaded by crafty by default.

tags: added: maverick
Revision history for this message
latrom (moertael) wrote :

mortal@eeee:~$ crafty

Machine is NUMA, 1 nodes (4 cpus/node)

unable to open book file [./book.bin].
book is disabled
unable to open book file [./books.bin].

Crafty v23.4 (1 cpus)

White(1):

with the latest oneiric crafty
ii crafty 23.4-5ubuntu1 state-of-the-art chess engine, compatible with xboard
ii crafty-books-medium 1.0.debian1-2 Medium size opening books for the crafty chess engine

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in crafty (Ubuntu):
status: New → Confirmed
Revision history for this message
Lou (lou-gregory42) wrote :

Is there a good reason why this bug persists 9 years after being reported/confirmed? Installing Crafty today from the Ubuntu 18.04 repos does not put the book files where Crafty can find them.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.