Tilbage til Skak


This readme.txt file gives you the updates etc. since january 1996.

The updates are ordered, so the most recent changes are at the top.

If you want to know all about Dabbaba, you should also read dabbaba.txt,
that covers the january 1996 version.
But be aware; many things have changed since then, as you can read in this
readme.txt file.

If I had more time, dabbaba.txt was fully updated.
But unfortunately it is not so.

Dabbaba is now so big, that it cannot contain all the code without going up to
a bigger and slower memorymodel.
To avoid this, Dabbaba is split into two exec-files.
One for orthodox chess (dabbaba.exe), and one for variants of chess
The rules for insufficient mateial are not used for variants of chess, as they
may be different for almost every variant. This gives room for the variants
in vdabbaba.exe, that displays '-INSUF.MAT.' on the main menu.
Dabbaba.exe shows '-VARIANTS' on the main menu.

To instruct the compiler which version to generate is simply controlled by
the '#define VARIANTS' line. This generates the version with chessvariants.
It can be changed to '#define noVARIANTS' to generate the other version.

Dabbaba.doc is a word-97 document.
Just so you know if you have trouble reading it.

******************** Dabbaba version Nov. 06 1998 ************************

New things in Dabbaba
1) Many small things have been corrected / optimized.
play more pawnmoves (trying to get more space)
play more captures (hope to force the opponent into a bad line)
avoid knights in the corners in the opening
value for knightrider changed from 550 to 625
timeerror in self- and everplay corrected
knowledge added about bishops pinning knights in the opening (fx Bg4/Nf3)
kingsafety adjusted concerning the g-pawns (fx 5.h3,Bh5! 6.g4?)
evaluation for doubling rooks adjusted
rooks should be kept back on the two first ranks in the opening
error in the matesearch corrected (if first move was both check and capture)
2) New variant: Pawnfreeze Chess
3) Matelevel improved.
* shows all solutions
* stops at each solution
(can be avoided by typing in a negative number of moves)
4) Dabbaba now searches to a given depth twice as fast (see timetest below)
* 'Positionel Selektivitšt' is now used
(see the book 'Schach am PC' page 383)
* Nullmoves (R=2, recursive, no depth-search) is now used
5) The .exe file is split into two exec-files. See above.

Test results on my 233 Mhz Pentium II (PC-speedfactor = 91).
(all errorchecking taking 5% of the time is turned off -
as there is not room for any more code...).
Sec. right
pr. move is Seconds
TEST move found Solved used Comment
Larsen1 1-50 60 y 43/50 561 (-3,26,29,32,34,42,50)
Larsen1 51-100 60 y 45/50 400 (-71,77,78,96,99)
Colditz 60 y 26/30 315 (-12,16,20,27)
bt2630 60 y 4/30 955 (7,9,12,30)
lct2 60 y 6/35 1287 (1,2,5,16,21,28)
matesrch 60 y 19/19 62 (nr. 19 IS solved)
timetest (4,8,0) n (22) 336

Some positions are solved although Dabbaba says the solution is wrong:
Larsen #2: another mating move is found.
Larsen #8: Dabbaba has a little problem with promotionmoves as solutions
(this is also the case with the last position in matesrch.epd).

******************** Dabbaba version Aug. 19 1998 ************************

Current strength:
Dabbaba has played 8 games against two danish players with a danish rating
of 2000 (85% of all clubplayers are rated below this rating).
The games were played at the level 'game in 15 minutes'; Dabbaba only got
8 minutes giving me time to transfer the moves.
Dabbaba ran on my Pentium II 233 Mhz and won 5-3 (4-4 had been more fair).

