The Chess Evaluator Specification
=================================

Overview
--------

A chess evaluator is a program that is invoked with a chess position
as its argument.  It calculates the evaluation of the position and
prints evaluation information on its standard output as it is found.  

An evaluator differs from a chess engine, as it only evaluates one
position, and is killed when it is not needed anymore.    

An evaluator need not cope with synchronisation issues, as it only
calculates, and doesn't read its input.  

The position is given via the command line in FEN notation. 

Non-parallel chess algorithms should be implementeable as a chess
evaluator without the use of threads, polling or signals. 


Portability
-----------

The chess evaluator specification is intended to be used internally in
BabyChess.  Currently, only `baby_chess_evaluator' implements it.  In
the future, programs such as `baby_parallel_chess_evaluator' and
`xboard_chess_evaluator' may be added. 


Invocation
----------

chess_evaluator  "POSITION"

POSITION is the position to analyze in FEN notation.  If no position
is specified, analyze the initial position.  The position is passed as
a single argument. 

Moves in the evaluator output are given in simple chess notation (e2e4, g1f3,
e1g1, c7c8q).  

Evaluation is given in chess evaluation notation as documented in
`etc/CHESS-EVALUATION'.   


Output
------

An evaluator writes its evaluation on standard output one line at a
time.  Each line begins with a keyword.  The program may output other
keywords that are not listed here ; these will be ignored by the
parent process.  New keywords can be added without breaking backward 
compatibility. 


Keywords
--------

depth N
  
      Begin analysis at depth N.

main MOVE

      The new main variation (only one move is given) 

move MOVE EVALUATION

      Evaluation of MOVE.  

eval EVALUATION

      The evaluation of the position is EVALUATION. 

knots KNOTS

      Number of knots calculated. 
