Premade Opening Books and other issues

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

kandalf

Premade Opening Books and other issues

Post by kandalf »

Hey guys,

I'm a high school student in an AP Comp Sci class and for my final project (and for fun) I've decided to write a chess program in Java. Thus far, I've programmed a GUI, the basic rules, move generation, (very) basic evaluation, and alpha-beta (which is still slightly buggy). I can do a 5 ply search in 5-60 seconds. I'd like to try to implement an opening book now to get some more intelligent opening play. However, I haven't found many books online, and the ones I have found are in rather obfuscated formats... are there any books available in very simple formats for at least an initial implementation? Is there no other option than writing my own book generator?

What order would you guys suggest I proceed in terms of functionality? I was thinking that my next step other than an opening book could be either iterative deepening+move ordering or a transposition table...

Finally, does anyone have a good link on extracting the PV?

Thanks!
UncombedCoconut
Posts: 319
Joined: Fri Dec 18, 2009 11:40 am
Location: Naperville, IL

Re: Premade Opening Books and other issues

Post by UncombedCoconut »

kandalf wrote: What order would you guys suggest I proceed in terms of functionality? I was thinking that my next step other than an opening book could be either iterative deepening+move ordering or a transposition table...
This thread (and the one it links to) looked like an interesting take on how to get the most ELO for the effort you put in: http://www.talkchess.com/forum/viewtopic.php?t=32258
Of course fixing search bugs might help even more.
Aaron Becker
Posts: 292
Joined: Tue Jul 07, 2009 4:56 am

Re: Premade Opening Books and other issues

Post by Aaron Becker »

I would recommend the Polyglot book format. It's completely documented (see http://alpha.uhasselt.be/Research/Algeb ... ormat.html), there are several high-quality open source implementations you can use for reference (for example, my implementation for Daydreamer at http://github.com/AaronBecker/daydreame ... ook_poly.c) and there are a lot of prepared books out there (for example, google for performance.bin.

However, adding book support won't help with strength anywhere near as much as iterative deepening, a transposition table, and good move ordering (not to mention bug-free code). It's nice to have, but you can write a very strong engine with no book support at all.
Edmund
Posts: 670
Joined: Mon Dec 03, 2007 3:01 pm
Location: Barcelona, Spain

Re: Premade Opening Books and other issues

Post by Edmund »

There are simple line based opening books (like the ones coming with tscp or chess gui)
Then you can have position based books like polyglot.

I also once wrote an opening book format + generator and placed them in public domain:
http://www.koziol.home.pl/marittima/glass/download.htm