ArticleslgStudy

physics

TD-Gammon

TD-Gammon is a physics 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 TD-Gammon rather than just read about it. In short: TD-Gammon is a computer backgammon program developed in the 1990s by Gerald Tesauro at IBM's Thomas J. Watson Research Center.

Key takeaways

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

Reference excerpt

TD-Gammon is a computer backgammon program developed in the 1990s by Gerald Tesauro at IBM's Thomas J. Watson Research Center. Its name comes from the fact that it is an artificial neural net trained by a form of temporal-difference learning, specifically TD-Lambda. It explored strategies that humans had not pursued and led to advances in the theory of correct backgammon play. In 1993, TD-Gammon (version 2.1) was trained with 1.5 million games of self-play, and achieved a level of play just slightly below that of the top human backgammon players of the time. In 1998, during a 100-game series, it was defeated by the world champion by a mere margin of 8 points. Its unconventional assessment of some opening strategies had been accepted and adopted by expert players. TD-gammon is commonly cited as an early success of reinforcement learning and neural networks, and was cited in, for example, papers for deep Q-learning and AlphaGo.

Algorithm for play and learning During play, TD-Gammon examines on each turn all possible legal moves and all their possible responses (lookahead search), feeds each resulting board position into its evaluation function, and chooses the move that leads to the board position that got the highest score. In this respect, TD-Gammon is no different than almost any other computer board-game program. TD-Gammon's innovation was in how it learned its evaluation function. TD-Gammon's learning algorithm consists of updating the weights in its neural net after each turn to reduce the difference between its evaluation of previous turns' board positions and its evaluation of the present turn's board position—hence "temporal-difference learning". The score of any board position is a set of four numbers reflecting the program's estimate of the likelihood of each possible game result: White wins normally, Black wins normally, White wins a gammon, Black wins a gammon. For the final board position of the game, the algorithm compares with the actual result of the game rather than its own evaluation of the board position. The core of TD-gammon is a neural network with 3 layers.

The input layer has two types of neurons. One type codes for the board position. They are non-negative integers ranging from 0 to 15, indicating the number of White or Black checkers at each board location. There are 99 input neurons for each, totaling 198 neurons. Another type codes for hand-crafted features previously used in Neurogammon. These features encoded standard concepts used by human experts, such as "advanced anchor," "blockade strength," "home board strength" and the probability of a "blot" (single checker) being hit. The hidden layer contains hidden neurons. Later versions had more of these. The output layer contains 4 neurons, representing the network's estimate of the probability ("equity") that the current board would lead to. The 4 neurons code for: White normal win, White gammon win, Black normal win, Black gammon win. Backgammon win is so rare that Tesauro opted to not represent it. After each turn, the learning algorithm updates each weight in the neural net according to the following rule:

w t + 1 − w t = α ( Y t + 1 − Y t ) ∑ k = 1 t λ t − k ∇ w Y k {\displaystyle w_{t+1}-w_{t}=\alpha (Y_{t+1}-Y_{t})\sum _{k=1}^{t}\lambda ^{t-k}\nabla _{w}Y_{k}}

where:

It was found that picking small λ {\displaystyle \lambda } offered performance roughly equally good, and large λ {\displaystyle \lambda } degraded performance. Because of this, after 1992, TD-Gammon was trained with λ = 0 {\displaystyle \lambda =0} , degenerating into standard TD-learning. This saved compute by a factor of 2.

Development history

Version 1.0 used simple 1-ply search: every next move is scored by the neural net, and the highest-scoring move is selected. Versions 2.0 and 2.1 used 2-ply search:

Make a 1-ply analysis to remove unlikely moves ("forward pruning"). Make a 2-play minimax analysis for only the likely moves. Pick the best move, probability-weighted by each of the opponent's 21 possible dice rolls (weighting non-doubles twice as much as doubles). Versions 3.0 and 3.1 used 3-ply search, using 21 2 = 441 {\displaystyle 21^{2}=441} possible dice rolls instead of 21. The last version, 3.1, was trained specifically for an exhibition match against Malcolm Davis at the 1998 AAAI Hall of Champions. It lost at -8 points, mainly due to one blunder, where TD-Gammon opted to double and got gammoned at -32 points.

Experiments and stages of training Unlike previous neural-net backgammon programs such as Neurogammon (also written by Tesauro), where an expert trained the program by supplying the "correct" evaluation of each position, TD-Gammon was at first programmed "knowledge-free". In early experimentation, using only a raw board encoding with no human-designed features, TD-Gammon reached a level of play comparable to Neurogammon: that of an intermediate-level human backgammon player. Even though TD-Gammon discovered insightful features on its own, Tesauro wondered if its play could be improved by using hand-designed features like Neurogammon's. Indeed, the self-training TD-Gammon with expert-designed features soon surpassed all previous computer backgammon programs. It stopped improving after about 1,500,000 games (self-play) using a three-layered neural network, with 198 input units encoding expert-designed features, 80 hidden units, and one output unit representing predicted probability of winning.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with TD-Gammon

Start with the simplest possible case. Write down what TD-Gammon claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In physics, 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 TD-Gammon 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 TD-Gammon 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 TD-Gammon

In research
TD-Gammon appears in physics 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 TD-Gammon 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
TD-Gammon is common in secondary-school and first-year university syllabi. It links to neighbouring topics Applied machine learning, Backgammon, Reinforcement learning, so understanding it makes those chapters shorter.
In everyday life
Look for TD-Gammon 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.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “TD-Gammon” →

Affiliate

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

How to study TD-Gammon in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what TD-Gammon 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 TD-Gammon out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is TD-Gammon in simple terms?

TD-Gammon is a computer backgammon program developed in the 1990s by Gerald Tesauro at IBM's Thomas J. Watson Research Center.

Why does TD-Gammon matter?

Because it connects several physics 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 TD-Gammon?

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 TD-Gammon.

Tags

  • Applied machine learning
  • Backgammon
  • Reinforcement learning

Keep exploring