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]