An idea round my head:
As now, when alpha-beta search for a good move, it always compare new variation with alpha in the following way:
Code: Select all
....
eval = -search(-beta, -alpha);
if (eval > alpha) {
if (eval >= beta) return eval;
copy_new_pv(ply);
}
....Code: Select all
...
eval = -search(-beta, -alpha)
if (eval >= alpha) {
if (eval >= beta) return eval;
if (eval == alpha && !best_path())
continue;
cppy_new_pv(ply);
}
...1) I will prefer PV with captures to PV with no captures (or promotions), so It will not play boring never-endings drawn positions. It will simplify and the drawn should came soon.
2) Other ideas like to prefer variations which moves go more into enemy camp, or those that will put pieces near king,....
I have a few questions about this, because I am not currently sure how to implement it well:
1) Is it the idea possible?
2) Is it my code good? or should I take into account other consideration? i.e. I dont know exactly what should I return when no pv is found and no fails high (normal conditions alpha is returned at the end of search function)
3) Do you think this could be a performance bottleneck?
4) Your opinion in general.
Thanks
Fermin


