Seeing Weini fail quite often due to delaying moves or intermediate checks I thought it might be a good idea to add check and recapture extension to the search. I try to apply then separately, only inside PV or everywhere, only at root or inside the tree, nothing is good ... all small elo loss (at least for short TC : 20sec/40, I suspect it will be better for larger TC).
Question is : what are the best strategies against horizon effect for short TC ?
Hoziron effect and extensions
Moderators: hgm, Rebel, chrisw
-
- Posts: 1871
- Joined: Sat Nov 25, 2017 2:28 pm
- Location: France
-
- Posts: 1871
- Joined: Sat Nov 25, 2017 2:28 pm
- Location: France
Re: Hoziron effect and extensions
A very good source of information : http://talkchess.com/forum3/viewtopic.p ... ct#p730613
-
- Posts: 868
- Joined: Thu Mar 09, 2006 11:21 pm
- Location: Nederland
Re: Hoziron effect and extensions
Probably best is first to get pruning/reductions to work well or better.So there is more time to search deeper.
Extensions might make it even harder.
Also ,if you did not already limit this,extend a move only once.
Best
Fonz
Extensions might make it even harder.
Also ,if you did not already limit this,extend a move only once.
Best
Fonz
-
- Posts: 855
- Joined: Sun May 23, 2010 1:32 pm
Re: Hoziron effect and extensions
In Vajolet i extend moves that gives check and have SEE >= 0 by half ply for non PV search, and moves that gives check or are passed pawn moves by one ply for PV search.
that said extension and reduction are used to search more deeply interesting path and reduce less promising ones. for my experience, reduction or pruning seems more easy since they don't have the risk of search explosion.
that said extension and reduction are used to search more deeply interesting path and reduce less promising ones. for my experience, reduction or pruning seems more easy since they don't have the risk of search explosion.
-
- Posts: 1871
- Joined: Sat Nov 25, 2017 2:28 pm
- Location: France
Re: Hoziron effect and extensions
Ok let's try that, thanksF. Bluemers wrote: ↑Mon Jun 25, 2018 7:39 pm Also ,if you did not already limit this,extend a move only once.
-
- Posts: 931
- Joined: Tue Mar 09, 2010 3:46 pm
- Location: New York
- Full name: Álvaro Begué (RuyDos)
Re: Hoziron effect and extensions
In my experience, it is important to be restrictive in the definition of recapture. My code currently does something like this:
Code: Select all
bool extend = false;
// Extend checks
if (!extend && in_check)
extend = true;
// Extend recaptures
if (!extend
&& last_two_moves_had_the_same_destination_square()
&& last_two_moves_captured_pieces_of_the_same_value()) {
extend = true;
}
int next_depth = depth - !extend;
-
- Posts: 1871
- Joined: Sat Nov 25, 2017 2:28 pm
- Location: France
Re: Hoziron effect and extensions
Seems not good at all in Weini to restrict to only +1 extension. This is weird because, during this test, only activated extensions were check, single_reply, and near_promotion which not cumulate very often (recapture and singular were off)... maybe something in end-game with checks and promotion ...xr_a_y wrote: ↑Tue Jun 26, 2018 5:19 pmOk let's try that, thanksF. Bluemers wrote: ↑Mon Jun 25, 2018 7:39 pm Also ,if you did not already limit this,extend a move only once.
-
- Posts: 1871
- Joined: Sat Nov 25, 2017 2:28 pm
- Location: France
Re: Hoziron effect and extensions
Same ! but only inside PVAlvaroBegue wrote: ↑Tue Jun 26, 2018 7:44 pm In my experience, it is important to be restrictive in the definition of recapture. My code currently does something like this:
Code: Select all
bool extend = false; // Extend checks if (!extend && in_check) extend = true; // Extend recaptures if (!extend && last_two_moves_had_the_same_destination_square() && last_two_moves_captured_pieces_of_the_same_value()) { extend = true; } int next_depth = depth - !extend;
Code: Select all
if (Definitions::extensionConfig.do_ReCaptureExtensionAlphaBeta
&& isPV
&& Square::IsValid(lastCapture)
&& move.To() == lastCapture
&& Piece::ValueAbs(currentP.Info().lastCapture) - Piece::ValueAbs(lastCapturePiece) < 100) {
++depth;
-
- Posts: 182
- Joined: Sun Jun 12, 2016 5:44 pm
- Location: London
- Full name: Vincent
Re: Hoziron effect and extensions
You could try restricted singular extensions, which is a more general technique that can get a lot of elo
-
- Posts: 1871
- Joined: Sat Nov 25, 2017 2:28 pm
- Location: France
Re: Hoziron effect and extensions
I have already implemented something based on stockfish implementation :
It indeed get some elo.
Code: Select all
if (Definitions::extensionConfig.do_SingularExtensionAlphaBeta
&& depth >= 8
&& ttt.depth >= depth - 3
&& ttt.t_type == Transposition::tt_alpha
&& isPV
&& bestMoveFound
&& ! extended) {
ScoreType rBeta = std::max(ttt.score - 2 * depth, -Definitions::scores.checkMateScore);
// To verify this we do a reduced search on all the other moves but the tt one and if the
// result is lower than tt score minus a margin then we will extend the tt move ONLY.
FastContainer<Move> moves2(moves);
moves2.erase(moves2.begin());
SearcherBase::SearchedMove swallowValue = searcher.SearchRoot(rBeta - 1, rBeta, moves2, previousP, depth / 2,
NULL, // never update pv here
false, // forbid nullmove
false, // no subject to time control
true, // forbid extension
false, // given moves are NOT trusted
false, // no display
false);// no debug display
if (SearcherBase::GetMove(swallowValue).IsValid() && SearcherBase::GetScore(swallowValue) < rBeta) {
++depth;
extended = true;
++Stats::countSingularExtensionAlphaBeta;
if (onlyOneExtension ) return true;
}
}