KnockOut - An Amateur WinBoard Chess Engine
===========================================

Author and copyright holder: (c) 2010 Sven Schle, Berlin, Germany


KnockOut is a chess engine that understands the WinBoard protocol to connect
it with a graphical chess user interface. You can download KnockOut for free
from this site:

    http://www.schuelebln.de/chess/knockout


Current version: 0.7.1-build002 created at 08-Jun-2010

At the time of writing this introduction, KnockOut is still in "beta" stadium.


Estimated playing strength:

I hope that "KnockOut" is slightly stronger than my previous engine "Surprise"
but I am not sure about it. Any testing efforts are welcome!


System and software requirements:
- Windows 32 bit (not tested on 64 bit systems)
- WinBoard 4.4.x (maintained by H.G. Muller, see WinBoard forum for details);
  KnockOut will also work with older WinBoard versions, in this case the
  configuration of options will work differently


Additional requirements (optional):
- Opening book (see below)
- Endgame tablebases (see below)


"Quick start":
- Copy a PolyGlot opening book as "book.bin" into the folder from where you
  run the engine.
- Use WinBoard as usual to start the engine.


Change Log:

0.7.1-build002 (08-Jun-2010):

- fixed some time control bugs that caused several losses on time, especially
  in X+0 games and with incremental time control

- the clock adjustment triggered by the "time" WinBoard command had a severe
  problem that affected all time controls - fixing it did not only reduce the
  number of time losses but also slightly improve the overall time management

- options hashTableSizeMB and gtbCacheSizeMB did not have any effect, so the
  default settings were always used; this was corrected

- with older WinBoard GUI versions < 4.3.x, hash table size could not be
  configured yet, so the default (256MB) was always used; now the configuration
  file "knockout.ini" allows to overcome this problem

- the description of the "option" WinBoard command in this readme file was
  wrong, the '=' character was missing (corrected)

- skipped the "development" evaluation term since it was overlapping too much
  with other evaluation terms

- reduced the values for passed pawns in the opening


0.7-build012 (04-Jun-2010):

- first official release


Current features and implementation:

- C++ program developed with MS Visual C++ Express 2010
- 0x88 board representation
- very simple PVS with aspiration window
- adaptive recursive null move pruning
- check extension + pawn to 7th rank extension
- standard hash table
- standard move ordering (MVV/LVA, SEE, history + killer heuristic, ...)
- quite sophisticated static evaluation (not tuned yet)
- some kind of "lazy evaluation"
- can access Gaviota EGTB (based on tbprobe-0.2.2)
- can access PolyGlot opening book (but you do not need the PolyGlot adapter)
- supports many standard WinBoard protocol elements, including analyze mode
- supports non-standard commands: perft, divide, auto
- tested with WinBoard 4.4.2b


Some features that are not (or not yet) realized:
- Pondering
- Futility pruning
- Internal Iterative Deepening
- Late Move Reduction
- Null move verification search
- Pawn hash
- Parallel search
- Linux version
- 64 bit version (not much to expect from that while not using bitboards)


Endgame tablebases:

- KnockOut understands the Gaviota EGTB format and includes the original
  probing code (see "Origins" below). To make use of it requires either
  generating or downloading all 3-4-5 men tablebases from the Gaviota site.
  KnockOut does not include such files.
  The total size of all files is about 7 GB on disk. The files are already
  in a special compressed format.

  To tell KnockOut to use Gaviota tablebases I recommend to use the
  following WinBoard command line option (available with WinBoard 4.3.x and
  newer):

    /egtFormats gaviota:<PATH>

  where <PATH> is to be replaced by the path where you stored the EGTB files.

  WinBoard will then send the command "egtpath gaviota <PATH>" to KnockOut.
  KnockOut updates the path to the EGTB files each time it receives this
  command.

  KnockOut currently allows the CP4 compression format only.


Opening book:

