Intro
-----

LittleThought is my first successful attempt at a chess engine. As the name implies, I don't consider it to be a great player although time may (hopefully!) prove me wrong.

I am mainly interested in improving the searching techniques and optimising performance. Adding chess knowledge is a lower priority because its too boring and I suck at it :D

Cheers,
- Nathan Thom (Australia)


LittleThought Details
---------------------

LittleThought is a UCI based chess engine and is tested under Arena by myself and has been successfully tested under a number of other GUI's by other people.

Download LittleThought from http://www.kimiensoftware.com
Contact me at nathanthom@gmail.com


UCI Options
-----------

Ponder       - When true enables pondering, but will only do so when instructed to by the GUI, as per UCI specs (default true).
OwnBook      - Enables use of the supplied book file (default true).
Hash         - Size in MB of the main hash table (default 64, valid 0-2048).
PawnHash     - Size in KB of the pawn hash table (default 1024, valid 0-4096).
EvalHash     - Size in MB of the eval hash table (default 16, valid 0-1024).
NumBeers     - Allows skill level modification - the more beers the dumber it will play (default 0, valid 0-10).
NumThreads   - Sets the number of threads to search with - dont use more than the number of physical cpu's available (default 1, valid 1-4).
LogStats     - Creates a CSV file with the stats from each search. It creates a new file for every new game in the working directory (default false).
TraceLevel   - 0 = None, 1 = some addition info string commands, 2 = lots of DEBUG output, 3 = dumps huge debug files (default 0, valid 0-3).
TimeBuffer   - Forces LT to think it has this many secs less than he really does for the time control. Used to avoid issue 
               with Polyglot on new cygwin.dll where a value of 15 works well (default 0, valid 0-60).
UCI_Chess960 - Enables a Chess960 game


Version History
---------------

v1.052 22/04/2010
- Fixed one more Chess960 bug!

v1.051 21/04/2010
- Fixed several Chess960 bugs
- Fixed display of illegal move error msg

v1.05 20/04/2010
- Added Chess960 support
- Re-implementation of multithreading, now uses YBWC and can use up to 8 threads
- Extensive retesting of all eval features and removed several misbehaving features
- Improved time management - can handle sub-second games and better able to extend/reduce time on searches
- Added divide command
- Fixed problem with using opening book
- Fixed crash with extremely long games
- Fixed a time control initialisation bug when switching between modes without restarting
- My testing:
  - @ 1s + 0.1s = +170 elo
  - @ 10s + 1s  = +110 elo
  - @ 60s + 1s  =  +60 elo

v1.04 07/11/2009
- Fixed illegal move bug encountered when playing long games (> 200 moves)
- Fixed bug with false single reply extensions being triggered
- Several performance enhancements throughout the code (~15-20% faster)
- Some endgame evaluation improvements
- Several improvements to the search reductions
- Better time management at very fast controls
- Rename UseBook to OwnBook as per UCI standard
- Fixed 64-bit compile options so the 64-bit program is significantly faster than the 32-bit one

v1.03 04/01/2008
- Rewrote move scoring algorithms
- Modified reductions/pruning
- Modified lazy eval settings
- Some debug logging enhancements
- Fixed hash write bug
- Fixed several SMP issues

v1.02 07/11/2007
 - Fixed bug in q search
 - Fixed bug in lazy eval
 - Complete redesign of node recognisers and vastly improved specialised endgame knowledge

v1.01 25/07/2007
 - Fixed SMP bugs (repetition, check extensions, root ordering)
 - Fixed hash indexing bug and tweaked memory utilisation
 - Fixed bug with mobility eval (was getting used randomly!) and improved it
 - Fixed bug in endgame recogniser
 - Fixed bug in 50 move draw check
 - Prevent LMR of killer moves
 - Added 50-move rule to internal node draw recognition
 - Improved single reply extensions
 - Tweaked extensions/reductions
 - Some performance improvements
 - Lots of eval fine tuning of values
 - Enhanced interior node evaluation

