Page 1 of 2

Butterfly

PostPosted: 05 Mar 2010, 17:44
by elorejano
Hi!
From the webpage i saw that Butterfly use its own opening book but any of the compiles has built it.
Theres no documentation also.
Any help?
Thx

Re: Butterfly

PostPosted: 05 Mar 2010, 21:09
by Charles Browne
In the source files, in the - openbook.cpp - file it reads:

Code: Select all
  if (!stream)
    {
      printf
   ("\n%s not found. (get it in ftp://ftp.cis.uab.edu/pub/hyatt/pgn/enormous.zip and convert it with pgn2epd.exe < enormous.pgn >enormous.epd. http://remi.coulom.free.fr/)",
    ENORMOUS_TXT_FILE);
      return;
    }



So I suppose you are to download the enormous.zip file from the hyatt site and then use pgn2epd.exe to convert the contents of the enormous.zip file to an epd file called enormous.epd. And you then have the opening book.

Does it work? I do not know. I am curious though so I am still in the process of downloading the enormous.zip file. I might give up though, so you can try it yourself if you want to see if the instructions given are correct.

Re: Butterfly

PostPosted: 05 Mar 2010, 22:58
by Charles Browne
No luck here.

It may be that it needs to be compiled with the enormous.epd file. Anyway I was unable to get it to work. But I could be mistaken about the necessity of the enormous.epd file in the first place.

If all else fails you could contact the engine's author.

Re: Butterfly

PostPosted: 06 Mar 2010, 19:47
by Charles Browne
Information for making books has been posted on the Butterfly engine website


https://sites.google.com/site/butterflychess/books

Re: Butterfly

PostPosted: 07 Mar 2010, 00:02
by elorejano
Thanks Guys!
However seems that this engines needs much comands from comandline...
Anybody has the line of winboard.ini for to see the settings?
Regards

Re: Butterfly

PostPosted: 07 Mar 2010, 05:13
by elorejano
Sorry but when i wrote createbook, Butterfly says "createbook unknown comand"
Of course i builted book.epd and are in the same directory as Butterfly.exe
Regards

Re: Butterfly

PostPosted: 08 Mar 2010, 00:28
by Charles Browne
An executable file for Butterfly 0.0.4 has been posted by the engine's author on the Butterfly website.

https://sites.google.com/site/butterflychess/download-2




elorejano wrote:Sorry but when i wrote createbook, Butterfly says "createbook unknown comand"
Of course i builted book.epd and are in the same directory as Butterfly.exe
Regards



command prompt

butterfly createbook < book.epd > book.dat

(What I used anyway)


I do not know if the second move shown below is a book move or not. I made the first move, the engine made the second move. I made a book out of a small PGN file. I have no chess programs installed right now so I have only run Butterfly in the console window.


Code: Select all
Load book ...ok

PERFT OFF
HASH OFF
NULL MOVES OFF
FUTILITY PRUNING OFF
DEBUG OFF
64 bit OFF
TEST OFF

     a   b   c   d   e   f   g   h
   ---------------------------------
 8 | r | n | b | q | k | b | n | r |
   ---------------------------------
 7 | p | p | p | p | p | p | p | p |
   ---------------------------------
 6 |   | . |   | . |   | . |   | . |
   ---------------------------------
 5 | . |   | . |   | . |   | . |   |
   ---------------------------------
 4 |   | . |   | . |   | . |   | . |
   ---------------------------------
 3 | . |   | . |   | . |   | . |   |
   ---------------------------------
 2 | P | P | P | P | P | P | P | P |
   ---------------------------------
 1 | R | N | B | Q | K | B | N | R |
   ---------------------------------
     a   b   c   d   e   f   g   h


rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq
e2e4

     a   b   c   d   e   f   g   h
   ---------------------------------
 8 | r | n | b | q | k | b | n | r |
   ---------------------------------
 7 | p | p | p | p | p | p | p | p |
   ---------------------------------
 6 |   | . |   | . |   | . |   | . |
   ---------------------------------
 5 | . |   | . |   | . |   | . |   |
   ---------------------------------
 4 |   | . |   | . | P | . |   | . |
   ---------------------------------
 3 | . |   | . |   | . |   | . |   |
   ---------------------------------
 2 | P | P | P | P |   | P | P | P |
   ---------------------------------
 1 | R | N | B | Q | K | B | N | R |
   ---------------------------------
     a   b   c   d   e   f   g   h


rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq

2 1 20 29 g8f6 b1c3
3 3 70 115 g8f6 b1c3 b8c6
4 2 521 1413 b8c6 g1f3 g8f6 b1c3
5 3 1842 5029 b8c6 g1f3 g8f6 b1c3 f6e4
     a   b   c   d   e   f   g   h
   ---------------------------------
 8 | r | . | b | q | k | b | n | r |
   ---------------------------------
 7 | p | p | p | p | p | p | p | p |
   ---------------------------------
 6 |   | . | n | . |   | . |   | . |
   ---------------------------------
 5 | . |   | . |   | . |   | . |   |
   ---------------------------------
 4 |   | . |   | . | P | . |   | . |
   ---------------------------------
 3 | . |   | . |   | . |   | . |   |
   ---------------------------------
 2 | P | P | P | P |   | P | P | P |
   ---------------------------------
 1 | R | N | B | Q | K | B | N | R |
   ---------------------------------
     a   b   c   d   e   f   g   h


r1bqkbnr/pppppppp/2n5/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq

move b8c6

Re: Butterfly

PostPosted: 08 Mar 2010, 15:35
by elorejano
Thanks!
Ive managed to create an opening book, but
1)How to set the hashtable?
2)Another settings needed?
3)Are needed something in the command line?
Thanks in advance

Re: Butterfly

PostPosted: 08 Mar 2010, 20:32
by Pablo
Charles Browne wrote:Information for making books has been posted on the Butterfly engine website
https://sites.google.com/site/butterflychess/books


