4 Glaurung is a free UCI chess engine. It is not a complete chess
\r
5 program, but requires some UCI compatible GUI (like XBoard with
\r
6 PolyGlot, eboard, José, Arena, Sigma Chess, Shredder, Chess Partner,
\r
7 or Fritz) in order to be used comfortably. Read the documentation for
\r
8 your GUI of choice for information about how to use Glaurung with your
\r
11 Glaurung 2 is a completely rewritten version of Glaurung. Apart from
\r
12 the parallel search code, almost no code is shared with Glaurung
\r
13 1.2.1, the previous stable version. The new program is clearly
\r
14 stronger than the old, but has a less attractive style of play,
\r
15 because there are still a few major holes in its evaluation function
\r
16 (most notably space and development).
\r
18 This version of Glaurung supports up to 8 CPUs, but has not been
\r
19 tested thoroughly with more than 2. The program tries to detect the
\r
20 number of CPUs on your computer and set the number of search threads
\r
21 accordingly, but please be aware that the detection is not always
\r
22 correct. It is therefore recommended to inspect the value of the
\r
23 "Threads" UCI parameter, and to make sure it equals the number of CPU
\r
24 cores on your computer.
\r
30 This distribution of Glaurung consists of the following files:
\r
32 * Readme.txt, the file you are currently reading.
\r
34 * Copying.txt, a text file containing the GNU General Public
\r
37 * src/, a subdirectory containing the full source code, including a
\r
38 Makefile that can be used to compile Glaurung on Unix-like
\r
39 systems. For further information about how to compile Glaurung
\r
40 yourself, read section 4 below.
\r
42 * MacOSX/, a subdirectory containing excutables for Apple Macintosh
\r
43 computers running Mac OS X 10.4 (Tiger) and newer. There are two
\r
44 executables, one for OS X 10.4, and one for OS X 10.5. The
\r
45 executable for OS X 10.4 will work in 10.5 as well, but the one
\r
48 * LinuxX86/, a subdirectory containing 32-bit and 64-bit x86 GNU/Linux
\r
51 * Windows/, a subdirectory containing 32-bit and 64-bit Windows
\r
54 * polyglot.ini, for using Glaurung with Fabien Letouzey's PolyGlot
\r
61 This version of Glaurung has experimental support for PolyGlot opening
\r
62 books. For information about how to create such books, consult the
\r
63 PolyGlot documentation. The book file can be selected by setting the
\r
64 UCI parameter "Book File".
\r
66 A book file contributed by Salvo Spitaleri can be found on the
\r
70 4. Compiling it yourself
\r
71 ------------------------
\r
73 On Unix-like systems, it should usually be possible to compile
\r
74 Glaurung directly from the source code with the included Makefile.
\r
75 The exception is computer with big-endian CPUs, like PowerPC
\r
76 Macintoshes. Some of the bitboard routines in the current version of
\r
77 Glaurung are endianness-sensitive, and won't work on a big-endian CPU.
\r
78 Ensuring that the line with #define USE_32BIT_ATTACKS" near the top
\r
79 of bitboard.h is commented out should solve this problem.
\r
80 Commenting out the line with "#define USE_32BIT_ATTACKS" near the
\r
82 There is also a problem with compiling Glaurung on certain 64-bit
\r
83 systems, regardless of the endianness. If Glaurung segfaults
\r
84 immediately after startup, try to comment out the line with
\r
85 "#define USE_FOLDED_BITSCAN" near the beginning of bitboard.h and
\r
88 Finally, even if Glaurung does work without any changes on your
\r
89 computer, it might be possible to improve the performance by changing
\r
90 some of the #define directives in bitboard.h. The default settings
\r
91 are optimized for 64-bit CPUs. On 32-bit CPUs, it is probably better
\r
92 to switch on USE_32BIT_ATTACKS, and to use BITCOUNT_SWAR_32 instead of
\r
93 BITCOUNT_SWAR_64. For computers with very little memory (like
\r
94 handheld devices), it is possible to conserve memory by defining
\r
95 USE_COMPACT_ROOK_ATTACKS.
\r
102 2007-05-06: Glaurung 2 - epsilon
\r
103 --------------------------------
\r
105 The first public release, and the first version of my new program
\r
106 which is able to match the old Glaurung 1.2.1 on a single CPU. Lots
\r
107 of features and chess knowledge is still missing.
\r
109 2007-05-10: Glaurung 2 - epsilon/2
\r
110 ----------------------------------
\r
112 This version is very close to 2 - epsilon. The major changes are:
\r
114 * A number of compatibility problems which appeared when trying to
\r
115 compile Glaurung 2 - epsilon on various operating systems and CPUs
\r
118 * Fixed a major bug in the detection of rooks trapped inside a
\r
121 * Added knowledge about several types of drawn endgames.
\r
123 * Fixed a few FRC related bugs. FRC now works, but because of
\r
124 serious holes in the evaluation function the program plays very
\r
127 * A slightly more sophisticated king safety evaluation.
\r
129 2007-06-07: Glaurung 2 - epsilon/3
\r
130 ----------------------------------
\r
132 The first public version with support for multiple CPUs. Unless you
\r
133 have a dual-core (or better) computer, use Glaurung with a PolyGlot
\r
134 book, or runs games with ponder on, you may want to skip this version,
\r
135 which is almost certainly no stronger than 2 - epsilon/2 when running
\r
136 on a single CPU. The main changes compared to the previous version
\r
139 * Parallel search, with support for 1-4 CPUs. The program currently
\r
140 always allocates a separate pawn hash table and material hash
\r
141 table for four threads, which is a pure waste of RAM if your
\r
142 computer has just a single CPU. This will be fixed in a future
\r
145 * Fixed a bug in book randomization. When using Polyglot books, the
\r
146 previous version would always select exactly the same move in the
\r
147 same position after a restart of the program. Thanks to Pavel
\r
148 Háse for pointing this out.
\r
150 * Fixed a UCI pondering bug: Glaurung no longer instantly prints its
\r
151 best move when the maximum depth is reached during a ponder
\r
152 search, as the previous version did. According to the UCI
\r
153 protocol, it is not allowed to print the best move before the
\r
154 engine has received the "stop" or "quit" command.
\r
156 * Additional search information: The new version displays hash
\r
157 saturation and the current line(s) of search.
\r
159 * Several minor bug fixes and optimizations in the search and
\r
162 2007-06-08: Glaurung 2 - epsilon/4
\r
163 ----------------------------------
\r
165 A bugfix release, with only a single important change:
\r
167 * Fixed a very serious pondering bug. As pointed out by Marc
\r
168 Lacrosse, the previous version would lose on time in almost every
\r
169 single game with pondering enabled. The new version handles
\r
170 pondering correctly (or so I hope). When playing with ponder
\r
171 off, the new version is identical to version 2 - epsilon/3.
\r
173 2007-06-25: Glaurung 2 - epsilon/5
\r
174 ----------------------------------
\r
176 Another minor update, including the following improvements and bug
\r
179 * As Werner Schüle discovered, the previous version would sometimes
\r
180 stop thinking and lose on time right before delivering checkmate
\r
181 (which is of course a very unfortunate moment to lose on time).
\r
182 I haven't been able to reproduce Werner's problem on my computer
\r
183 (probably because I run a different OS), but I have fixed the bug
\r
184 which I suspect caused the time losses. I hope the time losses
\r
185 will no longer occur with 2 - epsilon/5.
\r
187 * The program is now slightly less resource-hungry on computers
\r
188 with less than 4 CPU cores: The previous version would always
\r
189 allocated separate pawn and material hash tables for four
\r
190 threads, even when running on a single-core CPU. The new version
\r
191 only allocates pawn and material hash tables for the threads
\r
192 which are actually used.
\r
194 * A minor reorganization of the memory layout has made the parallel
\r
195 search about 10% more efficient (at least on my computer, but the
\r
196 results are likely to vary considerably on different systems).
\r
198 * The Intel Mac OS X binary is much faster than before, thanks to
\r
199 the Intel C++ compiler (previous versions were compiled with
\r
202 * A few other very minor bug fixes and enhancements.
\r
204 2007-11-21: Glaurung 2.0
\r
205 ------------------------
\r
207 The first stable (or so I hope) and feature-complete version of
\r
208 Glaurung 2. The following are the main changes compared to the
\r
211 * The license has been changed from GPL version 2 to GPL version 3.
\r
215 * Support for the "searchmoves" option in the UCI "go" command.
\r
216 This means that it is possible to ask Glaurung to exclude some
\r
217 moves from its analysis, or to restrict its analysis to just a
\r
218 handful of moves selected by the user. This feature must also be
\r
219 supported by the GUI under which Glaurung is run. Glaurung's own
\r
220 GUI does currently not support this feature.
\r
222 * Chess960 support now works. The program still plays this game
\r
223 very badly, because of lack of opening knowledge.
\r
225 * Much more aggressive pruning in the last few plies of the main
\r
228 * Somewhat better scaling on multi-CPU systems, and support for up
\r
231 * Lots of new UCI parameters.
\r
233 * Improved time managment, especially in games with pondering on
\r
234 (i.e. when the engine is allowed to think when it's the
\r
235 opponent's turn to move).
\r
237 * Some evaluation improvements, and some new basic endgame
\r
240 * The program should no longer crash if the game lasts longer than
\r
243 * Many minor bug fixes and other tiny improvements throughout the
\r
246 * More generously commented code, and numerous cosmetic changes in
\r
249 2007-11-22: Glaurung 2.0.1
\r
250 --------------------------
\r
252 * Fixed (or so I hope) a bug which would occasionally cause one of
\r
253 the search threads to get stuck forever in its idle loop.
\r
255 2008-05-14: Glaurung 2.1
\r
256 ------------------------
\r
258 This version contains far too many changes to list them all, but most
\r
259 of them are minor and cosmetic. The most important and noticable
\r
260 changes are a lot of new UCI parameters, and many improvements in the
\r
261 evaluation function. The highlights are:
\r
263 * Extensive changes in the evaluation function. The addition of
\r
264 king safety is the most important improvement, but there are also
\r
265 numerous little improvements elsewhere in the evaluation. There
\r
266 is still much work left to do in the evaluation function, though.
\r
267 Space and development are still missing, and the tuning is likely
\r
268 to be very poor. Currently, the program is optimized for an
\r
269 entertaining style rather than maximum strength.
\r
271 * More accurate forward pruning. The previous version used the
\r
272 null move refutation move to improve the pruning accuracy by
\r
273 means of a very simple trick: It did not allow pruning of any
\r
274 moves with the piece captured by the null move refutation move.
\r
275 In Glaurung 2.1, this has been enhanced: It does not allow
\r
276 pruning of moves which defend the destination square of the null
\r
277 move refutation move, nor of moves which block the ray of the
\r
278 piece in the case that the moving piece in the null move
\r
279 refutation move is a slider.
\r
281 * More conservative use of LMR at PV nodes. The previous version
\r
282 searched the first 6 moves with full depth, 2.1 by default
\r
283 searches the first 14 moves with full depth (but there is a new
\r
284 UCI parameter for configuring this). I am not at all sure
\r
285 whether this is an improvement. More thorough testing is
\r
288 * Feedback from the evaluation to the search. The search passes an
\r
289 object of type 'EvalInfo' to the eval, and the eval fills this
\r
290 struct with various potentially useful information (like the sets
\r
291 of squares attacked by each piece type, the middle game and
\r
292 endgame components of the eval, etc.). At the moment, almost
\r
293 none of this information is actually used by the search. The
\r
294 only exception is that the evaluation function is now used to
\r
295 adjust the futility pruning margin in the quiescence search.
\r
297 * Less extensions. This hurts the programs performance a lot in most
\r
298 test suites, but I hope it improves the branching factor in deep
\r
301 * A very long list of new UCI parameters, especially for tuning the
\r
308 Glaurung is free, and distributed under the GNU General Public License
\r
309 (GPL). Essentially, this means that you are free to do almost exactly
\r
310 what you want with the program, including distributing it among your
\r
311 friends, making it available for download from your web site, selling
\r
312 it (either by itself or as part of some bigger software package), or
\r
313 using it as the starting point for a software project of your own.
\r
315 The only real limitation is that whenever you distribute Glaurung in
\r
316 some way, you must always include the full source code, or a pointer
\r
317 to where the source code can be found. If you make any changes to the
\r
318 source code, these changes must also be made available under the GPL.
\r
320 For full details, read the copy of the GPL found in the file named
\r
327 The author's e-mail address is tord@glaurungchess.com
\r