v1.0 03/02/2007
Bug fixes include:
 - Fixed eval problem with 50 move rule
 - Fixed bugs in move generator (was searching duplicate moves and skipping some legal moves)
 - Fixed bug in move scoring
 - Fixed bug in handling of "position fen" commands used to analyze games
 - Fixed issue with recognition of special endgame positions
 - Fixed bugs with rook eval
 - Fixed randomisation bug with book
 - Fixed issue with single reply extensions
 - Fixed UCI move number display
 - Fixed calculation of next ply estimated time
 - Fixed UCI lower/upper bound score output
 - Fixed horrendous hash bug
 - Fixed bug in PVS re-search
 - Fixed go depth command
 - Fixed repetition detector (and improved performance)
 - Fixed storing of mate scores in hash
 - Fixed pawn hashing bug
 - Added EP capture into check evasion move generator!
Improvements made:
 - Added eval cache (UCI param EvalHash default 16MB)
 - Improved pawn + bishop eval
 - Improved recapture extensions
 - Moved more eval into lazy eval section
 - Tweaked null move criteria
 - Added null move verification search
 - More endgame recognisers
 - Added penalties for losing castling rights
 - Added simple candidate passed pawn eval
 - Added connected passed pawns bonus
 - Reduced value of passed rook-pawns
 - Implemented fractional extensions and tweaked extension settings
 - Added passed pawn extensions
 - Tweaks to q search cutoff criteria
 - Improved passed pawn eval with queens
 - Tweaked Knight's piece square table
 - Improved KRvK strategy
 - Reduced underpromotion moves
 - Added knight outpost eval
 - Tweaked futility pruning criteria
 - Improved mobility eval
 - Tweaked LMR settings
 - Tweaked aspiration search
 - Tweaked recapture extensions
 - Added mate distance pruning
 - Special root move ordering
 - Rewrote hash replacement scheme and probing
 - Tweaked check extensions
 - Tweaks to time management
 - LOTS of performance enhancements
Other:
 - Removed 15 sec buffer from time controls used to workaround Polyglot issue with new cygwin dll (can re-enable it via new TimeBuffer parameter)
 - Reduced default pawn hash table to 1024KB and changed UCI parameter from MB to KB
 - Added support for go nodes xxx
 - Added more debug level output (tracelevel=2) to show all root move scores
 - Reduced volume of UCI info at shallow depths
 - Improved EPD file parsing for running test suites

v0.98 12/11/2006
 - Fixed stupid board drawing issue (when in console mode, not UCI)
 - Fixed several move generator bugs
 - Fixed incredibly stupid hash bug
 - Redesigned hash table for more efficient usage
 - Improved eval for knights
 - Added extended futility pruning
 - Replaced Verbose uci option with TraceLevel which allows various levels of debugging output

v0.971 08/11/2006
 - Fixed bug in eval for rooks
 - Added some additional knowledge to the eval for rooks and queens
 - Cleaned up some debugging code

v0.97 22/10/2006
 - Fixed several hanging and timing issues with Polyglot from v0.95 (yaay!)
 - Fixed nasty bug in move generator from v0.94
 - Disabled misbehaving mate threat extensions from v0.93
 - Modified Q search to avoid some types of horizon problems
 - Added single reply extension
 - Improved trans table aging method

v0.96 20/08/2006
 - Added UCI option logstats more for my benefit than anyone else's, but maybe other engine authors will find it usefull
 - Finally added some king safety eval
 - Modified null move pruning logic
 - Disabled I/O buffering to try and fix some Polyglot timing issues

v0.95 20/08/2006
 - PV Split parallel search implemented - up to 4 searcher threads supported (not much better than 2 though)
 - Cleaned up code alot to help in transition to SMP search and uncovered several bugs
 - Sends more regular and complete UCI stats
 - Some decent performance improvements (up to 30%)
 - Fixed bug in LMR and futility pruning criteria
 - Fixed several hashing bugs
 - Fixed time control bug
 - Fixed a bug with the boolean UCI parameters
 - Tweaks to aspiration search
 - Tweaks to time control usage
 - Removed some useless SSE2 code so it now works on older CPUs

