Deuterium v12.01.30.1070
readme
July 29, 2012

Contents:
A. Introduction
B. Acknowledgement
C. Distribution files
D. Engine Internal Features
E. Engine Development History
F. Engine Capability Features
G. Engine books
H. Auto saving of games
I. Commands
J. Strength - rating
K. To do lists
L. Address

A. Introduction
Deuterium is a winboard chess engine, that is based on a chess program
TSCP by Tom Kerrigan. You can use Deuterium as an engine to run on a 
Graphical User Interface (GUI). An excellent free chess GUI called winboard
developed by Tim Mann and H.G Muller can be used to play a game. Another chess
GUI called Arena by Martin Blume can be found at http://www.playwitharena.com.

B. Acknowledgement
1. Tom Kerrigan    – the author of TSCP from where Deuterium
   is based, thanks for the permission.  
2. Dieter Buersner – gives me ideas on the basic concept of how 
   computer plays chess. He is also the author of the strong interesting
   program YACE.
3. Leo Dijksman    - for authoring a great computer chess tournaments and
   hosting Deuterium.
4. Bob Hyatt       – interesting posts at CCC, and the open source code
   of his strong program Crafty, I read crafty source codes from time to time.
5. Dan Corbit	   - his site contains a lot of information about computer
   chess programming, including source codes to study.
6. Bruce Moreland  – excellent web site about comptuter chess programming.
7. Ed Schroder     – very informative and excellent writings about his
   chess engine Rebel, One of my inspirations to study more on chess programming.
8. Tim Mann        – he is responsible for the further development of
   great chess GUI called winboard.
9. Martin Blume    - Developer of a beautiful Chess GUI called Arena.
10. Odd Gunnar Malin - a chess programmer who develops winboard to UCI adapter
   so that winboard engine can run as UCI engine in Chess interface like Chessbase
   GUI and others.
11. All authors of computer chess programing articles.
12. Computer Chess Club - good place to sharpen/broaden computer chess knowledge.
13. Winboard Chess Forum - informative forum about winboard and computer chess,
    including chess tournaments and programming. 
14. All the people who have tried to test and play Deuterium.
15. Deuterium has a logo now, thanks to David Dahlem and Graham Banks.
16. All programmers who have shared source codes of their programs.
17. Daniel Shawul - a programmer of chess program Scorpio is responsible in generating
    end game bitbases (egbb). He also writes the dll and provided some codes
    so that the end game bitbases can be used by other chess engines. Deuterium can
    now use the bitbases.
18. Cutechess-cli - an interface to play between engines capable of playing a very short
    time control with concurrency support. This tool is very useful for testing engines 
   developed by Ilari Pihlajisto and Arto Jonsson.
19. To CCRL team for testing Deuterium
20. To CEGT team for testing Deuterium
21. Thanks to Frank Quisinsky of SWCR for ponder On testing


C. Files
1. deuterium v12.01.30.1070 64bit.exe
2. deuterium v12.01.30.1070 64bit sse.exe
3. deuterium v12.01.30.1070.exe
4. deuterium.ini
5. deuterium.bin
6. deuterium v12.01.30.1070 readme.txt


D. Program Feature
1. Search 
- Principal Variation Search (PVS)
- Quiecense search
- Iterative deepening with aspiration window
- Internal Iterative deepening
- Transposition Hashtable


2. Search Reduction / Prunnings
- Late Move Reduction (LMR)
- Futility prunings based on move statistics and static evaluation 
- Lossing capture pruning by SEE in quiecense search
- Null move pruning

3. Evaluation
- Material and Position evaluations
- Evaluation cache
- Pawn hashtable

4. Move ordering
- Moves from hashtables
- Non-capture mate killer moves
- Capture moves ordered by Static Exchange Evaluation (SEE)
- Non-capture killer moves
- capture killer moves
- History heuristics with piece-square tables

5. End game bitbases (egbb)

6. Opening Book

7. Opening learning system
- records bad opening lines

E. Engine History   
Version 1.0
1. Added aspiration window search
2. Added null move heuristic
3. Added recapture, 7th rank pawn push and ending extensions
4. Able to claim draw due to insufficient material
5. Added feature to resign when the score of the last 3
   moves is less than or equal to -700 (7 pawns)
