Author: Uri Blass
Date: 05:59:24 09/03/03
Go up one level in this thread
On September 03, 2003 at 08:24:09, Gian-Carlo Pascutto wrote:
>On September 03, 2003 at 08:12:55, Uri Blass wrote:
>
>>On September 03, 2003 at 02:24:00, Gian-Carlo Pascutto wrote:
>>
>>>On September 02, 2003 at 22:34:49, Robert Hyatt wrote:
>>>
>>>>>Been working a year fulltime now :)
>>>>>
>>>>
>>>>So? It took you over a year to get your parallel search working. It took
>>>>me weeks.
>>>>
>>>>:)
>>>
>>>In all fairness, he did a full DTS implementation, including rewriting the
>>>program to a nonrecursive search, while you took an easy way out.
>>
>>I do not understand the need for non recursive search.
>>
>>I think that non recursive search simply limit your possibilities for future
>>developement because the code is ugly and you need to write almost the same
>>function again and again.
>
>Uh, no. Not using recursive search doesn't mean you have write the search
>function a hundred times all over again!
>
>Try looking at examples of recursive vs nonrecursive quicksort on the web
>if you don't understand how that can be done.
>
>DTS was designed to work with a nonrecursive search because it allows making
>splitpoints when needed higher up in the tree than the point where you are
>at the moment you notice you need to split.
>
>--
>GCP
I more like to think and not to look at other codes but when I think about it
you are right and my perft function is an example for a program
that does not use recursive search without writing the same code again and
again.
search is not done to a fixed depth but I guess that it is possible to do it
also in that case without writing the same code again and again.
Here is my perft function for people who are interested in it.
__int64 perft(int depth)
{
int numplies;
__int64 mone,p;
int a[20];
int diff[20];
int i;
mone=0;
p=0;
pinnumber[0]=pinnumber[ply];
ply=0;
generatepinarray();
gen();
memset(a,0,sizeof a);
diff[0]=first_move[1]-first_move[0];
if (depth==0)
return diff[0];
while (a[0]<diff[0])
{
for (numplies=ply;numplies<depth;numplies++)
{
if (a[ply]==0)
gen();
diff[ply]=first_move[ply+1]-first_move[ply];
if (diff[ply]>0)
makemove(gen_dat[first_move[ply]+a[ply]].m.b);
else
numplies=100;
}
if (numplies<100)
gen();
diff[ply]=first_move[ply+1]-first_move[ply];
mone=mone+diff[ply];
undomove();
while ((a[ply]==diff[ply]-1)&&(ply>0))
undomove();
if (ply<=0)
{
Uint64ToString(mone-p,buffer);
printf("%s",buffer);
printf(" ");
p=mone;
printf(" %s ",move_str(gen_dat[first_move[0]+a[0]].m.b));
}
a[ply]++;
i=ply+1;
while (i<depth)
{
a[i]=0;
i++;
}
}
return mone;
}
Uri
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.