LEILA 0.53h (CIPS) - (c) 1999, 2002 C. Calzerano 
-------------------------------------------------



License Agreement
-----------------

YOUR USE OF THIS SOFTWARE INDICATES YOUR ACCEPTANCE OF ALL THE TERMS
OF THIS LICENSE AGREEMENT AND LIMITATION OF RESPONSIBILITY.

You can make as many copies as you need of the program itself and of
all the files which come in the zipped archive for your personal
use; you may install the Software on a hard disk or other storage
device; install and use the Software on a file server for use on a
network; and freely distribute the full zipped package for non
commercial purposes, providing that you don't add, remove or modify
any of the files contained in the zipped archive.
You can't sell, rent, sublicense or otherwise make money from Leila
or any of the files distributed with Leila, without the written
permission from the author.

You agree not to modify, adapt, translate, reverse engineer, decompile,
disassemble or otherwise attempt to discover the source code of the
software.

The author makes no warranty or representation, either express or
implied, with respect to this software, its quality, accuracy,
merchantability, or fitness for a particular purpose. This software is
provided "as is", and you, its user, assume the entire risk as to its
quality and accuracy. No warranty of fitness for a particular purpose
is offered.
The author is not responsible for any damages whatsoever, including
loss of information, personal injury, interruption of business, and/or
any damage or consequential damage without limitation, incurred before,
during or after the use of this software.



General Information
-------------------

Leila is a chess engine for Windows platforms (95/98/ME/NT/2000) written
in C++. It works under Tim Mann's graphical user interface WinBoard; for
information about XBoard/WinBoard, please visit Tim Mann's web page at
http://www.tim-mann.org/xboard.html.
Leila supports almost all the command in WinBoard protocol version 1;
editing, pondering and WinBoard analysis mode are all fully supported.

ATTENTION: The current version of Leila doesn't support the new WinBoard
protocol version 2: it works under newer version of WinBoard, but there
have been reported problems when the PREMOVE option is enabled; so you
have to disable WinBoard premove option for Leila to work correctly.



Included Files
--------------

In the zipped archive you will find the following files:

  - ReadMe.txt          This file
  
  - Book_ReadMe.txt     Information about Leila functions for book
                        building and using.
  
  - Leila_053h.exe      The executable; start it from the command
                        line to make sure everything is OK before
                        installing it into Winboard or other
                        interfaces.

  - Leila.dat           Engine data file; it must be in the startup
                        directory or Leila will exit with an error
                        message.

  - Leila.ini           Initialization file, where hash and EGTB
                        parameters are specified. Look at the comments
			inside the file for further infos.

  - Book.dat       	Opening book (by Carlos Pesce). If you are
  			interested in building an opening book for
  			Leila, please look at the book_readme file.

  - LeilaCmd.bat        The commands in this file are read and
                        executed by Leila at startup, just after
                        initialization and before start processing
                        Winboard/Console commands. It is not needed,
                        and often it is empty; could be useful to
                        provide some automation for example in
                        running testsuites or other kind of tests.
                        It is executed by the "fetch" command; look
                        at the "fetch" command description for info
                        on how it works.

  - Lct2.epd            LCTII testsuite epd positions file.
  - wac.epd             WAC testsuite epd positions file.

  - RunEPD.bat          Sample batch file, which runs both WAC and
                        LCTII testsuites one after the other. Just
                        start Leila from console, and type:

                        fetch RunEPD.bat

                        to run the batch. Look at comments inside the
                        file for further infos.


Installation
------------

Simply unzip the archive in the folder you like, and run the executable
from the same directory. To install the engine under WinBoard, please
refer to WinBoard documentation.



Leila Commands
--------------

Leila has a standard console interface mode which lets you to run the
program outside WinBoard. In addition to the WinBoard standard commands,
a description of which can be found in WinBoard documentation, Leila
supports a bunch of specific commands, mostly for testing and debugging
pourposes. A brief description of the most useful Leila-specific commands
is given below.


1) HELP    <command>     Shows the syntax of the specified command, with
                         a brief description. If no argument is given,
                         HELP lists all the supported commands.

2) SETFEN  <FEN string>  Allows to setup a FEN position (but doesn't
                         handles ep square and 50 moves rule counter)

3) FETCH   <filename>    Executes the commands in the file specified.
                         For example, LeilaCmd.bat is automatically
                         executed at startup. NB: the file can have
                         any extension, and the extension MUST be
                         specified along with the file name.

4) EPDTEST <file><secs>  Runs a testsuite: <file> must contain a set
                         of EPD strings with the best/worst move(s)
                         specified; Leila starts thinking on each of
                         the positions for the specified amount of
                         time and logs the result to the LeilaEpd.log
                         file (and to the screen too).
                         Solving time and solving nodes are logged
                         for every position in the set, and at the
                         end final results are summarized: number of
                         position solved, number of errors, timings
                         and a few other infos. 

