Futility Methods
Posted: Fri Jan 21, 2011 4:26 pm
There seems to be no standard for Fuility, and I'm trying to figure out the best way to add it to my search. Different examples I've seen only help to confuse... update PV/ don't update PV, use best_move/don't use best move.....
fruit
sf
returning alpha...
bison
sloppy
So from all these examples, is updating the PV just an option? Whats the difference? Also, is updating the best_move just an option?
If I return alpha could I do:
Or should I update the PV if score>best_score? I'm confused because all these programs are doing things differently and I cant see whats the difference? Do i really need a best_move = move function? Thanks, and sorry for reposting this, I was trying to simplify my question.
[/code]
fruit
Code: Select all
if( value > best_value )
{
best_value = value;
pv_cat(pv, new_pv, move);
if( value > alpha )
{
alpha = value;
best_move = move;
if( value >= beta )
goto cut;
ASSERT(value_is_ok(best_value));
return best_value;
Code: Select all
// Step 17. Check for new best move
if (value > bestValue)
{
bestValue = value;
if (value > alpha)
{
if (PvNode && value < beta) // We want always alpha < beta
alpha = value;
assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE);
return bestValue;
bison
Code: Select all
if (value > best_value) {
best_value = value;
*best_move = *m;
UpdatePV(ply, m);
if (value > alpha) {
alpha = value;
if (value >= beta)
break;
return alpha;
Code: Select all
if (val > best_val) {
best_val = val;
best_move = move;
if (val > alpha) {
alpha = val;
update_pv(pv, new_pv, move);
}
return alpha;
If I return alpha could I do:
Code: Select all
if (score > best_score && legal_move) {
best_score = score;
if (score > alpha && legal_move) {
alpha = score;
/* update the pv: */
return alpha
[/code]