Author: Steven Edwards
Date: 04:15:40 08/31/03
Go up one level in this thread
On August 31, 2003 at 06:42:03, Bo Persson wrote: >On August 31, 2003 at 02:21:03, Steven Edwards wrote: >>Since the bitboard mode is doing everything the non bitboard mode is doing, plus >>more, we can see that the additional cost for bitboard manipulation is roughly >>twice the cost of the shared portion of the work. >> >>Is it worth it? The answer depends on what is done with the additional >>information provided by the bitboard database at each node. In CT, both modes >>provide all of the following: >> >>1. A 64 entry array with the current board contents. >> >>2. The active color. >> >>3. The castling availability status. >> >>4. The en passant target square. >> >>5. The halfmove clock. >> >>6. The fullmove number (Items 1-6 together are the binary equivalent of FEN). >> >>7. The hash key for the main transposition table. >> >>8. The hash key for the pawn transposition table. >> >>9. The location squares of the kings. >> >>10. The material balance for both sides. >> >>11. A two way linked list of the moves leading to the position. >> >>12. A two way linked list of the main transposition table hash keys of the >>previous positions. >> >>In additon, the bitboard mode adds the entire bitboard database which includes: >> >>1. The BB of occupied squares. >> >>2. The BB of squares occupied by sweep [QRB] men. >> >>3. For each color, the BB of squares occupied by that color. >> >>4. For each color, the BB of squares attacked by that color. >> >>5. For each of the 12 (2 x 6) man kinds, the BB of squares occupied by that man >>kind. >> >>6. For each square, the BB of squares attacked from that square. >> >>7. For each square, the BB of squares attacking to that square. >> > >The bitboard version is not only doing more than the non-bitboard version, there >is also some overlap in the bitboard operations, meaning that some info is >computed and stored several times: > >Bitboards in 1 & 3 hold the same info. Maybe you could remove one of them? For the above, it is faster to update the separate items than to have to derive their values every time the information is accessed. >Bitboards in 2 & 5 hold the same info. Perhaps you could remove some of them? >For example, if you have one bitboard for diagonal sweepers (Q+B) and one for >angular sweepers (Q+R) you can deduce the separate Q, R, and B positions from >these. Again, it is faster to update the separate items than to have to derive their values every time the information is accessed. Also, it is quite useful to do indexing by man kind. >Bitboards in 4 hold the same info as bitboards in 6, just in a different way. To recreate the BBs in 4 would mean a scan of the BBs in 6, perhaps with help from #3. This would take far more time than a simple update. >Bitboards in 7 is sort of a cross reference for 6. Do you need both? Strictly speaking, 6 is the transpose of 7. So they hold the exact same information, but with exchanged indexes. I have found it worthwhile to have both of them during numerous computations including pin detection. square control. exchange analysis' and check evasion. >If you alredy store the king squares, do you also need to update single bit >bitboards for kings? The king square indexes are very handy to have and are used in many places. It's faster to maintain these than to have to regenerate them on demand frem the bitboards. The king location bitboards are kept for a number of reasons including uniformity and simplification of indexing the man location BB array. My priorities with CT are, in order: 1. Correctness 2. Portability 3. Simplicity 4. Feature set 5. Speed The toolkit is not intended to be a chess playing program. Rather, it is intended as a support system and framework for developing chess software, including chess playing programs. My own chess playing program, Symbolic, is being developed in Lisp and will be run on the specialized Lisp interpreter that in turn is supported by the application/workbench layer of CT. This workbench layer itself depends upon the foundation layer of CT. It's the foundation layer that has all the low level chess code and data like bitboards, move generators, and simple specialized searches.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.