Crafty 8.x Version History
- 8.26
- new search extension added, the well-known "one legal response to check"
idea. if there's only one legal move when in check, we extend two plies
rather than one, since this is a very forcing move. also, when one side has
less than a rook, and the other has passed pawns, pushing these pawns to the
6th or 7th rank will extend the search one ply, where in normal positions,
we only extend when a pawn reaches the 7th rank.
- 8.25
- minor repair on draw by repetition. modified how books.bin was being
used. now, a move in books.bin has its flags merged with the corresponding
move from book.bin, but if the move does not exist in book.bin, it is still
kept as a book move. repetitions are now counted as a draw if they occur two
times, period. the last approach was causing problems due to hashing, since
the hash approach used in Crafty is fairly efficient and frequently will
carry scores across several searches. this resulted in Crafty stumbling into
a draw by repetition without knowing. the configuration switch HAS-64BITS
has been cleaned up and should be set for any 64bit architecture now, not
just for Cray machines.
- 8.24
- tweaks for king tropism to encourage pieces to collect near the king, or
to encourage driving them away when being attacked. a modification to
Evaluate() to address the problem where Crafty is forced to play Kf1 or Kf8,
blocking the rook in and getting into tactical difficulties as a result.
Book problem fixed where BookUp was attempting to group moves with a common
ancestor position together. unfortunately, captures were separated from this
group, meaning capture moves in the book could never be played. if a capture
was the only move in book, it sort of worked because Crafty would drop out
of book (not finding the capture) and then the search would "save" it.
however, if there was a non-capture alternative, it would be forced to play
it, making it play gambits, and, often, bad ones. tablebase support is now
in. the tablebase files can be downloaded from the ftp machine at
chess.onenet.net, pub/chess/TB. currently, Steven Edwards has all
interesting 4 piece endings done. to make this work, compile with
-DTABLEBASES, and create a TB directory where Crafty is run, and locate the
tablebase files in that directory. if you are running under UNIX, TB can be
a symbolic or hard link to a directory anywhere you want.
- 8.23
- cleanup/speedup in hashing. LookUp() and Store*() now carefully cast the
boolean operations to the most efficient size to avoid 64bit operations when
only the right 32 bits are significant. RepetitionCheck() code completely
re-written to maintain two repetition lists, one for each side. Quiesce()
now handles the repetition check a little different, being careful to not
call it when it's unimportant, but calling it when repetitions are
possible.
- 8.22
- EPD support (courtesy of Steven Edwards [thanks]) is now standard in
Crafty. for porting, I'll provide a small test run which can be used to
validate Crafty once it's been compiled.
- 8.21
- courtesy of Mark Bromley, Crafty may run significantly faster on your
machine. there are some options in the Makefile that will eliminate many of
the large attack computation long longs, which helps prevent cache
thrashing. on some machines this will be slower, on others 20% (or maybe
more) faster. you'll have to try -DCOMPACT_ATTACKS, and if that's faster,
then it's time to try -DUSE_SPLIT_SHIFTS which may help even more. finally,
if you are running on a supersparc processor, you can use the fastattack
assembly module fastattack.s and get another big boost. (attack function is
largest compute user in Crafty at present.) serious search problem fixed. it
turns out that Crafty uses the hash table to pass PV moves from one
iteration to the next, but for moves at the root of the tree the hash table
has no effect, so a special case was added to RootMoveList to check the list
of moves and if one matches the PV move, move it to the front of the list.
this turned out to be critical because after completing a search, (say to 9
plies) Crafty makes its move, then chops the first two moves off of the PV
and then passes that to iterate to start a search. this search starts at
lastdepth-1 (8 in this case) since the n-2 search was already done. the
"bug" showed up however, in that RootMoveList() was not checking for the PV
move correctly, which meant the root moves were ordered by static eval and
static exchange evaluation. Normally not a serious problem, just that move
ordering is not so good. however, suppose that the opponent takes a real
long time to make a move (say 30 seconds) so that Crafty completes a 10 ply
search. it then starts the next search at depth=9, but with the wrong move
first. if the target time is not large enough to let it resolve this wrong
move and get to the other moves on the list, Crafty is "confused" into
playing this move knowing absolutely nothing about it. the result is that it
can play a blunder easily. the circumstances leading to this are not common,
but in a 60 move game, once is enough. PV was pretty well mis-handled in
carrying moves from one search to another (not from one iteration to
another, but from one complete search to another) and has been fixed. a cute
glitch concerning storing PV from one iteration to another was also fixed,
where the score stored was confusing the following search.
- 8.20
- PVS search finally implemented fully. problems several months ago
prevented doing the PVS search along the PV itself. this is therefore quite
a bit faster, now that it's fully implemented and working properly. elapsed
time code modified so that Crafty now uses gettimeofday() to get fractions
of a second elapsed time. slight modification time allocation algorithm to
avoid using too much time early in the game.
- 8.19
- book selection algorithm further modified, so that the result of each
game in the GM database is known. now Crafty will not play a move from book,
if all games were lost by the side on move, hopefully avoiding many
blunders. Crafty now understands how to attack if both players castle on
opposite sides, by encouraging pawn advances against the kings. other minor
modifications to the eval values.
- 8.18
- book move selection algorithm changed. note that this is highly
speculative, but when best book play is selected, Crafty will use the
books.bin file as always. if there is no move in books, Crafty reverts to
book.bin, but now finds all known book moves and puts them into the root
move list. It then does a fairly short search, only considering these moves,
and it will play the best one so long as the evaluation is acceptable. if
not, it simply returns as though there was no book move, and executes a
search as it normally would. the book hashing algorithm was also modified so
that the 64-bit hash key is slightly different from the real hash key. in
effect, the upper 16 bits are only set as a result of the side-not-to-move's
pieces. this means that for a given position, all the book moves will be in
the same "cluster" which makes the book dramatically faster, since one seek
and read produces all the possible book moves (plus some others too, since
the upper 16 bits are not unique enough.) A significant speed improvement is
noticable, particularly with a 60mb opening book. Crafty now understands (if
that's the right word) that endings with bishops of opposite colors are to
be avoided. when such an ending is encountered, the total score is simply
divided by two to make the ending look more drawish.
- 8.17
- piece values changed somewhat, to avoid Crafty's propensity to make
unfavorable trades. an example: Crafty is faced with the loss of a pawn.
instead, it trades the queen for a rook and bishop, which used to be the
same as losing a pawn. this is not so good, and often would result in a slow
loss. this version also implements several "user-supplied" patches to make
Crafty compile cleanly on various machines. In addition, you no longer have
to continually modify types.h for different configurations. the Makefile now
supplies a -D<target> to the compiler. you need to edit Makefile and
set "target" to the appropriate value from the list provided. then, when
getting a new version, save your Makefile, extract the new source, copy in
your makefile and you will be ready, except for those rare occasions where I
add a new source module. other changes are performance tweaks. one is a
simple trick to order captures while avoiding Swap() if possible. if the
captured piece is more valuable than the capturing piece, we can simply use
the difference (pessimistic value) rather than calling Swap() since this
pessimistic value is still > 0. other tweaks to the various Next_*()
routines to avoid a little unnecessary work.
- 8.16
- still more weak pawn modifications. in addition, there is no "rook on
half-open file" any longer. if there are only enemy pawns on the file, and
the most advanced one is weak, then the file is treated as though it were
open. technical error in the EvaluateDevelopment() code that caused screwey
evaluations is fixed, making Crafty more likely to castle. :) Book() now
verifies that the current position is in book, before trying any moves to
see if the resulting positions are in book. This avoids something like e4 e5
Bb5 a6 Nf3 from causing Crafty to play Nc6 which takes it back into book,
rather than axb5 winning a piece. this will occasionally backfire and
prevent Crafty from trans- posing back into book, but seems safer at
present.
- 8.15
- weak pawn scoring modified further. the changes are designed to cause
Crafty to keep pawns "mobile" where they can advance, rather than letting
them become blocked or locked.
- 8.14
- checks after null moves discontinued. worked in some cases, but, in
general made the tree larger for nothing. eval tweaks to stop sacs that
resulted in connected passed pawns, often at the expense of a minor piece
for a pawn or two, which often lost. mobility coeffecient increased for all
pieces. asymmetric king safety discontinued. king safety for both sides is
now equally important. king safety is now also proportional to the number of
pieces the other side has, so that a disrupted king-side will encourage
trading pieces to reduce attacking chances.
- 8.13
- NextCapture() now *always* tries checking moves if the move at the
previous ply was a null-move. this avoids letting the null move hide some
serious mating threats. a minor bug where Crafty could draw by repetition
after announcing a mate. this was a result of finding a mate score in hash
table, and, after the search iteration completed, the mate score would
terminate the search completely. now, the search won't terminate until it
finds a mate shorter than the previous search did. minor eval tweaks and
bugfixes as well.
- 8.12
- fixed minor bugs in quiescence checks, which let Crafty include more
checks than intended (default quiescence_checks=2, but the comparison was
<= before including a check, which made it include three. Additionally, a
hashed check was *always* tried, even if quiescence_checks had already been
satisfied. pawn scoring also had a bug, in that there was a "crack" between
opening and middle game, where Crafty would conclude that it was in an
endgame, and adjust the pawn advance scores accordingly, sometimes causing
an odd a4/a5/etc move "out of the blue." minor bug in next_capture was
pruning even exchanges very early in quiescence search. that has now been
removed, so only losing exchanges are pruned.
- 8.11
- minor bug in internal iterative deepening fixed. also, macros for
accessing the "position" data structure are now used to make things a little
more readable.
- 8.10
- internal interative deepening modified to handle cases where lots of
tactics make the deepening search fail high or low, and occasionally end up
with no move to try. this produced a "bad move from hash table" error.
- 8.9
- internal iterative deepening is now used in those rare positions where a
PV node has no hash move to search. this does a shallow search to depth-2 to
find a good move for ordering.
- 8.8
- tweaks to passed pawn scoring. scores were too low, making Crafty
"ignore" them too much.
- 8.7
- repaired optimization made in null-move search, that forgot to clear
"EnPassant_Target". a double pawn push, followed by a null left the side on
move "very confused" and would let it play an illegal enpassant capture in
the tree. sort.<n> files are now removed after book.bin is created.
also, minor change to book format makes it incompatible with older book
versions, but also allows book lines to be as long as desired, and the book
size to reach any reasonable size. dynamic king tropism replaced by a
dynamic computation, but with a static king tropism score, rather than a
score based on king exposure. there was simply too much interaction,
although this may prove workable later.
- 8.6
- new book file structure. it is no longer necessary to enter the "number
of records" as Crafty now uses a new compressed hashing technique so that
the book has no empty space in it, and the size is computed "on the fly"
producing a smaller book without the user having to compute the size. tweaks
to Evaluate() to cure minor irritating habits.
- 8.5
- more cleanup. pawn promotions were searched twice, thanks to the killer
moves, although often they resulted in no search overhead due to
transposition table hits the second time around. other minor fixes,
including one serious "undefined variable" in Evaluate() that caused grief
in endings.
- 8.4
- dynamic "king tropism" evaluation term now used, which varies based on
how exposed the target king is. the more exposed, the larger the bonus for
placing pieces near the king. new "analyze" feature that complements the
"annotate" feature that Crafty has had for a while. "annotate" is used to
play over moves that are either in the current game history, or have been
read in using the "read <filename>" command. analyze, on the other
hand, will immediately begin searching the current position. each time the
operator enters a move, it will make that move on the board, and then search
the resulting position for the other side. in effect this gives a running
commentary on a "game in progress". these moves can be pumped into Crafty in
many ways so that "on the fly" analysis of a game-in-progress is
possible.
- 8.3
- EvaluatePawns() weak pawn analysis bug fixed. other minor performance
enhancements and cleanup.
- 8.2
- Futility() removed once and for all. since MakeMove() is so fast after
the new attack generation algorithm, this was actually slower than not using
it.
- 8.1
- Futility() re-written to be more efficient, as well as to stop tossing
moves out based on the +/- 2 pawn window, which was too speculative. it
still saves roughly 20% in speed over the same searches without futility,
but seems to have *no* harmful effects in tests run to date.
- 8.0
- re-vamp of evaluation, bringing scores back down so that Crafty will
stop sacrificing the exchange, or a piece for two pawns just it thinks it
has lots of positional compensation. the next few versions are going to be
tuning or coding modifications to eval.
Lim Unlimited / 24 Jul 1996