I'm trying to clarify the the exact conditions to score PV moves.
So my current understanding is:
If we have a PV move stored at CURRENT ply in PV table (assuming triangular PV)
and the move that has just been done on chess board EQUALS to the PREVIOUS ply's move of the PV table,
e.g assuming position:
[d]r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1
and PV line e2a6 e6d5 c3d5 b6d5 e4d5
I assume that we need to have this exact position:
[d]r3k2r/p1ppqpb1/Bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPB1PPP/R3K2R b KQkq - 0 1
to assing highest score to move e6d5 hence search it first in the next iteration of iterative deepeneing.
Is that correct?
If so what kind of techniques are available to MATCH the exact position to make sure WE ARE actually FOLLOWING PV?
I saw in VICE when move is stored into pv corresponding position's hash key is stored into pv/hash table and later retrieved by hash key.
On the other hand TSCP uses global variable follow_pv seemingly for the same purpose (I still can't figure out how it works)
Now what I'm trying to do is to check if CURRENT board position actually HAS piece extracted from the previous PV table ply's at square extracted from previous ply's move target square:
Code: Select all
if (
get_bit( bitboards[get_move_piece(pv_table[0][ply - 1])], get_move_target(pv_table[0][ply - 1]))
)
{
// in this case we're looking if CURRENT PV move is available in the move list
// and if so then order it highest
if (pv_table[0][ply] == move)
{
printf("curr PV "); print_move(pv_table[0][ply]); printf(" ply %d\n", ply);
printf("prev PV "); print_move(pv_table[0][ply-1]); printf(" ply %d\n", ply);
print_board();
//getchar();
return 20000;
}
}
Last question:
How to answer the question WHETHER SEARCH IS FOLLOWING PV or not without involving position keys?
Is that possible?
THANKS IN ADVANCE!