Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to create a custom opening repertoire for Crafty/ Some tips

Author: David Dahlem

Date: 15:08:24 10/08/04

Go up one level in this thread


On October 08, 2004 at 16:20:07, Peter Berger wrote:

>The book building process for Crafty is very time-consuming if done as
>documented, but with a few free tools it can be done very fast and easily. Hope
>this helps some of those interested. ( I assumed a Windows PC but Yace e.g. is
>availlable for Linux too).
>
>A.) Creating the main book ( book.bin)
>
>This is explained well in the crafty documentation.
>
>B.) Creating the repertoire book ( books.bin and bookc.bin)
>
>a.) Build your repertoire in two pgn-files (e.g. white.pgn and black.pgn) with
>your favourite chessprogam
>
>This is very easy and fun with programs like Fritz, Shredder or whatever your
>favourite tool is. Let's say we created the cool killer.pgn as basis for our
>white repertoire - it could look like this:
>
>[Event "120'/40+60'/20+15'+30""]
>[Site "Berlin"]
>[Date "2004.10.08"]
>[Round "?"]
>[White "Giller"]
>[Black "Jons"]
>[Result "1-0"]
>[ECO "A00"]
>[Annotator "Berger,Peter"]
>[PlyCount "7"]
>[TimeControl "40/7200:20/3600:900+30"]
>
>{288MB, Junior8.ctg, XP3200} 1. h4 c6 (1... b5 2. g3 b4 (2... c6 3. Bg2) 3. Bh3
>c6) 2. b4 e6 (2... g6 3. h5) (2... e5 3. c3) 3. f4 f6 4. g4 1-0
>
>[Event "120'/40+60'/20+15'+30""]
>[Site "Berlin"]
>[Date "2004.10.08"]
>[Round "?"]
>[White "Neue Partie"]
>[Black "Junior 8"]
>[Result "*"]
>[ECO "A00"]
>[Annotator "Berger,Peter"]
>[PlyCount "11"]
>[TimeControl "40/7200:20/3600:900+30"]
>
>{288MB, Junior8.ctg, XP3200} 1. h4 a5 2. h5 a4 3. h6 a3 4. hxg7 axb2 5. gxh8=Q
>Bg7 (5... bxa1=Q 6. Qxa1) 6. Qxg8+ *
>
>So we want to add the white moves to our repertoire.
>
>b.) Split the PGN so that also the sidelines get imported.
>
>This can be done with the tool PgnSplit by Odd Gunnar Malin you can download at
>http://home.online.no/~malin/sjakk/ . From a DOS prompt type
>
>PgnSplit killer.pgn killersplit.pgn
>
>And you'll get a file killersplit.pgn which will look like this:
>
>[Event "120'/40+60'/20+15'+30"]
>[Site "Berlin"]
>[Date "2004.10.08"]
>[Round "?"]
>[White "Giller"]
>[Black "Jons"]
>[Result "1-0"]
>
>1. h4 c6 2. b4 e6 3. f4 f6 4. g4 1-0
>
>[Event "120'/40+60'/20+15'+30"]
>[Site "Berlin"]
>[Date "2004.10.08"]
>[Round "?"]
>[White "Giller"]
>[Black "Jons"]
>[Result "*"]
>
>{ Variation 1 }
>1. h4 c6 2. b4 g6 3. h5 *
>
>[Event "120'/40+60'/20+15'+30"]
>[Site "Berlin"]
>[Date "2004.10.08"]
>[Round "?"]
>[White "Giller"]
>[Black "Jons"]
>[Result "*"]
>
>{ Variation 2 }
>1. h4 c6 2. b4 e5 3. c3 *
>
>etc.
>
>c.) Flag the white moves so that Crafty will always play your chosen lines
>later.
>
>This can be done with Dieter Bürßner's program Yace you can download at
>http://home1.stofanet.dk/moq/ . Start yace in text mode.
>
>Then type carlos_pgn killersplit.pgn white.pgn n 2 0   - this will add a ! to
>every white move and create your white repertoire file white.pgn
>
>Looks like this:
>
>[Event "120'/40+60'/20+15'+30"]
>[Site "Berlin"]
>[Date "2004.10.08"]
>[Round "?"]
>[White "Giller"]
>[Black "Jons"]
>[Result "1-0"]
>
>1. h4! c6 2. b4! e6 3. f4! f6 4. g4! 1-0
>
>[Event "120'/40+60'/20+15'+30"]
>[Site "Berlin"]
>[Date "2004.10.08"]
>[Round "?"]
>[White "Giller"]
>[Black "Jons"]
>[Result "*"]
>
>1. h4! c6 2. b4! g6 3. h5! *
>
>etc.
>
>d.)  Do the same for the black side if interested
>
>The carlos_pgn command would be : carlos_pgn blacksplit.pgn black.pgn n 0 2 (For
>other options of this command read the Yace documentation).
>
>e.) Merge your repertoire files into one file , e.g. repertoire.pgn
>
>f.) Final adaptions
>
>The cool thing about Crafty is that it reads this file sequentually when
>creating its repertoire book so you can always add some (few) manual changes at
>the end of your repertoire.pgn. e.g.
>
>[Site]
>1. h4! { play 90%}
>[Site]
>1. a4! { play 10%}
>
>So later Crafty will surprise its opponent with 1. a4 10% of the time.
>
>g.) Now it's finally time to create your Crafty repertoire
>
>For a book to be used against humans
>
>books create repertoire.pgn 20
>
>will create books.bin by importing the 20 first halfmoves of every game in the
>PGN.
>
>For a book to be used against computers
>
>bookc create repertoire.pgn 20
>
>will create bookc.bin.
>
>h.) Final checks if everything worked fine.
>
>Restart Crafty, preferrably in command mode , then it will use your newly
>created books.bin and bookc.bin files. You can check if everything worked OK by
>using Crafty option "show book" and then check some lines in analyze mode.
>
>
>I am afraid this method is still not for everybody but in case you want to build
>a bigger repertoire it's an amazing improvement over manual editing of the input
>PGN . With some practice all steps (except the first one ;) ) can be done in 2-3
>minutes, or even be automated in a batch.
>
>Peter

Thanks for these excellent instructions, Peter. Now the most time consuming task
is collecting and cleaning up the games to be used in creating Crafty books. I
do have one question though. If only using these books against computers, is
books.bin necessary?

Regards
Dave



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.