Author: Severi Salminen
Date: 11:54:31 01/31/01
Go up one level in this thread
>>Yep, the basic idea in fast programs is to do as much as possible in makemove()
>>and as little as possible in movegen(). So a test like Crafty's Perft could give
>
>What exactly is said by "movegen"? Verification of move for legality?
No, movegen() is the move generator (movegen() is what I call it in my C
program). It generates all moves from current position and saves them. Some
people check legality here and some do not. I don't as it is slower.
>>biased results. Perft generates and makes all legal moves to certain depth and
>>counts the number of resulting positions. In Perft you make all the moves you
>>generate, so fast programs (in normal search) probably have worse results than
>>other programs.
>
>Do you want to say that you counted moves when already your program make some
>search at certain depth? If so, your number of moves, even if not legal are
>beyond mine.
Perft is a command in Crafty. You enter "perft 5" and Crafty does a 5 ply search
and gives you the number of resulting positions - only the leaf nodes. So in
initial position "perft 2" gives you number 400 - as there are exactly 400
possible positions after white's and black's first move. This number has _only_
the legal positions, nothing more or less. Perf is another command in Crafty. It
generates moves from current position 1000000 times and reports the time. It
does _not_ check the legality at all. Then it repeats the next procedure 1000000
times: generate all moves, make and unmake (take back) each of them. And it
reports the time to perform this. You can try it out!
>>You should try to verify the legality only if you make a move. You'd go most
>>likely faster.
>
>Probably I did verification of number of moves in completely different way that
>expected. By precaution, I will say what I did. I called 2000000 special
>procedure that generate all legal moves for given position and put all checking
>moves at head of the chain. After the time that it took I found number of moves
>generated in one second.
This is what I basically did:
for(i=0; i<2000000;i++)
{
white_to_move=1;
gen_captures();
gen_non_captures();
}
So I generated moves (legal and non legal) for white 2000000 times and measured
time and calculated moves/s. And in Vincent's position I generated some
7'500'000 moves/sec on Celeron300.
>For me all this is very curious. By seeing the other programs the most basic
>speed I can see if really veriation of move generator is so important. It could
>be that the most important is CPU speed. For now all the speed of programs
>written in same language are very close. Almost never difference goes as much as
>10 folds. And when it is dramatic it is probably start somewhere after move
>generator. But for now I have no facts to feel me certain.
It is good thing to establish speed tests that anyone could use - to compare the
speed of their programs. Craftys Perf and Perft are good ones. Everyone could
implement them to their own programs and compare the results.
Severi
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.