New things in Dabbaba
1) Many small things have been corrected / optimized.
weight mobility and centre are changed
games.txt can be read directly by Chessbd now
movenumbers are now shown
seek more open play against humans (= autoplay is off)
value for rook changed (450-->490)
value for queen and knight can be altered by the user
proposed by David Paulowich for the variants where these men moves
different and their value are more uncertain.
value for a draw can now be set by the user
mainline is now shown
selective ply changed from 8 to 6
rules for insufficient material is not used in the variants now
bishop 315-->305; bishoppair 60-->30
passed pawns made more important now
2) many new tips/corrections for better openingplay
3) 50-move rule and 3xrepeat is now known
4) Dabbaba now uses (small) hashtables (2.048 entries in 32K)
5) Kingsafety improved
6) New variants: rooksquare chess (see rules later) and grid chess
7) Dabbaba now uses permanent brain
(type 's' to stop its computing)
8) new level: y moves in x minutes

See 'known errors' at the bottom of this file. It has been updated.
Some potential trouble concerning time etc. are described.

Dabbaba C-sourcefile in enclosed with this version.
There are many things to improve on:
correct the 'known errors'.
change the code from 16-bit to 32-bit:
make bigger hashtables
extend the sourcecode
(cannot be done now without going to a bigger and slower memorymodel)
better read-write routines for the hashtables.
permanent brain:
the matesearch function does not work here yet.
the file gameinfo.trc has become too hard to read
use openinglibrary, mouse, better graphics...

The source is not very nice, as it is a program still in development and
not made any effort to make it easy for others to read.
It is a mix of english and danish word plus a few german parts copied
from MiniMax.

You can do with the source dabbaba.c whatever you want, but I just hope
you will really do some changes of your own before you call it your own

Test results on my 233 Mhz Pentium II (PC-speedfactor = 91).
(all errorchecking taking 5% of the time is turned off -
as there is not room for any more code...).
when Max
Sec. right seconds
pr. move is Seconds for
TEST move found Solved used a move Comment
Larsen1 1-50 60 y 44/50 665 57 (-3,26,29,32,34,50)
Larsen1 51-100 60 y 45/50 412 57 (-71,77,78,96,99)
Colditz 60 y 26/30 270 55 (-12,16,20,27)
bt2630 60 y 5/30 1132 62 (7,9,12,18,30)
lct2 60 y 6/35 1167 60 (7,14,16,18,23,28)
matesrch 60 y 19/19 46 8 (nr. 19 IS solved)
timetest (4,8,0) n (22) 743 155

Last time I forgot to explain, that some positions are solved although
Dabbaba says the solution is wrong:
Larsen #2: another mating move is found.
Larsen #8: Dabbaba has a little problem with promotionmoves as solutions
(this is also the case with the last position in matesrch.epd).

******************** Dabbaba version Feb. 25 1998 ************************

New things in Dabbaba
1) Many small things have been corrected / optimized.
2) New commands for new-game, beep-sound on/off and auto232.
3) Forced moves are now played immediately.
4) Better knowledge about hanging pawns (and rooks on these files).
5) The king is used to attack the opponent, when Dabbaba is a rook ahead,
and bonus is given for getting the opponents king near the edge/corner.
6) A tracefile GAMEINFO.TRC is produced during gameplay.
7) Dabbaba is now an expert on insufficient material; see the file
INSUFMAT.EPD that is a little 'article' with many testpositions.
8) A new kind of level 'mate in xx moves' is now implemented.
9) The kingsafety-function is now improved a little.
A) Producing a file GAMES.TXT can now be turned on.
It will contain the game in simple notation as e2e4 e7e5 g1f3 b8c6 etc.
The Chessbd-program can read this simple file and produce a real pgn-file.
B) Dabbaba now supports auto232 (it can automatic play a number of games by
connecting two PCs by the serial port. Each PC has a chessprogram running.).
The required files are supplied (auto232.bat and nonauto.com).
C) Dabbaba played autumn 1997 in Torsten Schoops tournament.
See SCHOOP.PGN for comments, games etc.
Chessbd can play the games directly from this file.
D) The shortest mate should now be found, as Dabbaba examines an extra
iteration when a mate is found.
E) Underpromotion to rook and bishop is only considered, when the score so
far is worse than draw or a stalemateposition has been seen during the search.
F) Dabbaba tries to avoid giving a piece for 3 pawns; this is often bad.
G) Rules for develop the queen in the opening are improved.
H) Dabbaba avoids playing 1.e4,Nf6 as black.

