Wasp Opening Book
Dec 18, 2018

The wasp 3.5 distribution now includes the opening book file "wasp.opn".
This opening book contains about 35K unique positions from over 125K
games played by Wasp against various opponents.  The purpose of this book
is to provide good variety, not to get best results in a tournament.
Most of the games were played using CuteChess where both players used Frank
Quisinsky's FEOBOS opening book for the first 8 moves. Most of the games
were played at very fast time control and the moves have not been checked
with a deep search.  The Wasp book format is not compatible with other
engines, although perhaps in the future I will switch to the polyglot
format as I think it is very similar.

To enable this opening book, set the UCI option OwnBook to true.
If desired, edit the WaspBook, BookVariety, and BookDepth parameters in
the wasp.rc file.  With BookVariety=0, Wasp will play the move with
highest figure of merit where fom = log(#wins + #draws/2). Increasing
BookVariety adds randomness to the fom for each move.

You can create your own opening book from a PGN file, but it will take
a bit of effort as you must run Wasp from the command line in
"console mode".  Here is the procedure:

1. Copy a PGN file to a file named book.pgn in the same directory as
   the Wasp executable.

2. In a Command Prompt window, start Wasp in console mode, ie enter
   "Wasp350-x64-modern -c".
   
3. In wasp, type "mkbook".  Wasp will import all the games from the file
   "book.pgn" and create a new file called "book.opn".  Wasp will output
   dots to indicate progress and will output "done" when finished
   importing.  When the import is done, type "quit" to exit Wasp.
   
4. Copy the file "book.opn" to whatever you want to name the new book
   (ie "mybook.opn") and change the WaspBook parameter in the file
   wasp.rc to "mybook.opn".

5. You can view the book moves by starting Wasp from a Command Prompt
   window and entering the command "book".  Each book move is followed
   by #wins - #losses - #draws, the win fraction, and the "fom". 
   
5. You can enter moves in full or reduced algebraic notation and then
   enter "book" at the new position.

Here is an example of the console output from the starting position
and after entering the move "e4":  
   
C:\Chess\Wasp_3\Wasp_3.5>Wasp350-x64-modern.exe -c
loaded parameters from wasp.rc

info string found 510 tablebases
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq -
  r n b q k b n r
  o o o o o o o o
  - + - + - + - +
  + - + - + - + -
  - + - + - + - +
  + - + - + - + -
  P P P P P P P P
  R N B Q K B N R
white

book
b2b3     342 -   318 -   434   0.511  6.326
b2b4      39 -    29 -    61   0.539  4.241
c2c3      84 -    56 -    97   0.559  4.887
c2c4    3993 -  2956 -  5395   0.542  8.808
d2d3      35 -    39 -    45   0.483  4.052
d2d4   19244 - 13373 - 25675   0.550  10.376
e2e3     157 -   146 -   245   0.510  5.633
e2e4   18027 - 13310 - 24270   0.542  10.314
f2f4     170 -   168 -   214   0.502  5.624
g2g3     318 -   263 -   465   0.526  6.311
h2h3      18 -    17 -    12   0.511  3.178
b1c3     358 -   295 -   461   0.528  6.378
g1f3    3612 -  2594 -  4956   0.546  8.714
book move is e2e4

e4
1. move e4
rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3
  r n b q k b n r
  o o o o o o o o
  - + - + - + - +
  + - + - + - + -
  - + - + P + - +
  + - + - + - + -
  P P P P - P P P
  R N B Q K B N R
black

book
b7b6      13 -    16 -    20   0.469  3.135
c7c6    1002 -  1486 -  1920   0.445  7.582
c7c5    6099 -  7811 - 10755   0.465  9.348
d7d6     288 -   469 -   490   0.427  6.279
d7d5     203 -   345 -   466   0.430  6.078
e7e6    1111 -  1895 -  2098   0.423  7.678
e7e5    4011 -  5070 -  7372   0.468  8.949
g7g6     173 -   290 -   319   0.425  5.807
b8c6      46 -    45 -    71   0.503  4.401
g8f6     364 -   595 -   755   0.433  6.609
book move is e7e5

   