Guetti wrote:
Hm, but MVV/LVA is
score = value[captured_piece] - moving_piece;
PxQ > RxQ
meaning (980 - 1) > (980 - 4)
correct?
I see, if that is the "classical" MVV/LVA heuristic, it might be correct.
PxP = 99 > QxP = 96, yes better than nothing if pawn is defended (by other pawn).
Yes, this is exactly how uMax implements QS. Although it is a bit funny there, as the piece encodings are not in the usual order, and King comes between Knight and Bishop (to make the leapers contiguous in encoding space). So it tries capture with King a bit early. That doesn't really hurt, as capture with King is hardly ever possible. And when the piece was defended, the branch cuts off immediately: there never is a large subtree from such a move. (With a legal move generator only captures with King of undefended pieces would be generated. So a KxB always has a SEE value of +3, while a PxB might have a SEE value of +2...)
In uMax the MVV/LVA determination is implemented as the first IID iteration (QS being the second), where
Tony wrote:
This all should also give you a change to have alpha-beta "sink in". Once you understand it, it is difficult to understand that you didn't understood it, but till that time it's like hanging on to a train with your fingertips.
Tony
Alpha-beta still holds some mysteries to me. Here is a question for the cracks. I collect the PV like this in the lower part of the ab-search (sorry, no TT yet):
This works fine. However, when I search with an Aspiration-window and have to do a research with the full window I don't get a PV for the first search. In fact, the number of moves in the PV line is 0. I wonder why? Is it a bug in my PV collection or is there a reason for this?
Tony wrote:
This all should also give you a change to have alpha-beta "sink in". Once you understand it, it is difficult to understand that you didn't understood it, but till that time it's like hanging on to a train with your fingertips.
Tony
Alpha-beta still holds some mysteries to me. Here is a question for the cracks. I collect the PV like this in the lower part of the ab-search (sorry, no TT yet):
This works fine. However, when I search with an Aspiration-window and have to do a research with the full window I don't get a PV for the first search. In fact, the number of moves in the PV line is 0. I wonder why? Is it a bug in my PV collection or is there a reason for this?
The reason is simple
The score is never bigger than alpha and not bigger than beta in the first search.
I start from pv[0][0]=root_moves->moves[0].move; so I always get a pv of at least one ply even if I fail high at root node.
If I fail high on non root move then I do a research and do not update the pv(it may be wrong fail high and I want to remember the old pv) but in this case movei print information that is not in the pv so the user can see the move that movei failed high on it.
Tony wrote:
This all should also give you a change to have alpha-beta "sink in". Once you understand it, it is difficult to understand that you didn't understood it, but till that time it's like hanging on to a train with your fingertips.
Tony
Alpha-beta still holds some mysteries to me. Here is a question for the cracks. I collect the PV like this in the lower part of the ab-search (sorry, no TT yet):
This works fine. However, when I search with an Aspiration-window and have to do a research with the full window I don't get a PV for the first search. In fact, the number of moves in the PV line is 0. I wonder why? Is it a bug in my PV collection or is there a reason for this?
hgm wrote:Yes, this is exactly how uMax implements QS. Although it is a bit funny there, as the piece encodings are not in the usual order, and King comes between Knight and Bishop (to make the leapers contiguous in encoding space). So it tries capture with King a bit early. That doesn't really hurt, as capture with King is hardly ever possible. And when the piece was defended, the branch cuts off immediately: there never is a large subtree from such a move. (With a legal move generator only captures with King of undefended pieces would be generated. So a KxB always has a SEE value of +3, while a PxB might have a SEE value of +2...)
In uMax the MVV/LVA determination is implemented as the first IID iteration (QS being the second), where
score = pieceValue[victim] - movingPiece;
without search.
In other engines with P = 100 and Q = 900 this could work:
score = pieceValue[victim] - pieceValue[movingPiece] / 10;
or
score = pieceValue[victim] - pieceValue[movingPiece] / 20;
This is independent from the order of the piece numbers.
Aleks Peshkov wrote:Sometime ago Fabien Letouzey posted a working way to collect PV from zero-window searches.
Doesn't work for alpha beta/pvs.
With MTD you do (at least) 2 searches. Search 1 would give you (at the last 2 iterations) fe the White moves (ie fail high moves). Search 2, with highered alpha-beta, would give you the Black moves (White fail lows,Blacks fail highs).
Various tricks (hashtable, killer moves etc) give a high(er) chance that the 2 lines searched are actually the same (because they could be different with the same score) most of the times.
But in non MTD you don't search for this turning point, so you don't want to do this second search with a zero-window.
Tony
PS Before the last 2 searches ( so during stabilization), you wouldn't get THE main line, but just A line that is responsible for the fail high/low. There is no garantue it's the best line. (for reasons mentioned before)