Author: Vincent Diepeveen
Date: 05:45:19 10/16/00
Go up one level in this thread
On October 16, 2000 at 06:32:53, Pham Minh Tri wrote: >I know that Bitboard makes move generation the fastest, but this structure is It's not faster at 32 bits. It's about 2 times slower as normal implementation. Note that normal implementation is a C implementation, bitboard implementation from crafty is using inline assembly. If i use inline assembly i'm sure i can do it a bit faster again as i am already doing it. It's at a 32 bits processor over 2 times faster anyway. At 64 bits processors it's a different story depending upon which kind of processor we are talking about, as some don't have crucial instructions, alpha on the other hand has. Yet i never could test so far at a 21264 processor to compare the speed of DIEP at it with the speed of crafty at it. Crafty speeds up bigtime at such a processor. Taking into account that diep is having an over 2 times faster datastructure at 32 bits processors we can easily mention that it's gonna get close on 64 bits processors as crafty has over a 2 times speedup at alpha. >also one of the most complicated. However, an old post said that the generation >function is not the key of success to chess program and the author illustrated >that after his optimality (which made that function work much faster), the speed >of system increased only 1 percent. Even worse, the move generation itself is not the most important thing at all. Evaluation is. For me also attacktables are which i can't do in bitboards at all unless i completely rewrite my evaluation to something 4 times bigger at least (for each piece for each color bla bla), so evaluation gets slower then if i take use of some 64 bits bitmaps. Yet then i need a 64 bits machine anyway, as in 32 bits i lose already like 14 clocks or so only doing a FirstOne() call or a LastOne() call to get the bit out of the bitboard, which is necessary for redenation code. What Bob is doing in crafty is the assumption that you don't need much knowledge in evaluation, so in crafty he's doing a few things that can be done quick in bitboards. So it's all about approach. If your approach is to take advantages of bitboards and you have a 64 bits processor, then sure you can be fast with it. If you want to put a bit more knowledge like attacks and extended mobility in a program, then you gotta use a different approach. Doesn't take away that if your evaluation gets huge, that you can use a few bitboards handy. Most interesting are pawn bitboards to quick see whether your position has a certain type of pawn structures. >As a result, my question is: is bitboard really worthy for implementation when >it takes a long time to program and more time to fix all bugs (maybe several >times bigger than the rest of program)? Or is it better if we use this time to >concentrate on hash table, null move threshold and so on? I plan that I will >forget the bitboard (at least in the first period) if it help me only few >percent. For any approach: quality above quantity except if the quantity is defined by the speed of a functional language. Any strong chess program, even if it would be 10 times slower is still a strong program. Speeding up your program is always possible in the future. First make a good program! My advice is to use a datastructure which you understand best. Most easy to start with is the gnuchess structure idea as written down by John Stanback (as gnuchess 4.0 and before and not the raped 5.0 version and such): int board[64]; // 7 different values 0 empty other values for pieces int color[64]; // 3 different values 0,1 2=neutral int piecelist[2][16]; // for all pieces of each side you have square int piececount[2]; // number of pieces for each side int Pindex[64]; // at square sq it has value referring to index in piecelist Now all you need are a few precalculated tables which can be done in a few million ways, see gnuchess version 4.0 and many other programs for possible solutions. >Pham
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.