home *** CD-ROM | disk | FTP | other *** search
/ Bart's Chess Hits / Chess.iso / Chess / GAMES / DABBABA1 / DABBABA.TXT < prev    next >
Encoding:
Text File  |  1997-09-26  |  15.4 KB  |  352 lines

  1.  
  2.                     Dabbaba ver. 0.098                 by Jens Bæk Nielsen
  3.  
  4.  
  5. Improvements from ver. 0.096 to ver. 0.098:
  6.    Selfplay: a) shows the board the first 56 halfmoves
  7.              b) does not loop above the 160 halfmoves
  8.    The internal solution to position H is corrected.
  9.    The game now always ends nice with 'Oh, the game is over...'
  10.    The matesearch is now working when playing games.
  11.    It now (again) chooses one of the moves with the shortest way to a mate.
  12.    (I had tried to jump out of the search when a mating move was found, but
  13.     it has to be one of the shortest ways to prevent the program from playing  
  14.     mating moves 'forever')
  15.                                                     
  16.  
  17. The most special about this chessprogram is that it can play chess with 
  18. other sets of rules. But more about this later.
  19.  
  20. Dabbaba is written in C. It consists of approximately 3.000 lines of code.
  21. It is not very strong. With 3 minutes/move it should be lucky to beat half 
  22. of the members in a usual chessclub (average rating 1.500). With less time 
  23. it should beat more of them (supposed the humans also plays faster. Both 
  24. the computer and the humans play worse with less time, but the human 
  25. playing strenght declines faster.)
  26.  
  27. Dabbaba searches ca. 2.500 positions pr. second on my 50Mhz 486dx with 256K 
  28. cache (coprocessors and amount of ram don't influence the programs speed). 
  29. All subsequent figures also refers to this PC-model. 
  30.  
  31. Tactics is Dabbabas favourite disciplin. With 2 minutes/move it solves 70 
  32. out of the 100 combinations found in Bent Larsen's book 'Find the 
  33. combination'. Even though my rating is 2037 I doubt I could do it better.
  34.  
  35. So far Dabbaba only knows very little. It knows of mate, stalemate and the 
  36. value of the pieces (pawn=90, knight=305, bishop=320, rook=475 and 
  37. queen=950).
  38. Besides this it tries to get pieces near the centre and tries to achieve 
  39. positions with good mobility - that is positions where Dabbaba can make 
  40. relative more moves than its opponent (remember, the values of the men is 
  41. based on how the particular man moves).
  42. Finally Dabbaba have about 20 opening tips to get the pieces developed a 
  43. little better. The opening is defined as a position where one of the 
  44. players still have the right to castle (for chessvariants without castling 
  45. the opening is defined as a position where black has more than 9 men on the 
  46. 7.th and 8.th rank).
  47.  
  48. Dabbaba knows so far nothing about king safety, weak pawns, isolated pawns, 
  49. double pawns, passed pawns, bad/good bishops, bad/good knights, rooks on 
  50. open or halfopen files and on the 7.th rank, trapped pieces, insufficient 
  51. materiel, draw by repetition a position 3 times (the most usual outcome of 
  52. a selfplay-game, where Dabbaba plays against itself).
  53. Strategy and planning is of course also completely unknown for Dabbaba.
  54. So still a lot can be done to improve Dabbaba.
  55.  
  56. But tactics is the most important for a chessprogram, and this can be 
  57. improved by increasing the speed. Some of the code can still be improved, 
  58. and the use of hash-tables can also increase the speed. Hashtables is a way 
  59. of storing information during the search, and when the program encounters 
  60. the same position later (evt. by transposition of moves) in the search, it 
  61. doesn't have to search the whole subtree from that position again.
  62.  
  63. Dabbaba uses internally an 8x12 chessboard, and it uses an iterative search 
  64. (it makes more searches from the position and goes deeper in each search 
  65. using information from the previous searches. I won't explain all 
  66. computerchess terms in detail in this text. Read some of the many books and 
  67. magazines on this subject.)  
  68.  
  69.  
  70.  
  71.  
  72. **********************  1) in the main menu ************************
  73. The search time/depth is controlled by these figures:
  74. Brute force depth: 
  75. the number of halfmoves where all the possible moves are considered. Use 
  76. 2,3,4,>4 for blitz, quick game, tournament game and long analysis.
  77. Selektiv depth: 
  78. the number of halfmoves where only checks, some captures, promotions etc. 
  79. are tried for the side on the move after the brute-force search. The other 
  80. side tries always all the moves.
  81. I strongly recommend this set to 4.
  82. Check search depth: 
  83. Set this to zero. It is not completed yet. Some checks should be tried at 
  84. the end of each line...
  85.  
  86. **********************  2) in the main menu ************************
  87. Computes a move in the current position. See screen-info later.
  88.  
  89. **********************  3) in the main menu ************************
  90. Play agaist Dabbaba. This is easy and is not needed to be explained.
  91.  
  92. I will only emphasize the selfplay option, if you want to study Dabbabas 
  93. play at deeper levels without having to spend too much of your own time by 
  94. the computer.
  95. I have used levels like (3,4,0) or even (4,4,0) and then started a game. After 
  96. 3-4 hours I return to the PC and make a hardcopy of the screen. This gives 
  97. me a paper with a game that represents hours of computing, but only very 
  98. little of my own time is used.
  99. NB: the hardcopy may not work if you run Dabbaba under Windows.
  100. The selfplay cannot be interrupted, so think about it before you start 
  101. the selfplay. 
  102. Ctrl+Break stops Dabbaba at the next move.
  103. At selfplay Dabbaba stops after 160 halfmoves, and it displays the board 
  104. the first 56 halfmoves.
  105.  
  106. **********************  4) in the main menu ************************
  107. Choose a variant of chess. These are explained later.
  108.  
  109. **********************  5) in the main menu ************************
  110. Just some usefull positions I use developing the program.
  111.  
  112. **********************  6) in the main menu ************************
  113. Choose english letters(default) or danish letters(=german letters).
  114. Change size of the graphic chessboard.
  115.  
  116. **********************  7) in the main menu ************************
  117. Chesspositions in files. Mainly for developing the program.
  118. You can study the files and make your own if you like.
  119. You can run the whole file or pick out a single position.
  120. A line with '+++-+-?-+....' indicates positions solved(+) or not(-).
  121. A ? indicates that no answer is marked at the position.
  122. An answer marked with a '?' is solved by not playing this move.
  123.  
  124. ********************************************************************
  125. The rest of the options are mainly my internal figures to be adjusted.
  126. But you can experiment if you like.
  127. ********************************************************************
  128.  
  129. **********************  8) in the main menu ************************
  130. top-kill: This is a name I have used for the moves that are the best answer 
  131. to each possible move in the current position. The programs speed depends 
  132. heavily on trying good moves first, so the opponents bad moves can be 
  133. refused immediately and the search can go on. This should always be turned 
  134. on.
  135.  
  136. 'selektiv search dynamic limit': if the first moves are captures, checks, 
  137. promotion etc., the program accumulates some points. If this sum is bigger 
  138. than this limit, ALL moves on the first move of the selektive search are 
  139. considered.
  140. If this limit is lowered, it happens more often and the program searches 
  141. more moves and takes longer time to calculate a move.
  142. With a value of 8 it will find the mate in 5 in the built-in position 
  143. (1.b7+) sooner.
  144. A big value turns this off.
  145.  
  146. initiativ change: if set to 1 the program 'turns' the selektive search if 
  147. the 'defender' happens to give a check during the selektive search. The 
  148. defendes becomes attacker from that position.
  149.  
  150. **********************  9) in the main menu ************************
  151. iterativ search: if turned on the program goes deeper and deeper into the 
  152. position. Because of better move ordering this is at least as fast as doing 
  153. one whole search. With hashtables the iterative search will be the fastest.
  154.  
  155. simple kill: is turned on with 10 - the value doesn't matter very much. 
  156. Simple killers is used deeper in the search of the tree, where the top-
  157. killers are not working. Simple killers is simply moves, that earlier in 
  158. the search has proved to be good, and they are tried a little earlier than 
  159. other moves to refuse the opponents move.
  160. Two killers are used at each depth in the search.
  161.  
  162. always cut-off: this concerns top-killers. If a top-killer is found that 
  163. refuses one of the moves in the current position, you can go on to the next 
  164. move. This happens with 1. If the value is 0, all the moves are tried, and 
  165. this means you may find a better top-killer. This may be useful in the 
  166. iterative search, so the program better can refuse moves later in the 
  167. search.
  168. A value of 2=auto means, that the program uses 0 if an iterative search to 
  169. depth 4 or deeper is in progress; otherwise it is set to 1.
  170. It seems this idea is usefull. I've never read about it anywhere.
  171.  
  172.  
  173. **********************  A) in the main menu ************************
  174. trace: allows you to see all the lines to a certain depth. Use small values 
  175. like 1 and 2 the first time you try this option.
  176. The -30000 option will probably soon be changed, so I won't explain it now.
  177.  
  178. screen-info: is turned on with 1. 
  179. If screen-info is turned on, a lot of internal information is shown:
  180. How deep the current search is, what move is investigated now, what 
  181. replymove is investigated now (is just shown as a '*' from move 4), what 
  182. score the move got (positive values are good for white).
  183. Use the Break-key if the information scrolls too fast.
  184. The number of nodes pr. second is also shown. Turn screen-info off to give 
  185. Dabbaba the fastest performance.
  186. Screen-info is automatically turned off during game play.
  187.  
  188. mate search:
  189. Before the regular search is done, a mate search is done. This is default 
  190. set to 12 halfmoves to find mates in up to 6 moves (all the moves must be 
  191. checks; though Dabbaba don't recognises discovered checks outside the brute 
  192. force search).
  193. The program has a built-in position, where this matesearch takes two 
  194. minutes, and this won't give you a blitzgame! Very bad.
  195. Because of this problem I have turned the matesearh of when playing a game 
  196. with Dabbaba. The value is not reset after the game.
  197. Later I must let Dabbaba itself cancel this search if it takes too much 
  198. time.
  199. Position 2 in the Colditz-test (see later) - a queen-sacrifice giving mate 
  200. in 5 moves - is solved in 1/100 second because of the mate search! Very 
  201. good.
  202.  
  203. full evaluation: For developing purposes. Full evaluation of positions or 
  204. only material (incl. mate and stalemate) is considered.
  205.  
  206. **********************  B) in the main menu ************************
  207. A set-up I use while developing the program.
  208.  
  209. **********************  C) in the main menu ************************
  210. Weights for mobility, centralisation and opening tips.
  211.  
  212.  
  213.  
  214. The Colditz-test
  215. The Colditz-test with its 30 positions was very popular 5-10 years ago to 
  216. test chesscomputers. It is from a book (for humans...) by Colditz. It is 
  217. about combinations in chess, and it concludes with the test where the 
  218. reader can test himself and estimate his tactical rating.
  219. I gave Dabbaba short time (3,4,0) on the test, and after 3 minutes - 
  220. average 6 seconds pr. position - it had solved 15 out of 30!
  221. With 25 minutes for the test Dabbaba solved 24/30 (4,4,0).
  222. Given 2-5 minutes pr. position it also solved nr. 12, 20, 25 and 29.
  223. Two positions remains:
  224. Pos. 16 is very hard and is not solved. 
  225. Pos. 27 is not solved because black can extend the horizon with 3-4 checks 
  226. with his rooks. If I move pawn h2 to g2 the position is solved in a few 
  227. minutes.
  228.  
  229.  
  230.  
  231.  
  232.  
  233. The variants of chess in Dabbaba
  234.  
  235. Generel:
  236. In a variant is en passant and castle allowed unless otherwise stated. 
  237. Similar is the goal to mate the king.
  238. If a man has got a changed movement as fx the nightrider, the change is 
  239. complete: There is no usual knight, and a promotion to knight will be to a 
  240. knightrider.
  241. In variants where the king can be captured, promotion to king is allowed.
  242.  
  243. 1) Stationary Chess
  244. The king cannot move. No castle.
  245.  
  246. 2) Knightmate Chess
  247. The knights are replaced with kings, and the king is replaced with a 
  248. knight.
  249. The goal is to mate the knight. No castle.
  250.  
  251. 3) Chancellor Chess
  252. The queen moves as a rook and a knight. 
  253.  
  254. 4) Archbishop Chess (Janus Chess)
  255. The queen moves as a bishop and a knight.
  256.  
  257. 5) Nightrider Chess
  258. The knight can make long moves like bishops and rooks.
  259. Ng1 in the startposition can besides f3 and h3 move to e5 and d7.
  260.  
  261. 6) Rooksquare Chess
  262. You also win if you get a man moved to one of the opponents corners (white 
  263. moves a man to a8/h8). This variant is not implemented yet.
  264.  
  265.  
  266. History
  267. Dabbaba started in spring 1995 as NO-CHESS (Nielsen-Osted chess).
  268. Soon I made a version called BRUTALIS. It solves helpmates.
  269. Autumn 1995 Dabbaba got simple graphics, and SHOWTIME and SKAKBRAT were 
  270. preparations for this.
  271. Dabbaba and NO-chess (with focus on ordinary chess) will be continued.
  272.  
  273.  
  274. Stop the program
  275. CTRL+BREAK will cancel the program at the next display to the screen.
  276. If you are computing a move in a testposition and has turned screen-info 
  277. on, you have wait for the move or to reset your computer to stop it. 
  278.  
  279. Known error
  280. at the end of a game (mate/stalemate) Dabbaba will claim stalemate in a 
  281. mate-position....   
  282.  
  283. Future work with Dabbaba
  284. Make a simple evaluation of king safety (number of pawns covering the 
  285. king).
  286. Remove the end-of-the-game-error.
  287. Make Dabbaba play a little random in the opening.
  288. Finish the checksearch and find out what to do with the matesearch.
  289.    *** this is the goal with Dabbaba ver. 0.100 ***
  290. Optimize the code to improve the speed.
  291. Make use of hashtables.
  292. Remove more bad moves.
  293. Make a better search of lines.
  294. Make a better positional evaluation.
  295. Incorporate more variants of chess.
  296. Better graphics (Dabbaba is still mainly based on textmode).
  297. Make use of the mouse.
  298. Implement permanent brain (calculate moves while the opponent thinks).
  299. Make an opening library. 
  300. Try the null-move trick.
  301. Give Dabbaba endgame knowledge.
  302.  
  303.  
  304. ***************************************************************************
  305.  
  306. If you want to know more about computerchess I can strongly recommend 
  307. 'Schach am PC' (sep. 1995, 500 pages). It contains a CD-ROM with 50MB data 
  308. including a school-example of a chessprogram with binaries and sourche both 
  309. in C and Visual Basic (surprisingly only 30% slower than the C-version). 
  310. The program is described in the book.
  311. If you want to have a look at the program MiniMAX; first try the version in
  312. BASIC as only this starts with a presentation of the available commands. 
  313. A demo-version of ChessBase for Windows includes the endgamedatabase KBB-KN 
  314. with 121 million positions compressed in 28MB.
  315.  
  316. 'Grottan' is a computerchess-BBS in G¢teborg, Sweden. SysOp is G¢ran 
  317. Grottling. Phone 31992301. 
  318.  
  319. Variant Chess - 4 issues pr. year.
  320. 9 GBP or 13 USD Europa/Rest of world(surface). 
  321. Write to editor Peter Wood, 39 Linton Road, Hastings, East Sussex, TN34 
  322. 1TW, England.
  323.  
  324. Eteroschacco
  325. An italian magazine about chess variants. Write to Alessandro Castelli, 
  326. 62010 Villa Potenza, Macerata, Italy. 
  327.  
  328. In 1994 came the long waited book: The Encyclopµdia of Chess Variants (ECV) 
  329. by D.B.Pritchard. 1450 variants are explained.
  330. Write to Games & Puzzles, PO Box 20, Godalming, Surrey GU9 4YP, UK.
  331. Price 22 GBP + porto.
  332.  
  333. ***************************************************************************
  334.  
  335. Dabbaba is spread to Denmark, England, Italy, Sweden and USA.
  336.  
  337. If you have any comments you can send me a note. 
  338.  
  339.  
  340.  
  341.  
  342. Greetings
  343.  
  344.  
  345.  
  346. Jens Bæk Nielsen
  347. Daltoften 15
  348. 8600 Silkeborg
  349. Denmark
  350. jensbaek@silkeborg.bib.dk
  351.  
  352.