(game, first, next, depth, scoring, tt=None)
return best_value
This implements Memory-Enhanced Test Driver.
    This method is not meant to be used directly.
    It's used by several algorithms from MT family, i.e see ``easyAI.SSS``
    For more details read following paper:
    http://arxiv.org/ftp/arxiv/papers/1404/1404.1515.pdf
This implements Memory-Enhanced Test Driver.
    This method is not meant to be used directly.
    It's used by several algorithms from MT family, i.e see ``easyAI.SSS``
    For more details read following paper:
    http://arxiv.org/ftp/arxiv/papers/1404/1404.1515.pdf
This implements Memory - Enhanced Test Driver . This method is not meant to be used directly . It s used by several algorithms from MT family i . e see easyAI . SSS For more details read following paper : http : // arxiv . org / ftp / arxiv / papers / 1404 / 1404 . 1515 . pdf
def mtd(game, first, next, depth, scoring, tt=None):
    """
    This implements Memory-Enhanced Test Driver.
    This method is not meant to be used directly.
    It's used by several algorithms from MT family, i.e see ``easyAI.SSS``
    For more details read following paper:
    http://arxiv.org/ftp/arxiv/papers/1404/1404.1515.pdf
    """
    bound, best_value = first, first
    lowerbound, upperbound = -inf, inf
    while True:
        bound = next(lowerbound, upperbound, best_value)
        best_value = mt(game, bound - eps, depth, depth, scoring, tt)
        if best_value < bound:
            upperbound = best_value
        else:
            lowerbound = best_value
        if lowerbound == upperbound:
            break
    return best_value
def mtd ( game , first , next , depth , scoring , tt = None ) : bound , best_value = first , first lowerbound , upperbound = - inf , inf while True : bound = next ( lowerbound , upperbound , best_value ) best_value = mt ( game , bound - eps , depth , depth , scoring , tt ) if best_value < bound : upperbound = best_value else : lowerbound = best_value if lowerbound == upperbound : break return best_value