Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: My $.02 on books

Author: Mihaly Szalai

Date: 07:51:40 10/08/04

Go up one level in this thread


On October 08, 2004 at 10:39:05, David Dahlem wrote:

>On October 08, 2004 at 02:46:11, Mike Byrne wrote:
>
>>On October 07, 2004 at 23:44:38, David Dahlem wrote:
>>
>>>On October 07, 2004 at 22:58:30, Mike Byrne wrote:
>>>
>>>>On October 06, 2004 at 23:52:19, David Dahlem wrote:
>>>>
>>>>>On October 06, 2004 at 22:16:04, Mike Byrne wrote:
>>>>>
>>>>>>You had a nice thread going on personality books.
>>>>>>
>>>>>>Let me describe my process - I create a pgn file for Fischer with White -- I run
>>>>>>that through bookup - flag the most common moves for white going somewhere
>>>>>>between 20 to 50ply (10 - 25 moves deep).   I flag only the white moves.  I then
>>>>>>the same with Fischer as black pgn., flagging only the most common black moves.
>>>>>>I export the bookup file as multiple pgn's and the combine both test files to
>>>>>>create one fischer.bin (later I will modify Crafty to look for fischer.bin when
>>>>>>playing as with fischer personality), import the moves in Crafty.  Crafty will
>>>>>>then play just like Fischer wther white or black.  With Bookup, I should be able
>>>>>>to make one personality book in about 4 hours.  It is really cool and it works.
>>>>>>
>>>>>>
>>>>>>The fischer.bin only has about 30,000+ positions, so it is not a very big book.
>>>>>>maybe 1 MB.
>>>>>
>>>>>Hi Mike
>>>>>
>>>>>I don't have Bookup, but i think i can mark the moves using the search and
>>>>>replace feature of my text editor. This will also require splitting into
>>>>>white.pgn and black.pgn. All of the moves for the selected grandmaster will get
>>>>>marked. It shouldn't take over 30 minutes to create a book using this method.
>>>>>I'm not sure what you mean by most common moves. Bookup must have a feature that
>>>>>identifies the most common moves?
>>>>
>>>>it does --- it has counter --I'm not exactly sure what it counts - perhaps leaf
>>>>nodes?   what exactly are using search and replace to mark all the moves in 30
>>>>minutes?
>>>>
>>>>>
>>>>>Regards
>>>>>Dave
>>>
>>>"Search-and-replace is a capability that allows a computer user to find a given
>>>sequence of characters in one or more text files and, if desired, replace the
>>>sequence with another sequence of characters. A global search-and-replace means
>>>that the replace is to take effect in all files within the context of the
>>>search."
>>>
>>>It's possible to flag black or white moves with a text editor that supports
>>>search and replace. It's easy once you get the hang of it, but it is harder to
>>>explain how to do it than it is to do it. Basically i start by replacing all
>>>spaces with a unique character or string, the asterisk symbol, for example. Then
>>>just replace certain strings with flags, spaces, etc.
>>>
>>>Regards
>>>Dave
>>
>>I understand - but in  a pgn file...
>>
>>Leko vs Kramnik Game 8
>>
>>1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O Be7 6.Re1 b5 7.Bb3 O-O 8.c3
>>d5 9.exd5 Nxd5 10.Nxe5 Nxe5 11.Rxe5 c6 12.d4 Bd6 13.Re1 Qh4 14.g3 Qh3
>>15.Re4 g5 16.Qf1 Qh5 17.Nd2 Bf5 18.f3 Nf6 19.Re1 Rae8 20.Rxe8 Rxe8 21.a4
>>Qg6 22.axb5 Bd3 23.Qf2 Re2 24.Qxe2 Bxe2 25.bxa6 Qd3 26.Kf2 Bxf3 27.Nxf3
>>Ne4+ 28.Ke1 Nxc3 29.bxc3 Qxc3+ 30.Kf2 Qxa1 31.a7 h6 32.h4 g4 Resigns
>>
>>what find/replace scheme would you use to add a mark to all of white's moves or
>>all black moves?  You said you did that in 30 minutes - how many games were in
>>the file?
>
>Hi Mike
>
>After some practice, i can flag the white.pgn and black.pgn and create the
>crafty book in 10-15 minutes. It doesn't really matter how many games are in a
>pgn file, since search and replace works on the complete file, not just one
>game. My text editor (Notespad) can handle 25mb text files.
>
>I'll try to give a sample of how i flag the moves, keep in mind i am not very
>good at giving instructions. First i make sure all comments, variations, etc.
>are removed, and then i split the games into white.pgn and black.pgn. In my text
>editor, i replace all spaces with "*", as in the example below.
>
>[Event*"?"]
>[Site*"?"]
>[Date*"????.??.??"]
>[Round*"?"]
>[White*"Leko"]
>[Black*"Kramnik"]
>[Result*"*"]
>
>1.e4*e5*2.Nf3*Nc6*3.Bb5*a6*4.Ba4*Nf6*5.O-O*Be7*6.Re1*b5*7.Bb3*O-O*8.c3*d5*9.exd5*Nxd5*10.Nxe5*Nxe5*11.Rxe5*c6*12.d4*Bd6*13.Re1*Qh4*14.g3*Qh3*15.Re4*g5*16.Qf1*Qh5*17.Nd2*Bf5*18.f3*Nf6*19.Re1*Rae8*20.Rxe8*Rxe8*21.a4*Qg6*22.axb5*Bd3*23.Qf2*Re2*24.Qxe2*Bxe2*25.bxa6*Qd3*26.Kf2*Bxf3*27.Nxf3*Ne4+*28.Ke1*Nxc3*29.bxc3*Qxc3+*30.Kf2*Qxa1*31.a7*h6*32.h4*g4*0-1
>
>I will have to use quotes around the search and replace strings, since that's
>the only way i can show spaces.
>
>The first search and replace pass will clean up the pgn tags, by replacing all
>occurances of "*"" with " "". In other words, replace the asterisk in the pgn
>tags with a space. Only takes a few seconds to do this in hundreds or thousands
>of games. Next i remove the asterisk after the period, by replacing ".*" with
>".".
>
>To flag black moves, i replace the asterisks preceding the line numbers, for
>example, "*1" with "! 1". This is repeated for "*2", "*3", etc., up to "*9".
>When this is done, replace all remaining asterisks with a space. That's it. To
>mark white moves, the same procedure is used, except in reverse. For example,
>replace the asterisks preceding the line numbers with a space, "*1" replaced by
>" 1" for example. After this is done, replace all remaining asterisks with "! ".
>
>This may sound complicated, but it's really easy. There may be other search and
>replace schemes that will work, but this is how i do it. Of course, it would be
>nice if someone would write a tool to flag moves. :-)
>
>Regards
>Dave

Hi Dave,

I use Editpad Lite and there is no need for asterisks, simple spaces will do.
I am sure that a script can be written for it.

Best
Mihaly



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.