Test results on my 233 Mhz Pentium II (PC-speedfactor = 91).
Compiletimeoptions TURBO-1 & TURBO-2 is turned off.
(that means all errorchecking taking 5% of the time is turned on).
when Max
Sec. right seconds
pr. move is Seconds for
TEST move found Solved used a move Comment
Larsen1 1-50 60 y 42/50 631 57 (-3,19,26,29,32,34,38,50)
Larsen1 51-100 60 y 44/50 528 56 (-71,77,92,96,99,100)
Colditz 60 y 25/30 357 57 (-12,16,20,27,30)
bt2630 60 y 5/30 1211 59 (8,9,12,16,19)
lct2 60 y 7/35 1212 59 (5,7,14,16,18,23,28)
matesrch 60 y 18/18 41 9 (nr. 18 IS solved)
timetest (4,8,0) n (22) 666 145

******************** Dabbaba version Oct. 04 1997 ************************

New things in Dabbaba
1) Many small things have been corrected / optimized.
2) Time used so far can now be seen during a game.
3) Dabbaba is now more aware of how much time is used, but...
4) Dabbaba will always search at least 2 iterations (unless a mate is found),
and on my old 486 50Mhz I have in a rare case seen this last for 6 minutes!
So even on a Pentium 200Mhz, that is 9 times faster, a move may take more
than a half minute even though Dabbaba is set to play faster.
I hope to optimize the search in the future.
This minimumsearch is used to eliminate pseudomoves in the variants.
5) A much better understanding of quiet positions.
6) Dabbaba starts with a speed-test to measure the speed of the PC that
it is running on. The result can be seen in '6. Menu: Special options', and
it is used to set up suiting parameters for the mate-search.
7) The matesearch has been slightly improved.
(the Bc4xf7+ mate in 9 (see the matesrch-file) is now solved).
8) A new kind of level 'game in xx minutes' is now implemented.
Dabbaba guesses there are 10-30 moves left in the game depending on how
much material there are on the board.
The remaining time is divided by that number of moves to set a timelimit
for the next move.
Besides it plays gradually faster in the opening when black has more
than 5 undeveloped pieces. It is silly to use 3 minutes on 1.e2-e4.
Dabbaba will never claim a win/loss due to timeforfeit.
9) An everplay function plays games forever. Black and white plays with
a little difference in their strategy (I determine this change), and I
use the everplay to see what strategy is best...
Right now white has a selektive depth = 8 (which is what Dabbaba uses
now, where a depth = 4 was used in the 1996 version), and black has
a depth = 6.
The random-function should ensure different openings in the games.
If anyone runs a big number of games I would like to know the result.
The new level 'game in x minutes' must be used.
Don't play faster than 'game in 3 minutes' on a Pentium 200 Mhz.
The current position and total score is instantly shown.
A game is stopped after 80 moves. If the score is bigger than 300
(3 pawns), the game is considered as a full win (1.00). If the score is
fx 150, white gets 150/300 = 0.5, and the rest 300-150=150 is divided
equal this way: 150/2=75 gives 75/300=0.25 to each player.
So white gets 0.75 and black gets 0.25.
This is the most fair formula I have come up with so far.
A) An old error has been corrected: Dabbaba started to play silly
(1.h2-h3, h7-h6 etc) after a game has ended with a mate...
The matesearch-evaluation only considering materiel was not reset.

Dabbaba wants competition
Torsten Schoop has just let Dabbaba start to play in a tournament. See
SIBIRI.TXT if you want to see how it lost the first game!
Whoever plays with Dabbaba with yourself, other humans or computers, I would
be glad to get the games or the results or any comments.
As Dabbaba can play some variants of chess, a little tournament with a new
variant in each round could be funny...