- Knockout does not come with an own book yet. You can use any decent book
  in the PolyGlot format. When playing without a book, KnockOut will probably
  play much weaker, at least in the opening, and it will frequently repeat
  the same games. I have tested KnockOut with "book_small.bin" from Fruit 2.1.

  Copy your desired book file under the name "book.bin" into the folder from
  where you will run the KnockOut executable. You may also use a different
  path and/or file name, see "Options" below.


Options:

- Currently KnockOut knows the following options which can be set via
  the "option" WinBoard command (all option names are case sensitive),
  available with WinBoard 4.3.x and newer:

  option hashTableSizeMB=<sizeMB>

    sets the hash table size in MB (default: 256, min: 1, max: 2048);
    this will have an effect when starting the next game with "new"

  option gtbCacheSizeMB=<sizeMB>

    sets the Gaviota EGTB cache size in MB (default: 16, min: 0, max: 512);
    the value 0 will disable using the cache (not recommended);
    this will have an effect when starting the next game with "new"

  option bookDir=<path>

    sets the directory where the opening book is expected (default: ".");
    this will have an effect for the next move to think about

  option bookFileName=<fileName>

    sets the opening book file name (default: "book.bin");
    this will have an effect for the next move to think about

  option resign=<value>

    a negative <value> tells KnockOut that it should resign a game if the
    search returns <value> or even worse three times in a row;
    setting <value> to 0 disables resigning at all; positive values are
    rejected; the default is -600, minimum: -32000 (unit is centipawns);
    this will have an effect for the next move to think about

  With older WinBoard GUI versions these commands are not sent by the GUI
  to the engine. Instead you need to put these settings (if you want to
  use settings different from the defaults) into a configuration file named
  "knockout.ini" that must reside in the directory from where you run the
  engine. If "knockout.ini" is found at program startup time then it is
  read and evaluated once, and the settings can't be changed anymore during
  the whole program lifetime with older WinBoard GUI versions.

  The syntax of "knockout.ini" is simple:

  - Spaces and TAB characters at the beginning of a line are ignored.

  - Everything behind a comment character '#' up to the end of a line is
    ignored.

  - A line starting with the word "option" and followed by one of the
    <OPTION_NAME>=<VALUE> pairs described above is a valid setting, e.g.

      option hashTableSizeMB=64

  - A line of the format

      egtpath gaviota <PATH>

    is a valid setting (replace <PATH> by your EGTB folder).

  - Everything else is ignored, a warning may be printed.

  You may also use "knockout.ini" together with newer WinBoard GUI versions.
  Option settings sent by the GUI will then override the config file settings.

  There is a default version of "knockout.ini" in the package where all
  lines are commented out.


Origins:

KnockOut is an original work, it has been written from scratch completely
by the author and does not contain any code that was copied from, or
obtained by reverse engineering of, other chess engines, with one exception
listed below. Very few ideas from open source/GPL engines (mainly Fruit 2.1)
have influenced my development but were implemented differently without
reusing source code, so I consider my engine not to be a "derived work".
These ideas are:
- Interpolation opening <-> endgame for evaluation
- Structuring of the piece square table
- Recursive SEE

The only exception is the Gaviota tablebase probing code which is publicly
available from the Gaviota site and is used in KnockOut without ANY changes.
This is fully in line with the license conditions under which that probing
code has been published. A big "thank you" goes to Miguel Ballicora, the
author of the Gaviota EGTB, for making his great software available!!


License:

The executable program KnockOut can be used by everyone free of charge.
Its source code is protected by copyright law and is not publicly available.
It is strongly prohibited to publish any pieces of source code or compiled
code that have been obtained by reverse engineering, disassembling, or
decompiling the executable KnockOut program, or have been received by the
author itself as a private copy, unless the author has given explicit#
written permission.


Please report any bugs or problems to the author via email, see below.

I hope you have fun with KnockOut!


Sven Schle (sven _DOT_ schuele _AT_ gmx _DOT_ de)
04-June-2010