7) NOISE   <secs>        Sets the noise level, i.e. the minimum
                         search time after which thinking infos can
                         be displayed. That's only to not fill the
                         screen and the logs with tons of infos;
                         the default is 3 seconds.

8) !                     Used to execute DOS commads: for example,
                         !dir prints the actual directory content,
                         and so on.


Leila Log files
---------------

Being still a testing version, Leila 0.53h generates LOTS of log info.
In the Log subdirectory, Leila creates a log folder for each day named
YYYYMMDD (year-month-day), where it stores log files (one for each
execution of the program, named Leila053h_HHMM.log where HHMM is the
startup time). These files are never deleted, so remember to cleanup
from time to time, to prevent your hard disk to be filled.
In the Log folder are saved also the testsuites results, generated by
the EPDTEST command.



Technical Details
-----------------

Move Generator:      Based on rotated bitboards architecture.

Search Algorithm:    Alpha-Beta/PVS with iterative deepening; no aspiration
                     window is used in the current version.

Move Ordering:       Hash/PV, SEE, 2 Killer and 4 History Killer moves.

Pruning Techniques:  Null-move based forward pruning (R = 2 or 3, based on
                     depth); Futility Pruning, Extended Futility Pruning and
                     Limited Razoring as described by Ernst A. Heinz (look 
                     at http://supertech.lcs.mit.edu/~heinz/dt/ for info).
                        
Search Extensions:   Checks, Promotion Threats, Recapture, Passed Pawn Push,
                     Null Move Mate Threat.

Transposition table: From 88 Kb to 1.4 Gb One Level table, with Depth-based
                     replacement scheme.

Pawn hash table:     From 60 Kb to 960 Mb.

Static Evaluation:   Quite simple; expecially lacks in king safety, and must
                     be tuned a little bit better.                       

Endgame Table Bases: Leila supports Eugene Nalimov's compressed EGTB format.

Comments:            Leila correctly recognizes and handles draws due to 50
                     moves rule, insufficient material and triple repetition
                     of position; doesn't resign automatically nor offer draw,
                     and doesn't handle draw requests. It generates a log file
                     for each game; remember to clear the LOG subfolder from
                     time to time to prevent filling the HD.



Known Problems/Bugs
-------------------

- Sometimes Leila spend too much time thinking and get flagged by the
  opponent, expecially in fast games with no increment.

- As stated above, Leila does not work correctly under newer versions of
  WinBoard when the PREMOVE option is enabled. 

- Leila does not offer draw and won't accept draw offering; it will not
  resign lost games either.


Acknowledgements
----------------

I learned almost everything I know about computer chess programming
reading the messages various people posted on the Computer Chess Club
forum (http://www.icdchess.com/forums/1) and studying open-source chess
programs like TSCP, GnuChess, Crafty and so on. I will write down a more
complete list of all the programmers and testers which helped me directly
or indirectly; but right now, I have to mention at least (in no particular
order):

- Dr. Robert Hyatt, Crafty's author, which gave me permission to use
  parts of Crafty code in Leila: all the EGTB-related stuffs, and some
  basic functions for bitboard handling like (FirstOne(), LastOne() and
  PopCount());
- Carlos Pesce, which provided Leila's book;
- Ciro Vignotto, which helped a lot with testing the engine;
- Tim Mann, Winboard's author;
- Frank Quisinsky, which offered the hosting space for Leila;
- Gianluigi Masciulli, Stefano Gemma, Luca Dormio, Claudio Della Corte,
  Alessandro Damiani, Marco Grella and all other founders and members
  of the G6 group (http://www.gsei.org);
- A lot of beta testers: Leo Dijksman, Gbor Szots, Gnther Simon, Brice
  Boissel; just to mention a few of them. And Lars Hallerstrm of course,
  which just played a bunch of games but was able to finally convince me
  to release the program. ;-)

Last but not least, special thanks to ARTURO OCHOA, which is the author
of Leila's tournament book and helped a lot improving the engine, by
testing, running matches, analyzing games, reporting bugs and holes, and
suggesting various enhancements and new features to implement. In the last
few months he probably spent on Leila more time than myself, I must say.

I surely forgot to mention a lot of people. My apologies; just let me
know and I'll add you on the list immediately!

Additionally, I have to mention that I got the random 64-bit number used
for hashing from Arasan sources (too lazy to implement my own generator).


Contacting The Author
---------------------

For further information about Leila implementation, please contact the
author at the following mail address: carmelo@stetel.com.
Bug notification, as well as comments and suggestions are welcome.