Test results on my 50 Mhz 486.
Compiletimeoptions TURBO-1 & TURBO-2 is turned off.
(that means all errorchecking taking 5% of the time is turned on).
when Max
Sec. right seconds
pr. move is Seconds for
TEST move found Solved used a move Comment
Larsen 1-50 60 y 33/50 1450 95 (nr. 2 and 8 ARE solved)
Larsen 51-100 60 y 38/50 1240 91
Colditz 60 y 20/30 593 62
bt2630 60 y 1/30 1179 62 (nr. 26 is solved!)
lct2.txt 60 y 3/35 1522 70 (nr. 16, 28 and 30)
matesearch 180 y 17/17 138 41 (nr. 17 IS solved)
timetest (3,8,0) n (22) 1274 185

An article
See the word-article DABBABA.DOC to read about Dabbaba's play; how it can
find deep combinations and play variants of chess.

******************** Dabbaba version Oct. 14 1996 ************************
Dabbaba now uses piece-lists, and this has speeded move-generation and
pawn-evaluation up, something like 20% compared to the aug.-version.
Dabbaba now also knows the bishop pair, know it is good to trade off when
ahead (and not to trade off when behind), tries to get the queen close to
the enemy king and knows much more about where to place its rooks (see
The pawnevaluation has been improved a little.
I have removed something bad working 'advanced' killer rules, increasing
the speed with 20%. Don't remember killers that captures the piece that
has just muved gave 3%. A better pre-order of moves gave 10%.
Pawnmoves attacking pieces are now selektive moves and slows down Dabbaba
with 12% (but makes it play better!).
But most important a lot of quiet moves deep in the search has been removed,
so only the very best are now tried, and this has increased the speed with
So this version is 4-5 times faster than the august-version!
The good, old Colditz-test gives Dabbaba (486 50 Mhz) a tactical rating
of 1830.

Some other changes are:
rooks on open files, block c-pawns less, play more 1.e4, keep g-pawn
on 2/3 row, kingsafety: pawn in front of king most important to be there.

During gameplay the board is bigger.

While running testpositions in files, it is now possible to create a file
(dabbaba.trc) showing which moves Dabbaba found at a given time. Just answer
1(=yes) to the question if you want the file.
See appendix A below.
It is also possible to go on to the next position if the right move is found
or to use all the allotted time on the position. Just answer the question.

The main menu is now easy and light and can be turned back to extended use
with the W (whole menu).

Levels of play:
Is now much easier for the user, as you simply can decide how many seconds
Dabbaba should use for each move instead of deciding the search depth (brute
force, selektiv and check-search).
If you want to use Dabbaba the old way, give Dabbaba zero seconds pr. move,
and the search depths appear in the menu.
With x seconds pr. move, Dabbaba will max. use 20% of the time in the
Dabbaba will terminate the normal search if more than 90% of the time is
used when it has finished examining a move in a given iteration.
It may move much earlier, as Dabbaba won't start a new iteration if more
than 30% of the time is used. This is because, that all the remaining 70% of
the time probably will be used on the first move in the next iteration - the
move that already is found as the best move.
See appendix A with an extreme example, where up to iteration 4 took 30
seconds, and the first move in iteration 5 took 333 seconds! So Dabbaba may
also in seldom cases take longer time to move.
Dabbaba shows how deep in the search it was when the timeout occured.

Comments when version 1996 Aug. 20 was released
(about errors in version 1996 july 23.)
King safety didn't work at all.
Ghost-rooks could occur in the corners, if a rook ready for castle was
Chessvariants where the queen is Archbishop & Chancellor had an error, as
the queens new value was given to the knight.
These errors are now corrected.

Comments when version 1996 july 23 was released.
Dabbaba is now tactically much stronger.
It fx solves a mate in 12 moves in a special testposition in 0,63 second
(see the mate-search demo later).
Dabbaba also understands draws by simpel repetition of moves (see the Rg7+
position). But only during calculating a move, not during playing a game.
Dabbaba now has a simple knowledge of king safety. The opening tips have
also been improved, and Dabbaba now plays 'random' in the opening.
Selfplay don't loop now, and the board is shown the first 56 moves.
INFO during gameplay can be turned on/off with the info-command. Turn it
off if you don't want the information and the scrolling of the chessboard.
You can get the help-menu by typing help or ? during the game.


Further information in the future
Send your e-mail address to me (familien.nielsen@private.dk) and you may
receive information about Dabbaba in the future.

Where should the rooks be moved to?
This is very difficult to tell a program, because moving the rooks has
much with long range planning to do.
During pawn-evaluation a bonus is given, if a rook is on the same file
as a weak opponents pawn.
New bonus's are given for moving the rooks up the board, especially row
7 and 8, for having the rooks connected; especially on a file, and for
having a rook on the same row as the opponents king.

If you press 's' while Dabbaba is computing a move, Dabbaba will move
when it has finished calculating its current move.
If this is done during selfplay or running a testfile, these functions will
be cancelled.

menu Special Options
Some new information can be found here (some of them most for my own use).

Running testfiles
When asked for a position number, you may now type in a negative number.
fx. will -40 skip the first 40 positions in the file and start calculate
from position 41.
Dabbaba still only instantly show how 50 positions are solved, and now it
stops after calculating 50 positions.
You are asked if you want a file (dabbaba.trc) to be written with the moves
Dabbaba has found at given times during the search.
If a mate is found, the position is left immediately.
If the right move is found after iteration 2 or later, the position is
considered solved and no further iterations are done if you have answered
yes to leave the position in this case.

Dabbaba now knows something about isolated pawns, double pawns, passed
pawns, weak pawns on halfopen files.
Unfortunately this takes some time, but it is important.
During gameplay you can press 'p' and see how each pawn is evaluated.

An article of Ralph Betza in Eteroscacco has inspired me to add 4 new
variants to Dabbaba.
In Rooksquare chess - my own invention - you also win, if you move a man
to one of the opponents corners (fx for white moving a man to a8/h8 is
just as good as a mating move).

The old levels
(Before move-in-x-seconds etc. was made, the old default was (3,3,2).)
If the startlevel (3,3,2) is too slow, you can reduce the numbers.
I recommend for level (a,b,c), that a+b is even, c is even and b>0. A
little difficult to explain why, but it has something to do with the I-
position (Nxf7??).
I expect it is quite easy to repair, but just haven't done it yet.
Perhaps (4,4,0) is better than (3,3,4). (4,4,2) certainly is, but it is too
You may change the 'selektiv search dynamic limit' from 20 to 24 which may
increase the speed of Dabbaba at the cost of trying fewer quiet moves. Set
to 24 it solves the ca. 80 positions in the file LARS440 at level (4,4,0)
in ca. 25 minutes (in the new version it takes more than an hour; mainly
because of the pawn evaluation). Many of these problems are very nice

The name Dabbaba
A few persons has asked me about the name Dabbaba.
The program also plays variants of chess; fx where the knights are
Nightriders (making long moves). A dabbaba is another piece that moves in
an unusual way. The dabbaba is used in one of the variants in the Dabbaba
If fx Ng1 also moves as a dabbaba, it can play 1.Ng1-g3.

The Matesearch
The matesearch is an important feature. Dabbaba starts its computing of a
move by following many lines of checks and hopes to find a mate or a good
Do this to see what it can do in a few minutes:
* Set the level to 180 seconds pr. move
* choose 7: chesspositions in files.
* choose M for matesrch file.
* choose 0 for all positions.
* choose 1 to pause at each position
* choose 0 not to make a discfile
* choose 1 to exit the position when the right move is found
- and enjoy what Dabbaba manages to find!

The matesearch is started up to 3 times; each time going deeper (8, 16 and
24 ply) and considering more moves.
A maximum number of nodes are searched depending on the brute force depth
you have chosen:
depth 1: 10.000 nodes
depth 2: 30.000 nodes
depth 3: 50.000 nodes etc.
(assuming the matesearch-factor not is changed from the value of 10).
These number of nodes are adjusted due to the speedtest (1997).
If more than 1/3 of this maximum number of nodes have been searched, no
further matesearch will be started.
* if move-in-x-seconds is used, a max. of 20% of the time is used in the
matesearch, and the matesearch-factor only decides if a matesearch is made
or not (set it to zero if you don't want a matesearch).

J - magic number.
What is this?
Try this demo:
* set magic number to 7.
* set the level to 1800 seconds pr. move
* choose 7: chesspositions in files.
* choose M for matesrch file.
* choose 7 for position 7.
* choose 0 not to make a discfile
* choose 0 not to exit the position when the right move is found
* press <return> to run - and see how the black king is hunted.
It takes a few minutes to hunt and mate the king.
* set magic number to 0 again.
* choose 2 to run again, and it now solves the position in a second
without the gimmick.
* set magic number to 8
* choose 2 to run
now you can see the little silly gimmick.

Other 'secret' values are used by myself while developing Dabbaba. Those
with a text in () are intended for my own use.

I'm not an expert in C-programming.
How do I issue a 'EDIT DABBABA.TXT'?
How do I avoid the scrolling? - and is still able to receive keyboard input
from the user?
How do I use the mouse?

If someone has a little program that shows these things I would like to see

I have a Pentium II, but my compiler can only generate 386-code. Will Dabbaba
be faster if it is compiled with a compiler that generates 486-code?
Will Pentium-owners benefit even more if Dabbaba is compiled to produce

Does the compiler have a special facility to tell, in which parts
of Dabbaba the time is spent?

Does tools exist, that can take the c-source and generate cross-reference
lists or diagrams?

known errors
The clock:
Gives a crazy value when you cross midnight. So avoid playing across midnight!

Dabbaba may have some troubles measuring the time in this version.
In selfplay- or everplaymode it surely suddenly starts to play very fast.
In more normal modes like 'game in 45' or '60 moves in 30 minutes' it is
suspected to measure the time wrong (and start to play too fast).
Any observations about this are welcome!

Dabbaba sometimes plays worse in a game than in testpositions.
The file BADMOVE2 contains some positions from games, and in some of the
positions it NEVER considers the move that was actually played...
Later note: this problem is perhaps solved now...

Dabbaba don't recognize promotionmoves in solutions as correct moves (fx
the Lot of knights-position (b7-b8N) in the menu and in the matesrch-file).

Promotionmoves are not looking right in dabbaba.trc.

I have a little problem with end-of-file of the testfiles, so so far the
last line in the file has to start with '#x'.

Dabbaba's play: it seems that the program pays too much attention to double
pawns and it may even sacrifice a pawn to give the opponent a doublepawn; fx:
1.e4,Nc6 2.d4,d5 3.Bb5?,dxe4 4.Bxc6+,bxc6 or
1.e4,d5 2.exd5 and now 2.-,e5? or 2.-,g6?

Appendix A:
2r3k1/pp4pp/4R3/2br4/P4B2/1Pp2pP1/5P1P/2R3K1/w Rc1-e1?

0.00 sec. Search to depth 0
0.11 sec. Search to depth 0
0.16 sec. Search to depth 0
0.22 sec. Search to depth 1
0.22 sec. best move so far: c1c3 score: -29996
0.27 sec. best move so far: h2h4 score: -129
0.33 sec. best move so far: g3g4 score: -128
0.33 sec. best move so far: a4a5 score: -125
0.49 sec. best move so far: h2h3 score: -120
0.60 sec. best move so far: e6e1 score: -106
0.66 sec. Search to depth 2
0.77 sec. best move so far: f4e3 score: -178
0.99 sec. best move so far: e6e1 score: -118
1.37 sec. best move so far: c1e1 score: -90
1.81 sec. Search to depth 3
8.30 sec. best move so far: c1e1 score: -87
16.21 sec. Search to depth 4
20.27 sec. best move so far: c1e1 score: -97
29.23 sec. Search to depth 5
362.64 sec. best move so far: c1e1 score: -91
362.86 sec. calculation of move ended