I think that there is a possibility to solve the problem of opposite colored bishops.mcostalba wrote:No, this is a good idea and I will test it.lech wrote:mcostalba wrote: The correct solution (no hacks!)![]()
I understand that you reject possibility to add a level (e.g. Phase(64))
and Stockfish will be test opposite bishops on such a high level of material.![]()
How to name it? Speculation?
What I don't plan to do is to move opposite bishops evaluation from evaluate() to material.
These bishops are danger when there is a potential material to attack kings, thus, in this case,
a decreased factor should not be applied.
Stockfish knows and applies such a specific material:
count of Q > 0 and non-pawn material >= Q + R middle game value.
It gives possibility to check (in the main material function) a basic part of conditions of opposite colored bishops.
It means:
count of bishops = 1 and not (count of Q > 0 and non-pawn material >= Q + R middle game value) for both sides.
There is a good possibility to return it (if true) by new factor (e.g.): POSSIBLE_OPPOSITE_COLORED_BISHOPS = 254.
This factor can be quickly tested (in the main evaluation function) directly without any phase and time-consuming function.
This leaves (only if true) one logical condition to test:
whether is true one of: evaluated bishop attacks and white squares for both sides.
If not, to set the factor value to default.
Maybe, it is not a nice solution


Am I sure?