6. Added Killer moves for move ordering
7. Modify history heuristics
8. Improve static evaluation
9. Improve time control handling for conventional and
   incremental time controls.
10. Provided 4 books to use, 2 for white (wsmall.dbk & wbig.dbk),
   and 2 for black (bsmall.dbk & bbig.dbk).
11. Some code optimizations

Version 1.01
1. Fixed a bug where the engine can not play more than
   one game in a series of games under winboard when
   either one of the 4 books is missing.
2. Fixed a minor bug in pawn evaluation.
3. Added knight outposts in evaluation.
4. Rewrite king evaluation codes
5. Small opening books are updated (wsmall.dbk and bsmall.dbk)
6. Remove "update.txt" and use only "readme.txt" as information source.

Version 1.02
1. Fixed a couple of bugs at evaluation functions
2. Added bishop and rook mobility
3. Modify aspiration window search scheme
4. Updated small books (wsmall.dbk and bsmall.dbk)
5. Modify resign code
6. Some tweaks to king evaluation
 
Version 04.01.04.18
notes on new version numbering system:
04 -- last 2 digit of the year this version is released, (year 2004)
01 -- first release on the above year, (1st for 2004)
04 -- total number of releases since the 1st release, (4th overall)
18 -- number of development versions since the last release, (18th since v 1.02)

1. Fixed some bugs in pawn evaluation
2. Improve bishop and rook mobility codes in evaluation function
3. Improve king safety evaluation
4. Added piece mobilities in move ordering
5. Added piece attacks to king in move ordering
6. Added connected passer evaluation
7. Do check extension in qsearch
8. Updated small books (wsmall.dbk and bsmall.dbk)
9. Improve time control handling
10. Optimize some codes
11. Version numbering system changed, to improve readability
   of program version informations for both user and me.  

Version 04.02.05.12
1. Fixed a bug where Deuterium will not accept under promotion
2. Remove piece mobilities in move ordering
3. Remove check extension in qsearch
4. Remove piece attacks to opp king in moveordering
5. Added knowledge on rook-pawn and wrong bishop color ending
6. Added knowledge on rook vs connected passer at 6th rank ending
7. Done some speed up using two attack functions
8. Is able to play more than 200 moves
Major Tournament Result Achievement:
1st in Division 6 of Edition 7 done by Leo Dijksman

Version 04.03.06.68
1. Fixed a lot of bugs in search extensions
2. Fixed a lot of bugs in eval
3. Draw claim by insufficient material is improved/fixed, rare mate
positions with minor pieces remaining should have been avoided.
4. Remove bishop and rook mobilities in eval for a little speed up.
5. Now using fractional extensions
6. Modify attack functions
7. Modify move ordering, piece attacks to square
near opponent king position is enabled
8. Improve bishop eval so that immobility is avoided
9. Added some search informations after searching a move
10. Updated two small books
11. Initialization file is added to handle book and resign options.

version 04.04.07.19
1. improve extension
2. remove recapture ext, remove 3xcheck extension
3. improve evaluation
4. fixed a bug in book option in initialization file
5. improve history and killer heuristics
6. implement some pruning in main search
7. remove aspriration window scheme

version 05.01.08.62
1. Fixed some ending evaluations
2. Use transposition table
3. Improve evaluation on castled/uncastled king in the opening
4. Improve history heuristics
5. Count material in makemove() and unmakemove()
6. Implement easy move when the king is in check
7. Added recapture extension with limits
8. Limit all except check extension
9. Use aspiration window scheme
10. Added rook mobility in evaluation

version 05.02.09.04
1. Modify evaluation
2. Improve extension
3. Modify hash codes

version 05.03.10.06
1. Fixed some bugs in transposition table codes

version 05.04.11.14 (released for ChessWar tournament)
1. Use new method to store positions

version 05.05.12.08
1. Remove rook mobility
2. Added Internal Iterative Deepening

version 05.06.13.01
1. Fixed a bug by declaring a variable as global instead of a local.

version 05.07.14.01
1. Remove Internal Iterrative Deepening

version 05.08.15.12
1. Improve history heuristics
2. Improve Null move pruning

