minimax4j/src/main/java/fr/avianey/minimax4j/impl/TranspositionNegamax.java
/**
     * Save the transposition for the current position using a default strategy:
     * <ul>
     *     <li>existing transposition is null</li>
     *     <li>existing transposition depth is lower than the remaining depth</li>
     * </ul>
     * Override this method to implement your own replacement strategy using additional criteria such as ancient,
     *
     * @param key the transposition key for the current configuration
     * @param transposition the existing transposition for the given key hash (or null if no transposition exists)
     * @param score the evaluation for the given depth
     * @param depth the depth of the searched subtree (aka remaining depth)
     * @param flag type of evaluation {@link #FLAG_EXACT}, {@link #FLAG_LOWERBOUND}, {@link #FLAG_UPPERBOUND}
     */
Save the transposition for the current position using a default strategy:

existing transposition is null
existing transposition depth is lower than the remaining depth

Override this method to implement your own replacement strategy using additional criteria such as ancient.


Save the transposition for the current position using a default strategy : existing transposition is null existing transposition depth is lower than the remaining depth Override this method to implement your own replacement strategy using additional criteria such as ancient .
protected void saveTransposition(final K key, final Transposition<K> transposition, final double score, final int depth, final int flag) {
        if (transposition == null || transposition.depth <= depth) {
            getTranspositionTable().put(key.hashCode(), new Transposition<K>(score, depth, flag, key));
        }
    }
protected void saveTransposition ( final K key , final Transposition < K > transposition , final double score , final int depth , final int flag ) { if ( transposition == null || transposition . depth <= depth ) { getTranspositionTable ( ) . put ( key . hashCode ( ) , new Transposition < K > ( score , depth , flag , key ) ) ; } }
Save the transposition for the current position using a default strategy:
 <ul>
     <li>existing transposition is null</li>
     <li>existing transposition depth is lower than the remaining depth</li>
 </ul>
 Override this method to implement your own replacement strategy using additional criteria such as ancient,
Save the transposition for the current position using a default strategy : <ul > <li > existing transposition is null< / li > <li > existing transposition depth is lower than the remaining depth< / li > < / ul > Override this method to implement your own replacement strategy using additional criteria such as ancient