v0.94 23/07/2006
 - Compiled 64-bit version (about 1.5x faster!)
 - Resized pawn hash entries for less memory usage
 - New opening book format to use less memory
 - Performance optimisations
 - Fixed futility pruning
 - Move ordering improvements
 - Initial changes to support multithreading
 - Added recogniser for KBNvK end games

v0.93 11/07/2006
 - Added end game score modifiers for some probable drawn positions
 - Added extra pawn end game knowledge (some KPvK stuff)
 - Fixed flush problem under Fritz GUI
 - Added skill level modification option (NumBeers)
 - Fixed UCI hash configuration problem
 - Improved futility pruning
 - Improved Q search
 - Fixed bugs in end game eval, pawn eval, king safety eval
 - Several performance optimisations
 - Added null move threat extensions
 - Modified move scoring

v0.92 15/06/2006
 - Removed Winboard support, UCI only now (too much overhead supporting two interfaces!)
 - Added recapture extensions
 - Fixed static eval symmetry bugs
 - Added some simple mobility scoring to static eval
 - Improved killer move handling
 - Improved LMR criteria

v0.91 05/06/2006
 - Fixed intermittent crashing bug

v0.90 03/06/2006
 - Fixed problem causing LT to lose on time in certain scenarios

v0.89 01/06/2006
 - Fixed null move bug
 - Improved Q search move ordering
 - Enhancements to pruning/reductions/extensions
 - Additional XBoard protocol support
 - Removed support for non-PVS searches

v0.88 21/05/2006
 - Enhanced UCI info
 - Fixed Q Search bug (caused false mate reporting among other things)
 - Improved move generator for check evasions (and fixed a few bugs!)
 - Fixed unstoppable pawn detection
 - Improved end game knowledge and draw recognisers
 - Slight improvement in move ordering with IID
 - Misc eval improvements (king safety, bishops, tropism)
 - Fixed bug with UCI position setup (position fen command)
 - Improved Q search move ordering

v0.87 15/05/2006
 - Completely rewrote move generator/make move to allow for improved move ordering/performance
 - Created very simple (and dumb) opening book (and created new option usebook)
 - Added futility pruning
 
v0.86 07/05/2006
 - Fixed null moves (yaaaay) and re-enabled them by default
 - Improved some end game eval
 - Fixed issue with mate scores (for real this time!)

v0.85 06/05/2006
 - Added pondering
 - Added go infinite and stop commands (allow analysis until told to stop)
 - Sends hash full % UCI info
 - Added verbose option (default false) to disable info string commands

v0.84 05/05/2006
 - Improved time control (may extend time if almost finished a ply on timeout, moves quick if only a single legal move)
 - Fixed yet another nasty move generator bug (how on earth did old versions ever win a game?)
 - Fixed issue with storing mate scores in hash table incorrectly

v0.83 01/05/2006
 - Fixed some king safety eval
 - Added additional Winboard commands: time, otime
 - Fixed and re-enabled pawn hash, plus some other performance improvements means it is ~50% higher nps now!
 - Improved pawn eval

v0.82 30/04/2006
 - Fixed bug in move generator causing some moves to be skipped!

v0.81 29/04/2006
 - Fixed problems with setoption command (was not using advanced search algos)
 - Fixed problem with MTD(f) search
 - Changed default search to PVS
 - Tidied some UCI info output
 - Fixed draw by repetition bug causing it to lose instead of draw
 - Improved null move logic (?)
 - Some additional eval logic (recognise insufficient material, improved pawns)
 - Fixed bugs in Q search
 - Fixed move generator bug (invalid killer moves)
 - Fixed bugs with null move and hash tables
 - Fixed bug with move ordering
 - Fixed some small memory leaks
 - Fixed bug in history scoring

v0.80 23/04/2006
 - First released version for ChessWar IX and WBEC Qualifying
