Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Correction..

Author: Andrew Williams

Date: 15:26:23 03/16/04

Go up one level in this thread


On March 16, 2004 at 17:32:23, Matthias Gemuh wrote:

>On March 16, 2004 at 17:20:56, Andrew Williams wrote:
>>
>>int perft(int ply, int depth) {
>>	int legalPosition;
>>	int mvNum;
>>	move mv;
>>	int inCheck;
>>
>>	abNodes++;
>>	if(ply > depth) qNodes++;
>>	if(ply > depth || ply >= MAX_DEPTH) {
>>		return 0;
>>	}
>>
>>	plystart[ply+1] = plystart[ply];
>>
>>	inCheck = in_check(whoseTurn);
>>	if(inCheck) {
>>		legalPosition = get_me_out_of_check(ply);
>>	} else {
>>		legalPosition = generate_moves(whoseTurn, ply);
>>	}
>>	if(legalPosition == FALSE) return -ILLEGAL_POSITION;
>>//	sort_tree(ply);
>>	mvNum = plystart[ply];
>>
>>	while(mvNum < plystart[ply+1]) {
>>		mv = tree[mvNum].mv;
>>		if(ply == 1) {
>>			print_move(mv);
>>			fprintf(logFile, "\n");
>>		}
>>		make_move(mv);
>>		if(in_check(OTHERSIDE(whoseTurn))) {
>>			unmake_move();
>>			mvNum++;
>>			continue;
>>		}
>>
>>                tree[mvNum].score = -perft(ply+1, depth);
>>		unmake_move();
>>
>>		mvNum++;
>>    }
>>
>>	return 0;
>>}
>>
>>
>>Cheers
>>
>>Andrew
>
>
>
>
>Unfortunately I cannot exclude the generation of attackboards.
>What is your Athlon's GHz ?

This is my A64 3200+ (2GHz). My program also maintains (32-bit) attackboards on
the fly. They're updated in make_move(..) and unmake_move(), so they're included
in the timings given.

In all honesty, I don't think that perft speed is at all relevant. Mine is
shockingly slow compared to some engines that PM is fully the equal of. Mine is
slow because as well as the slow attackboard updates, PM also does a LOT of work
in generate_moves(..) to support move ordering. I'm prepared to put up with very
slow perft numbers because I do fewer make_moves and fewer generate_moves
because my move-ordering is pretty good. At least that is my intention.

Andrew



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.