Author: Uri Blass
Date: 07:08:58 04/30/02
Go up one level in this thread
On April 30, 2002 at 09:25:02, Grzegorz Sidorowicz wrote:
>Sometimes extensions is suicide for program.
>Below is my method to extensions prunning on ply=0.
>If you want I can public it for ply>0 (it is not the same)
>In my program it working very well :-)
>(about 10 positions more in WAC and 60 points more in LoguetII)
>
>extensions_off=false;
>bestmove=AlphaBeta (pos, depth, alpha, beta, 0)
>
>int AlphaBeta (pos, depth, alpha, beta, ply)
>{
> if (depth == 0) return Evaluate(pos);
> best = -INFINITY;
> succ = Successors(pos);
> while (not Empty(succ) && best < beta)
> {
> pos = RemoveOne(succ);
> if (best > alpha)
> alpha = best;
>
> int swap=0;
> if (!ply && target)
> swap=StaticExchangeEvaluator(from,to);
>
> go_deepper=0;
> if (AnyExtension())
> go_deepper=1;
>
> if (swap>0 && extensions_off)
> extensions_off=false;
> if (extensions_off)
> go_deepper=0;
>
> value = -AlphaBeta(pos, depth-1+go_deepper, -beta, -alpha, ply+1);
>
> if (swap>0)
> extensions_off=true;
>
> if (value > best)
> best = value;
> }
> return best;
>}
I do not understand.
My alphabeta function gets only 3 numbers
(remaining depth,alpha and beta)
I can guess that ply means the ply that you search when
pos means the position but I do not see a reason that the alphabeta function
needs to get them as parameters.
I also do not understand the part
bestmove=Alphabeta(...)
My Alphabeta function return only a score for the position and
it does not return best move(I have a special function
choosemove to choose a move and this function calls alphabeta
after making the moves at the root and choose a moe based
on the scores.
You write also some functions like StaticExchangeevaluator
when there is no explanation for their meaning(I guess that from and to are
squares in the chess board but again there is no explanation).
How do you expect people to understand your code?
If your code is similiar to another free source code then you
should at least give a reference for that code.
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.