Surprise - A WinBoard Chess Engine
(Last update: 19-Oct-2007)
This page presents the WinBoard chess engine "Surprise".
It is a free, non-commercial, amateur engine playing chess - nothing
more. There is no warranty that it works as expected. Downloading
and installing it is at your own risk.
The playing strength of Surprise-4.2.8 is about 1900 (WBEC: 1869 after
edition 14). For version 4.3-beta13 there is no rating available yet.
Download the current version
Change log
Changes in 4.3-beta13 against 4.3-beta11:
- Urgent bugfix, Surprise did a wrong drawclaim already at the first repetition
of a game position (so part of the last "improvement" was really wrong)
- Jim Ablett has provided a fast windows build (Intel C++ 10 PGO) of this release,
many thanks for your support, Jim!
Changes in 4.3-beta11 against 4.3-beta1:
- Changed move ordering code, now using SEE for potential losing captures in QS
and otherwise a clean MVV/LVA
- Slightly changed repetition handling, now returning draw within the tree already
when detecting first repetition
- Added Linux support (there will be an official Linux release, too)
- A couple of internal changes
Changes in 4.3-beta1 against 4.2.8:
Unfortunately I am not able to look at the code diffs anymore. This is because I
had lost all my original sources of the 4.2.8 release (and also of several older
releases) after some "data accident" on my hard disk in 2006. I was able to
recover large parts of my recent sources and could continue my work but at that
time I had already made many changes to the original 4.2.8 version.
I could try to summarize what I did, but this time I think it is not worth the
effort because I would mix up things that already happened in 4.2.8 with newer
changes. Most of my changes were one of these:
- Improvements of search, evaluation and hash table code
- Bugfixes
- Minor cleanups
- Internal reorganizations (there were many of these)
Changes in 4.2.8 against 4.2.7:
- Several, but I forgot what I did :-)
Changes in 4.2.7 against 4.2.6:
- Fixed a bug reported by Leo some months ago that, under certain circumstances,
resulted in not sending a "result" string after end of game.
- Implemented simple "blind bishop" detection.
- Improved move ordering again.
- Several internal improvements and code restructuring with little impact on strength.
Changes in 4.2.6 against 4.2.5:
- Hopefully fixed another mate score hash bug
Changes in 4.2.5 against 4.2.4:
- Fixed a really horrible searcher bug: sometimes the engine played the best move from
the previous iteration although the final iteration had already found that another move
was better!
- Slightly improved branching factor by fixing a bug in hash collision detection code;
many Queen moves from hash table were classified as "not pseudolegal", causing a "false positive"
hash collision and therefore many unnecessary researches
- Slightly improved move ordering by considering attacks if the moving piece is a pawn
or knight and attacks a higher-value piece with this move
Changes in 4.2.4 against 4.2.3:
- Improved move ordering by introducing history heuristic and solving other ordering problems
- Fixed bug in hash table mate scoring which caused Surprise to show very artificial
scores and sometimes also to miss the shortest mate
- Slightly reduced code size (8%) by removing some debug-only code which was contained in the
release version by accident but was never called
Changes in 4.2.3 against 4.2.2:
- Hash key bugfixes concerning ep and castling! (but this did not help much ...)
- Skip some losing captures in qsearch now (still not using SEE)
- Slightly improved move ordering
- Avoid move generation on hash move cutoff now
- Added "pawn to 7th rank" extension at horizon nodes
- Book loading speedup (legality checking of book moves was too slow)
- A couple of internal code improvements
Changes in 4.2.2 against 4.2.1:
- Enabled existing nullmove implementation after fixing bugs, should work now!
- Several smaller changes and bugfixes in search and hashtable
Changes in 4.2.1 against 4.2:
- Small bugfixes in opening book
- Small bugfixes in searcher
Changes in 4.2 against 4.1.6:
- Faster compiler (the free MSVC++), speed improved about 30-40%
- Found and fixed many bugs in search, evaluation, position editing (but still no "setboard" implemented :-( )
- Reimplemented basic code pieces for detecting checks or illegal moves to get closer to "legal move generation";
now also little bit faster
- Cleaned opening book (there were many duplicate lines and some illegal moves, too)
- Added "resign=[on|off]" to possible ini file settings
- Implemented a way to tell the engine via opening book that it should avoid certain positions
(by just putting a '-' behind the move, thanks to Arturo Ochoa for your proposal!)
- Heavy internal restructuring
- Again some smaller speedups
Changes in 4.1.6 against 4.1.5:
- Several major bugfixes in evaluation! (Incredible how it could survive before ...)
Changes in 4.1.5 against 4.1.4:
- Bugfixes in hash table implementation (hash table usage was below 1% due to 32-/64-bit problems)
- Small bugfixes in search
- Improved evaluation (trading bonus, increased bonus for bishop pair)
- Some smaller speedups
- New book version, again provided by Arturo Ochoa
Recommended settings:
When playing against another engine on a
single-processor machine, you should set ponder=OFF in most cases (note
that pondering is not yet implemented in "Surprise").
Beginning with Surprise-4.1.3, a main hash table is used with an internal
default size of 64 MB. This value can be changed via config file "surprise.ini".
Endgame tablebases are not yet supported.
Unzip the archive to any directory you like.
Surprise looks for the opening book
in the current working directory from where you run the program.
Download older versions
Please note: older versions marked with (**) may have had some
time management problems, especially in incremental mode!
Source code
Up to now I did not decide whether the source code will be publicly available.
About the engine
- The current version runs on Windows only, but a Linux version is planned.
- The engine currently only supports WinBoard (xboard) as GUI.
Some people have reported that Surprise would run without problems
under UCI and Arena.
- The engine supports WinBoard protocol version 2, with few exceptions
(see below).
What's still missing:
- Pondering
- Using endgame tablebases
- Selective search extensions
- Polling for input while thinking; in particular the '?' command
("move now") does not work yet
- Commands "time"/"otim" not implemented
- "playother", "hint", "bk", "analyze"
About the author and the engine's history
Sven Schüle, born on 11-Mar-1965, living in Berlin (Germany).
Studied computer science, now working as a freelancer in software
development projects. Playing chess in a club since 1981, current
national rating about 1870 ("DWZ"). First chess programming activities
started in 1986 together with my friend Frank Sek. Later on I wrote
some private chess programs on an Atari ST and then on a Win95 PC.
The first version of "Surprise" was created about 1991 on Atari.
Versions 3.x (still private, developed in 2000/2001) were the first
versions playing at least acceptable chess. After 3 years break,
I continued development in 2004.
Contact: Sven dot Schuele at gmx dot de