bob wrote:That will be an interesting test. Computers are, in general, horrible odds players. You can't keep exchanging a pair of pieces to win a pawn. You run out of pieces before you catch back up in material, leaving yourself lost.
Which raises an idea. Why not include this in material evaluation. There is already a second order effect in the phase calculation, but this is not sufficient.
When you exchange pieces you get into later phase, meaning that remaining peaces and also odd you have is worth more. However, the value is smaller than 100cp.
So the idea would be to scale material score with total sum of pieces you have.
One example formula can be:
new_material_score=material_score*material_score*(starting_total_material-material_score)/((material_score-1)*your_current_material + starting_total_material-material_score)
So, taking base material values 3, 3, 6, 9, if you have rook odd at opening, opponent engine would value:
new_material_score=6*6*21/(5*21+21)=6
After exchanging knights for example it would be:
new_material_score=6*6*21/(5*18+21)=6.81
Combined with later phase this would be enough to prevent exchanges for a pawn when you are rook down.
However, in case of knight odd:
new_material_score=3*3*24/(2*24+24)=3
After exchanging bishops for example it would be:
new_material_score=3*3*24/(2*21+24)=3.27
So it's worth exchange to win a pawn.
However, if engine has rook and knight while his opponent has rook and two knights, exchanging knights brings:
before exchange: new_material_value=3*3*24/(2*9+24)=5.14
after exchange: new_material_value=3*3*24/(2*6+24)=6
So, after phase adjustment pawn gain is not sufficient to compensate for the exchange.