Hi Charles,
I download the pgn2epd.exe program and followed the command line at Butterfly console for making a book.epd from a pgn file but nothing happened. Indicate error. :(
Also i tried bookcreate command at Butterfly console to create a book.dat file but nothing. :evil:
Maybe I am doing or understanding something wrong.
Please your comments,
Best
Pablo Urzua

Re: Butterfly

PostPosted: 08 Mar 2010, 21:06
by Charles Browne
Pablo wrote:
Charles Browne wrote:Information for making books has been posted on the Butterfly engine website
https://sites.google.com/site/butterflychess/books


Hi Charles,
I download the pgn2epd.exe program and followed the command line at Butterfly console for making a book.epd from a pgn file but nothing happened. Indicate error. :(
Also i tried bookcreate command at Butterfly console to create a book.dat file but nothing. :evil:
Maybe I am doing or understanding something wrong.
Please your comments,
Best
Pablo Urzua



pgn2epd < book.pgn > book.epd


The above worked here for making an .epd file. I downloaded one of Norm Pollock's PGN files of grandmaster games and renamed the file to book.pgn before running the above command.


butterfly createbook < book.epd > book.dat

And the above worked here as far as making a book.dat file and when the engine was ran in the console it listed the book as being loaded, but it didn't look like the book was being used to make moves here. So the commands I used to make the book.dat file could be wrong or something else is amiss somewhere.

I only jumped into this thread to try and give elorejano some help, which I think I failed at. So I think it best if I step aside and let someone else step in to give aid. Sorry I was unable to give a better answer to your question.

Re: Butterfly

PostPosted: 09 Mar 2010, 15:08
by Pablo
Charles Browne wrote:
Pablo wrote:
Charles Browne wrote:Information for making books has been posted on the Butterfly engine website
https://sites.google.com/site/butterflychess/books


Hi Charles,
I download the pgn2epd.exe program and followed the command line at Butterfly console for making a book.epd from a pgn file but nothing happened. Indicate error. :(
Also i tried bookcreate command at Butterfly console to create a book.dat file but nothing. :evil:
Maybe I am doing or understanding something wrong.
Please your comments,
Best
Pablo Urzua



pgn2epd < book.pgn > book.epd


The above worked here for making an .epd file. I downloaded one of Norm Pollock's PGN files of grandmaster games and renamed the file to book.pgn before running the above command.


butterfly createbook < book.epd > book.dat

And the above worked here as far as making a book.dat file and when the engine was ran in the console it listed the book as being loaded, but it didn't look like the book was being used to make moves here. So the commands I used to make the book.dat file could be wrong or something else is amiss somewhere.

I only jumped into this thread to try and give elorejano some help, which I think I failed at. So I think it best if I step aside and let someone else step in to give aid. Sorry I was unable to give a better answer to your question.


Hi Charles,
Sorry but I could not create anything with the mentioned commands. My pgn file was GM2600.pgn renamed book.pgn. I am sure I am making something wrong.
Anyhow the author sent me a computional log that he use to create books. Since I am absolutely ignorant, I do not understand how to emulate that log at my PC.
Maybe it help you and the community.
Pablo

Re: Butterfly

PostPosted: 10 Mar 2010, 00:47
by Dann Corbit
Butterfly is really, really fussy about the PGN format it accepts.

For instance, if you have a promotion, the only thing accepted will be SAN=P where SAN is the move in modern PGN notation, the '=' MUST be present, and the promotion piece must follow.

Also, ep captures with the notation /ep in the capture are rejected.

I am making a book for butterfly and I will post a link to it when it is done.

Re: Butterfly

PostPosted: 10 Mar 2010, 01:11
by elorejano
Hi, again!
I could make an opening book for Butterfly but are very large.
Thanks for the help.
But i cant make Butteerfly work under Winboard.
Are needed some parameters from the command line?
If any could, please post your winboard.ini
Thx in advance

Re: Butterfly

PostPosted: 10 Mar 2010, 02:10
by Charles Browne
Pablo wrote:I download the pgn2epd.exe program and followed the command line at Butterfly console



Pablo,

Rereading this part of a previous post of yours (quoted above), if I am reading it correctly did you start the Butterfly engine by double-clicking the Butterfly exe file and then type in the information for making an epd file with pgn2epd? If you did do that what you should rather do is in your Windows OS go to "Start > Programs > Accessories" and find and click on the "command prompt" icon which should open a console window. Then change directory - cd - to the directory where the pgn2epd.exe file and pgn file are located and then type the proper command in the console and that should create the epd file. May take awhile to make the epd file depending on how large the pgn file is.


as an example, when I click the command prompt icon on this computer a window opens up showing this

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\soggy_bottom>



I have the pgn2epd.exe and pgn file in a folder named - 00 - in the c:\ drive. So in the console window I change directory - cd - to that folder/directory by typing - cd c:\00 - It looks like this.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\soggy_bottom>cd c:\00



Then the 'enter' key is pushed and it looks like this.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\soggy_bottom>cd c:\00

C:\00>



Then the command for making the epd file is typed in (shown below) and the 'enter' key is pushed. And making the epd file should begin.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\soggy_bottom>cd c:\00

C:\00>pgn2epd < name_of_the_PGN_file.pgn > book.epd




Pablo wrote:I download the pgn2epd.exe program and followed the command line at Butterfly console


If I misinterpreted what was written above then disregard what I wrote above. :)

Re: Butterfly

PostPosted: 10 Mar 2010, 04:08
by Dann Corbit
Dann Corbit wrote:Butterfly is really, really fussy about the PGN format it accepts.

For instance, if you have a promotion, the only thing accepted will be SAN=P where SAN is the move in modern PGN notation, the '=' MUST be present, and the promotion piece must follow.

Also, ep captures with the notation /ep in the capture are rejected.

I am making a book for butterfly and I will post a link to it when it is done.


It takes eons of time to build a book (1 MB processed takes 5 minutes).
I had given it a 5 GB input file. That's clearly "right out of the question" as a non-starter.

I will rethink my strategy a bit.

Re: Butterfly

PostPosted: 10 Mar 2010, 21:44
by Dann Corbit
So far as I can tell, the book code does not seem to work properly.
I created a book, and for which the opening moves from the initial position were:
e4, d4, c4, nf3, g3, b3

(which is based on this statistical report from SCID against a database of high quality games):
Code: Select all
4.2  Moves from the report position

    Move   ECO       Frequency    Score  AvElo Perf AvYear %Draws
 1: e4     B00a  1769774: 43.3%   54.4%  2687  2715  2004   29%
 2: d4     A40a  1450043: 35.5%   54.5%  2693  2733  2004   32%
 3: c4     A10    390822:  9.5%   54.3%  2696  2723  2004   32%
 4: Nf3    A04    385299:  9.4%   54.1%  2688  2718  2004   33%
 5: g3     A00t    32741:  0.8%   53.1%  2657  2679  2004   33%
 6: b3     A01     19200:  0.4%   53.1%  2721  2739  2003   21%
 7: f4     A02     12070:  0.2%   47.5%  2591  2624  2000   21%
 8: Nc3    A00l     6879:  0.1%   51.5%  2651  2670  2004   22%
 9: g4     A00n     3617:  0.0%   36.6%  2666  2593  2005   16%
10: b4     A00p     2627:  0.0%   44.8%  2637  2622  2005   23%
11: e3     A00k     2209:  0.0%   43.0%  2670  2645  2001   19%
12: c3     A00i     1366:  0.0%   45.2%  2689  2677  2004   16%
13: d3     A00j     1228:  0.0%   42.6%  2623  2584  2003   16%
14: a3     A00f     1059:  0.0%   43.6%  2642  2601  2004   16%
15: a4     A00e      932:  0.0%   35.1%  2697  2631  2005   13%
16: h3     A00d      839:  0.0%   37.3%  2724  2608  2005   17%
17: h4     A00c      729:  0.0%   30.6%  2687  2562  2004   10%
18: f3     A00b      477:  0.0%   26.2%  2670  2505  2004    7%
19: [end]  A00a      269:  0.0%   52.7%  2572  2590  1997   34%
20: Nh3    A00g      192:  0.0%   31.2%  2612  2533  2005   18%
21: Na3    A00h       99:  0.0%   23.2%  2560  2445  2008   12%
_______________________________________________________________
TOTAL:           4082471:100.0%   54.3%   704   735   948   31%

The engine promptly moved 1.c3 and then went out of book.
I am giving up for now.

Re: Butterfly

PostPosted: 11 Mar 2010, 19:32
by elorejano
Sorry for repit a post but, are so stupid my question?
i cant make Butteerfly work under Winboard.
Are needed some parameters from the command line?
If any could, please post your winboard.ini
Thx in advance

Re: Butterfly

PostPosted: 11 Mar 2010, 21:00
by Charles Browne
elorejano wrote:Sorry for repit a post but, are so stupid my question?
i cant make Butteerfly work under Winboard.
Are needed some parameters from the command line?
If any could, please post your winboard.ini
Thx in advance


Code: Select all
}
/firstChessProgramNames={"Butterfly" /fd="C:\Program Files\Chess\Chess Engines\Butterfly" /fcp=butterfly
"Clueless 1.4" /fd="C:\Program Files\Chess\Polyglot" /fcp="polyglot clueless14.ini"
}
/secondChessProgramNames={"Butterfly" /sd="C:\Program Files\Chess\Chess Engines\Butterfly" /scp=butterfly
"Clueless 1.4" /sd="C:\Program Files\Chess\Polyglot" /scp="polyglot clueless14.ini"
}


Above is the way I set up my ini file, others do it differently but you can get the gist of it.

Since Butterfly appears to have problems currently with using own book, YOU CAN, if using HG Muller's Winboard, have the engine use a polyglot book through the Winboard GUI instead.

Now I had just been running the Butterfly engine from the console but I went ahead and set it up in Winboard, and as black and as white pieces the engine made moves.

Re: Butterfly

PostPosted: 11 Mar 2010, 21:53
by elorejano
Thanks!
But how you set the hashtables?
Or are fixed?
Regards

Re: Butterfly

PostPosted: 11 Mar 2010, 22:04
by Charles Browne
elorejano wrote:Thanks!
But how you set the hashtables?
Or are fixed?
Regards


On this page is an e-mail address for the engine's author

https://sites.google.com/site/butterflychess/

Better for you to get an authoritative answer for your hash questions from the source.