ArticleslgStudy

computer science

MTD(f)

MTD(f) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand MTD(f) rather than just read about it. In short: MTD(f) is an alpha-beta game tree search algorithm modified to use ‘zero-window’ initial search bounds, and memory (usually a transposition table) to reuse intermediate search results. MTD(f) is a shortened form of MTD(n,f) which stands for Memory-enhanced Test Driver with node ‘n’ and value ‘f’.

Key takeaways

  • MTD(f) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect MTD(f) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of MTD(f) from memory before moving on to harder problems.

Reference excerpt

MTD(f) is an alpha-beta game tree search algorithm modified to use ‘zero-window’ initial search bounds, and memory (usually a transposition table) to reuse intermediate search results. MTD(f) is a shortened form of MTD(n,f) which stands for Memory-enhanced Test Driver with node ‘n’ and value ‘f’. The efficacy of this paradigm depends on a good initial guess, and the supposition that the final minimax value lies in a narrow window around the guess (which becomes an upper/lower bound for the search from root). The memory structure is used to save an initial guess determined elsewhere. MTD(f) was introduced in 1994 and largely supplanted NegaScout (PVS), the previously dominant search paradigm for chess, checkers, othello and other game automatons.

Origin MTD(f) was first described in a University of Alberta Technical Report authored by Aske Plaat, Jonathan Schaeffer, Wim Pijls, and Arie de Bruin, which would later receive the ICCA Novag Best Computer Chess Publication award for 1994/1995. The algorithm MTD(f) was created out of a research effort to understand the SSS* algorithm, a best-first search algorithm invented by George Stockman in 1979. SSS* was found to be equivalent to a series of Alpha-beta pruning|alpha-beta calls, provided that alpha-beta used storage, such as a transposition table. The name MTD(f) stands for Memory-enhanced Test Driver, referencing Judea Pearl's Test algorithm, which performs Zero-Window Searches. MTD(f) is described in depth in Aske Plaat's 1996 PhD thesis.

Zero-window searches A "zero-window" search is an alpha-beta search whose upper and lower bounds are identical, or differ by one unit, so that the return value is guaranteed to fall outside the bound(s) (or in an exceptionally lucky case, be equal to the bound). MTD(f) derives its efficiency by only performing zero-window alpha-beta searches, with a previously determined "good" bound (i.e. beta). In MTD(f), AlphaBeta fails high or low, returning a lower bound or an upper bound on the minimax value, respectively. Zero-window calls cause more cutoffs, but return less information - only a bound on the minimax value. To find the minimax value, MTD(f) calls AlphaBeta a number of times, converging towards it and eventually finding the exact value. A transposition table stores and retrieves the previously searched portions of the tree in memory to reduce the overhead of re-exploring parts of the search tree.

Pseudocode function MTDF(root, f, d) is g := f upperBound := +∞ lowerBound := −∞

while lowerBound < upperBound do β := max(g, lowerBound + 1) g := AlphaBetaWithMemory(root, β − 1, β, d) if g < β then upperBound := g else lowerBound := g

return g

f First guess for best value. The better the quicker the algorithm converges. Could be 0 for first call. d Depth to loop for. An iterative deepening depth-first search could be done by calling MTDF() multiple times with incrementing d and providing the best previous result in f. AlphaBetaWithMemory is a variation of Alpha Beta Search that caches previous results.

Description MTD(f) calls the zero-window searches from the root of the tree. MTD(f) depends on a transposition table to perform efficiently. Zero-window searches hit a cut-off sooner than wide-window searches. They are therefore more efficient, but, in some sense, also less forgiving, than wide-window searches. However, wider search windows are more forgiving for engines with large odd/even swings and fine-grained evaluation functions. For this reason some chess engines have not switched to MTD(f). In tests with tournament-quality programs such as Chinook (checkers), Phoenix (chess), and Keyano (Othello), the MTD(f) algorithm outperformed all other search algorithms. Recent algorithms like Best Node Search are suggested to outperform MTD(f).

References

External links Description of MTD(f) algorithm

Worked examples

Example 1 — a first encounter with MTD(f)

Start with the simplest possible case. Write down what MTD(f) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to MTD(f) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about MTD(f) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of MTD(f)

In research
MTD(f) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses MTD(f) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
MTD(f) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Search algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for MTD(f) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study MTD(f) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what MTD(f) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain MTD(f) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is MTD(f) in simple terms?

MTD(f) is an alpha-beta game tree search algorithm modified to use ‘zero-window’ initial search bounds, and memory (usually a transposition table) to reuse intermediate search results. MTD(f) is a shortened form of MTD(n,f) which stands for Memory-enhanced Test Driver with node ‘n’ and value ‘f’.

Why does MTD(f) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study MTD(f)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on MTD(f).

Tags

  • Search algorithms

Keep exploring