version 05.09.16.59
1. Fixed some bugs in killer moves, move ordering, minor piece ending
and potential passer evaluation.
2. Remove Razoring, and recapture extension.
3. Remove extension limits on pawn push to 7th rank,
minor ending and pawn endings.
4. Improve kpk, rook, bishop and knight evaluation.
5. Improve transposition table codes and null move heuristics.
6. Added Bishop mobility.

version 05.10.17.11
1. Fixed yet another bug in mate killer moves
2. Improve move ordering.
3. Improve search extension codes.

Version 06.01.18.41
1. Fixed a bug in king safety eval
2. Bug fixes in evaluation of positions where materials are not equal.
3. In qsearch, when in check, only return beta if evaluation less some margin
   can make it to beta.
4. Added pin scoring in evaluation function.
5. The use of End game bitbases is now possible because of Daniel Shawul.
   Egbb of Scorpio can also be used by Deuterium. Please see the modified deuterium.ini
   file. Modify the "EGBB PATH" for the actual egbb location on your hard drive.
   Included in this release is the file egbbdll.dll, put this in the directory where
   the egbb files are located. Please be noted that egbb will use 18MB of memory.
   To verify that egbb is loaded, start deuterium in console mode and you will notice
   the comments that egbb is loaded.

Version 06.02.19.01
1. Version to avoid loss on time, Many thanks to Leo Dijksman
for the info about the bug of the last released version.

Version 06.03.20.106 (june 11, 2006)
1. Implemented auto-saving of games in pgn format.
2. Added support for setboard command.
3. Added book learning, bad opening lines will be written to 2 files,
in the next version, these files will be used automatically by the engine.
Currently the files generated will be used to improve books manually.
4. Added Internal Iterative Deepening.
5. Added Late Move Reduction.
6. Improved static evaluation
7. Added extended futility pruning.
8. Use adaptive null move pruning (R=2/3)
9. Improve time management, quick recapture, extend when close to trouble
and abort search if remaining time is not enough to search next iteration.
10. Improve probing of endgame bitbases, many thanks to Daniel Shawul.

Version 06.04.21.01
1. Improve evaluation function
2. Disable futility pruning
3. Modify LMR

Version 06.05.22.01
1. Minor Optimization to search function
2. Use new compiler with a speed up gain of about (50%)

Version 06.06.23.04
1. Some improvement to evaluation
2. Modify Late Move reduction

Version 06.07.24.77 (9Nov06)
1. Modify Late Move reduction
2. Improve probing of egbb
3. Improve Evaluation
4. Record bad games played by Deuterium (with result)
5. Improve recording of unclear opening line (no game result)
6. Modify check in qsearch

Version 06.08.25.04 (15Nov06)
1. Added knight mobility
2. Added futility pruning
3. Do not check in qsearch
4. Improve hashtable replacement scheme
5. Improve the two small books

Version 09.01.26.492 (21Dec09)
1. Rewrite evaluation function. This version has the information of all attacked squares.
Passer evaluation is improved as well as king safety.
2. Added piece list to improve board scanning speed, on evaluation and move generations.
3. Added evaluation cache.
4. Added pawn hashtable (size is not settable at the moment) default is 4mb.
5. Incremental hash updating is implemented.
6. Modify futility pruning.
7. Added static exchange evaluation (SEE) to help order capture moves, and prune moves
with minus SEE in qsearch.
8. Added capture killer moves, these are lossing capture moves that produces a cutoff.
9. Improve time control handling, this version is able to handle 40 moves.
in 5 sec time control. Also this version can now handle time in minutes:seconds format.
10. Added Pondering.
11. Added analyze command, this is possible only in xboard/winboard mode.
12. Added new book with a different format, epd lines with pv moves (long algeraic only)
can be used as opening book.
13. Ability to save position in fen format for first position out of book, this can be
used to expand opening book in epd format after supplying with pv moves.
14. Modify deuterium.ini file, added Ponder, kibitz and eval_cache options.
15. Added bench command to search 10 bench positions 
(opening, middle and ending positions), under console window, you can type bench 0, 
if it takes more time on your computer, you may type bench -1, 
so that the default depth will be subtracted by 1, however if you want the bench to 
finish longer you may type bench 1, or bench 2.
 
