Cleanup and document.
The real functional change is that not mate threat
moves are never pruned, as could happen before.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
We can have depth(0) also in problematic cases
according to how extensions are tweaked by the user.
In any case we don't want to prune these moves.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
EvalInfo has missing attack info when a specialized
endgame function is used.
We missed this case and were using an empty attack bitboard
instead so that no captures were generated for endgames.
After testing the EvalInfo optimization gave worst results,
so after a (long) debug session this nasty bug was found.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Add infrastructure to threat killer moves as a vector,
this will allow us to easily parametrize the number of
killer moves, instead of hardcode this value to two as is now.
This patch just add the infrastructure, no functional
change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Teach Position::print() to optionally print a
given move in san notation in addition to
the ASCII representation of the board.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Instead of pospone until picking. No functional
change and probably no performance change but it is
needed for following patch.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
It is erroneusly considered a capture because king
moves on the same square of the rook.
Use the correct function Position::move_is_capture()
instead of the open coded (and buggy) one.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Make the logic work as advertised in the function
description.
Still a fallback from TT cleanup.
This should be less serious then the one in retrieve(),
but it's still a bug.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Killers should not be captures, but checks are not
and are produced also in qsearch.
Use this information, will be useful for move ordering.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Is set during the last iteration.
Sometime also during the second last.
During the last iteration is set in the 95% of cases.
During the second last is set in the 40% of cases.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
More testing is needed and better do not risk
just before release.
Reverted:
Disable LSN filtering as defualt for release
Use MVV/LVA in score_evasions()
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Do not calculate SEE on all the moves in MovePicker::score_captures()
but delay until pick_move_from_list() when only the best ones are
double checked against their see value.
If a beta cut-off occurs then we avoid calculating SEE on all
the moves, but just the picked ones.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>