Evert Glebbeek's 2009 Chess Program (working name: "Jazz")
eglebbk@dds.nl


LICENCE
-------
Until the code reaches a mature enough level that I consider it ready for
release under a more proper licence (probably zlib, MIT  or BSD), the
following conditions apply:
 1. You use this code at your own risk. I will not accept responsibility
    for any damage to yourself or your computer that may result from using
    this code.
 2. You may not make changes to the code and claim the code as your own.
 3. You are free to hack the code around as much as you like for personal
    use.
 4. If you redistribute modified code, please make clear the origin of this
    code and clarify the modifications you made.
 5. If you distribute a binary of the code, please indicate clearly which
    version of the code you used to compile it and what changes you made.
    Alternatively, include the (modified) source code.
 6. If you find bugs or improvements, please let me know about them!
That said, none of the ideas used in this code are particularly new and
they can be found and documented in many on-line resources.

PRELIMINARIES
-------------
To install "Jazz" you will need the following:

 * A copy of the source code (no executables available for download yet)
 * A copy of the GNU C compiler (recentish version, C99 compatibility
   required; MSVC may or may not work)
 * A recent version of Allegro 4.9

The latter dependency is structly speaking optional, but since there is no
other user interface, you'll probably want to use it.
For optimal performance, you will also need

 * A 64 bit operating system

On the last test, the code ran about a factor 2 slower in 32 bit, so it
makes quite a bit of difference. The code will compile and run fine in 32
bit mode, however.
NOTE: I have so far only tested the code on OS X, although it should work
without too much trouble (if any) on Linux.

INSTALLING
----------
Assuming you have Allegro installed and working properly (preferably in 64
bits), all you should have to do is run "make" from the terminal. You may
want to open up the Makefile in your favourite editor and change some of
the defaults, although the defaults should work on OS X and Linux.
You'll likely get some warnings, which you should be able to ignore
without problems. If everything goes well, you should end up with two
executables, "a5jazz" and "cjazz". The former is the Allegro-based
interface that lets you play against the program. The latter is a small
console application that loads a test position and tries to solve it,
printing some statistics to the terminal. You'll probably only want to run
the former.
There is also "make test", which will generate "test_jazz". This loads the
"Win At Chess" set of test positions and runs them through the engine (with
10s per move) to score how it performs. It currently scores about 262/300
on my machine (which isn't a very good result).
You can start the program by "./a5jazz" from the terminal.

Alternatively, you can use Jazz through a UCI (Universal Chess Interface)
GUI: run "make ucijazz" to compile the UCI version of Jazz (called
ucijazz). Simply open up your favourite GUI and load Jazz as an available
engine.
Note, however, that UCI support is somewhat experimental: I find that it
works in practice, but not all options are implemented and the
implementation currently doesn't adhere to the UCI specification in all
details (in particular, you cannot interrupt the engine while it is
thinking; I'm not sure what will happen if you try to enable pondering).
To run Jazz using an interface like XBoard, you'll nead a UCI->xboard
translator. I use "polyglot" myself.

I know, it's all a bit annoying. This'll all get better eventually!

USING
-----
The a4jazz interface is a bit "minimal" at the moment, but it does allow
you to play a game against the computer or make it solve a test position.
You will see three windows: a chess board representing the current
position, the list of moves played so far (on the right of the board,
though only the first 20 moves are shown) and a window that will hold
output messages from the search. This last window can be resized and
scrolled.
The program's time is currently hard coded at 5 seconds per move. If you
want to change it, you'll have to modify the function "computer_timer" in
src/interface/a5jazz.c.
To move a piece, simply click on the piece you want to move and click on
the destination square. If the move is legal, the piece will be moved there
(the reverse also works, but there is no indicator for the selected empty
square).

Keyboard controls:

Arrow keys        Move the blue cursor around the board
Enter             Select the piece/square under the cursor
Space             Tell the engine to play a move (it will not move until
                  you tell it to)
Delete            Start a new game from the initial position
Backspace         Undo (take back) the last move
Tab               Advance to the next move, if any (undoes backspace).
                  You will not be able to do this if you take back a move
                  and then press space to make the computer think.
F5                Load position from an EPD file. Although EPD files can
                  hold multiple positions, this will only load the first
                  one.
F6                Save the current position to an EPD file.
Escape            Quit (unconditionally).
< and >           Cycle through the available figurine sets (three at the
                  moment)

ACKNOWLEDGEMENTS
-----------------
The opening book comes from
http://www.frayn.net/beowulf/bigbook.zip

The figurine sets come from
http://www.enpassant.dk/chess/