Version 10.01.27.213 (15Nov10)
1. Modify evaluation codes on piece mobilities - do not inlude x-rays
2. Modify rook evaluation on open files and half open files
3. Tune rook at 7th and 8th rank bonus score in evaluation
4. Added queen and rook piece square tables
5. King piece square tables now use 2 tables, 1 for opening and for ending
6. Save null move search info to transposition table
7. Added win evaluation pruning in search()
8. Added loss evaluation pruning with qsearch verification in search()
9. Modify see() routine - calculate sliders that might pin pawn attackers
10. Added futility pruning in qsearch()
11. Updated big books
12. Fixed minor bugs everywhere, improve code readability.
13. Added option "Gui" in deuterium.ini file so that Deuterium will know which 
Gui it is run. This also will fix analyze mode under arena gui, when you set Gui
arena in deuterium.ini file.
14. Added check evasion routine to handle move generation when side is in check.
15. Added non capture check move routine for qsearch()
16. Modify null move conditions - do not do null move if previous move is a hash move,
or mate killer move, also modify depth reduction R
17. Improve probing of bitbase, use piece list instead of scanning the whole board to locate pieces

Version 11.01.28.159 (06Apr11)
1. Fixed minor bugs in null move pruning conditions.
2. Fixed minor bug in null move pruning verification search.
3. Improve SEE x-rays.
4. Added LMR in root search.
5. Added LMR on capture moves.
6. Added aggressive depth reduction in LMR for non-capture moves.
7. Added IID on non-pv nodes.
8. Modify IID on pv nodes.
9. Implemented searching hash move first before generating other moves.
10. Added Time_Increment_Factor option in deuterium.ini file to reduce increments
   in seconds when used in cutechess-cli interface playing against uci engines.
11. Improve move ordering for generate_evasion routine.
12. Improve code readability.

Version 11.02.29.107 (15Dec11)
1. Bug fixes on time control setting when game is started from setboard command
2. Tune search reductions and evaluation
3. Added lazy eval
4. Added delta prunning in qsearch
5. Added bad move history heuristics
6. Modify good move history heuristics
7. Added support for winboard nps command
8. Disable kibitz option in .ini file, from now on have to rely on winboard GUI

Version 12.01.30.1070 (29July12)
1. Time control bug fixes
2. Modify search prunning and reductions
3. Modify search extensions
4. Some parts in move generation and evaluations are now using bitboard
5. Modify move ordering
6. Use staged move generation for winning capture and hash moves
7. Added support for polyglot book
8. Modify deuterium.ini file



F. Basic Engine Feature Capability
1. Move now---------------------------------------NO
2. Edit Mode--------------------------------------YES
3. Analyze Mode-----------------------------------YES
4. Opening Book-----------------------------------YES
5. Create Book------------------------------------YES
6. Ponder On/Off----------------------------------YES
7. Hash Tables------------------------------------YES
8. End Game database------------------------------YES
9. Draw Claim-------------------------------------YES
10. Resign----------------------------------------YES
11. Force and Go----------------------------------YES
12. Program Language------------------------------C
13. Source Available------------------------------NO
14. Learn-----------------------------------------YES
15. Xboard----------------------------------------YES
16. UCI-------------------------------------------NO


G. Engine Books
You can create books for deuterium using polyglot.exe file.


H. Auto saving of Games
Games played by Deuterium can be saved to DeuteriumGames.pgn file however it can
be disabled by editing the option in Auto_Save_Game to OFF in deuterium.ini file. 
Saving of games is only possible if Deuterium received the result command.


I. Commands
you can type "help" after executing deuterium.exe

When playing under winboard, typical entries in winboard.ini file are:
"deuterium" /fd="c:\winboard\deuterium"
"deuterium" /sd="c:\winboard\deuterium"


J. Strength
1. Deuterium v11.02.29.107 (previous version)
CCRL 2663 at 40 moves / 40 min, ponder OFF
CEGT 2515 at 40 moves / 20 min, ponder OFF

2. Deuterium v12.01.30.1070 64bit
Around 10 to 20 elo stronger over previous version based from personal test.


K. To do list
1. Analyses of game records to catch bugs or as basis for improvement
2. Read / review codes to catch errors and improve codes


L. Web address
Web: https://sites.google.com/site/deuteriumengine/

