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>
Allow a seacrh to take a bit more time if needed.
This reduces the chanches of wast all the search time
for the last iteration and also allow to start the last
iteration when we have less time remaining.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
STL library is not guaranteed to be thread safe, even for
read-access.
So because these global maps are accessed by all the threads
we need to protect them.
This fixes a random crash experienced during testing.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Introduced in the patch "movegen: prefer (*mlist++) to mlist[n++]"
This was nasty because due to a mismerge the repo in one PC had the bug,
but the testing one did not, so I had non reproducible results according
to which machine I used for testing.
This hopefully closes a more then one week regression that made me go crazy!
It was found by accident comparing, for other reasons, the sources of the
two PC's.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
It seems that "few moves" works because we extend the good
captures at the last ply of PV, so code it directly.
This version seems defenitly stronger then previous one.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
It does not seem to work after a little testing.
Perhaps it works on the long terms, but it is also
ugly because not correct, so revert for now.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
We have a regression somewhere here so restart from zero
and proceed one change at a time.
With this modification we have the same strenght of
"Introduce Stockfish" patch that is our strongest to date.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>