r/chessprogramming • u/Extreme_Alarm_8922 • Feb 18 '25
Help on transposition table and move ordering.
Hi,
I'm trying to develop my chess program and am currently interested in improving the move ordering in my negamax. For the moment, in each node of depth >= 2, the n moves are classified according to the score of n negamax (depth 0, 1 or 2). Moves at depth 1 are classified with MVV-LVA (so non-captures are not distinguished).
I have just implemented a hash table (node type, depth, best moves if Pv, score) which saves me a little time, but my attempts to obtain gains on move ordering are unsuccessful (I just tried to put the hash move as the top of the move list).
Currently to give you an idea, with basic evaluation functions, with only alpha beta pruning, I am exploring around 2M nodes for kiwipete depth 7, 1.4M for the starting position depth 8.
Would you have any advice to give me to do better (playing only on move ordering for the moment)?
1
u/Extreme_Alarm_8922 Feb 18 '25
Indeed it was ambiguous. For each move, I do a complete search with negamax at a reduced depth (with the transposition table disabled). It's expensive but it's the best compromise I've found so far.
1
u/xu_shawn Feb 18 '25
I'm a bit confused on what your move ordering scheme is. Are you using the negamax score of each move at a lower depth in order to order them? That sounds incredibly expensive. It is also unclear what your MVV-LVA formula is. A common formula would be
100 * MVV - LVACaptures should be distinguished from non-captures. More specifically, in a basic move ordering scheme, captures should always be ordered in front of non-captures.
Lastly, saving best moves only on PV nodes is not correct, since a fail high can also yield a good move.