A graduate AI session built around the exact gap the student reported: a lecture asserting that the 25 opening moves of 5-by-5 Isolation reduce to 6 without naming the machinery behind it. Part 1 supplies that machinery in full - the eight symmetries of the square, orbits, the reason cells on a mirror line have small orbits on an odd-sized board, and Burnside's lemma as an independent check on the count of six. The rest builds the standard adversarial search ladder on top: minimax by hand, why depth limits and evaluation functions are forced, the horizon effect, alpha-beta pruning traced through the same tree, and iterative deepening. The closing part is a reading method for spotting the difference between a missing name and a missing minute.
Subject: Artificial Intelligence · 60 slides · applied lesson
Open the interactive version of this deck · Homework for this lesson
Title
Artificial Intelligence - Session 1
Why 25 moves are really 6, and everything that follows from being able to say so
Objectives
You described the problem precisely: the lecture introduces a concept at a granularity too coarse to commit to memory, and you then spend hours rebuilding it yourself. The Isolation symmetry reduction was your example, and you had already reconstructed the right answer alone.
What was missing was not the reasoning. It was knowing that this is a named piece of mathematics with a theorem that checks your answer, so the next time you can reach for the tool rather than rebuild it.
Russell and Norvig, Artificial Intelligence: A Modern Approach, Ch. 5 (Adversarial Search) Ch. 5 — The textbook chapter this material comes from.
Section
Your example, done properly
Concept
Isolation is played on a grid. Each player has one piece, moves it, and the square just vacated is removed from the board forever. A player who cannot move loses.
Consider the very first move on an empty 5-by-5 board. There are 25 empty squares, so there appear to be 25 distinct opening moves to search.
The claim in your lecture was that only 6 of them are genuinely different. That claim is correct, and it is worth being precise about what genuinely different means, because that phrase is doing all the work.
Socratic
Before any machinery, pin down the claim. This is the question the lecture skipped.
Discussion prompt
In what sense could placing your piece in the top-left corner and placing it in the bottom-right corner be the same move?
Hint: Imagine rotating the whole board, including everything that will happen afterwards.
Answer:
They are not the same square. What is the same is the entire game that follows. Rotate the board by 180 degrees and one opening becomes the other, and every subsequent position, every legal move and the final result all map across too.
So the two openings have identical game trees, differing only in how the squares are labelled. Searching both is doing the same work twice with the coordinates relabelled.
That is the criterion: two moves are equivalent when some symmetry of the board maps one game onto the other. Everything in this part is a way of counting how many genuinely different games are left.
Concept
A square can be picked up and put back down in exactly eight ways that leave it looking the same. That collection has a name and it is the object we are counting with.
D4 — The group of the eight symmetries of a square. Applying two of them in a row always gives a third one from the same list, which is what makes it a group.
The count of eight is the first number you need, and it is not negotiable. Any answer that does not use it is not counting correctly.
Picture it
Notice where the four lines fall on a 5-by-5 grid specifically.
Figure (svg): A five by five grid with four dashed symmetry lines drawn on it, two through the middle row and column and two along the diagonals, alongside a list of the eight symmetries.
That last observation is the direct answer to what confused you. On a 4-by-4 board the mirror lines fall between cells and no cell sits on one. On a 5-by-5 board, cells do sit on the lines, and those cells behave differently.
Concept
Take one square and apply all eight symmetries to it. You get a set of squares, and every square in that set is equivalent to every other. That set is the object being counted.
Orbit — The set of all positions a given position can be moved to by some symmetry. Every square lies in exactly one orbit, and two squares are equivalent precisely when they share one.
So the question is no longer how many squares there are. It is how many orbits there are, and the answer to that is the number of genuinely different opening moves.
The trap is assuming every orbit has eight members because there are eight symmetries. Most do not, and understanding why is the whole point of the next slide.
Prediction
Apply all eight symmetries to the centre square of the 5-by-5 board and collect the results.
Predict first
How many distinct squares are in the orbit of the centre?
Correct: 1
Why: Every rotation about the centre leaves the centre where it is, and every reflection line passes through it, so all eight symmetries send the centre to itself. The orbit contains one square. This is the direct counterexample to the assumption that orbits have eight members, and it is only possible because the board is odd-sized and therefore has a centre cell at all.
Worked example
Work through the board from the outside in, taking one representative square at a time and applying the eight symmetries.
Start with a corner, say the top-left.
Why: The four rotations send it to the four corners, and the reflections land on corners already found, so the orbit is exactly the four corners.
Take the middle square of the top edge.
Why: Rotations carry it to the middle of each edge. Reflections map it to edge midpoints already in the set. Orbit size four.
Take an edge square that is not a midpoint, one step in from a corner.
Why: This one is not on any symmetry line, so nothing fixes it and all eight symmetries give different squares. Orbit size eight, and this is the only orbit of full size.
Move inside and take the square diagonally in from a corner.
Why: It lies on a diagonal, so the diagonal reflection through it leaves it alone. The orbit is the four such inner-diagonal squares.
Take the square directly above the centre.
Why: It lies on the vertical mirror line, so that reflection fixes it. Orbit size four, giving the four squares adjacent to the centre along the axes.
Finally take the centre itself.
Why: Fixed by everything, orbit size one, as predicted on the last slide.
\[ 4 + 4 + 8 + 4 + 4 + 1 = 25 \qquad \text{across } 6 \text{ orbits} \]
Figure (svg): The five by five board with every cell tinted by which of the six orbits it belongs to, each cell labelled with its orbit size, and a colour key listing the six orbits and their sizes.
Verify: add the orbit sizes and check they account for every square.
Why: Four corners, four edge midpoints, eight edge off-centre, four inner diagonal, four inner axis, and one centre. That totals 25, which is every square on the board, counted exactly once. Six orbits, so six genuinely different opening moves.
Trap
There are eight symmetries and 25 squares, so each orbit should have eight squares in it, and the number of orbits should be 25 divided by 8.
\[ \frac{25}{8} = 3.125 \quad \text{distinct moves} \]
The answer is not a whole number, which is strange, but presumably it rounds to 3.
The arithmetic is fine and the assumption behind it is false. An orbit only has eight members if no symmetry leaves that square where it is.
A square sitting on a mirror line is unmoved by the reflection through that line, so two different symmetries send it to the same place and its orbit is smaller. The centre, fixed by all eight, has an orbit of one.
This is exactly the observation you made yourself and could not place: squares on a quadrant line behave differently, and they do so because the board has odd side length, which is what puts cells on the lines at all.
The non-integer answer was the signal. When a count that must be a whole number is not, an assumption is wrong rather than the arithmetic. The correct statement is the orbit-stabiliser relationship: orbit size times the number of symmetries fixing the square always equals eight. Corners have orbit 4 and 2 fixing them; the centre has orbit 1 and 8 fixing it.
Concept
There is a counting theorem for exactly this, and knowing its name is the difference between rebuilding the argument for an hour and checking it in two minutes.
\[ \text{number of orbits} = \frac{1}{|G|} \sum_{g \in G} |\text{Fix}(g)| \]
In words: average the number of squares each symmetry leaves fixed, over all eight symmetries. That average is the number of orbits.
It is called Burnside's lemma, or the orbit-counting theorem. It is worth learning because it turns an error-prone enumeration into an arithmetic check you can do without drawing anything.
Burnside's lemma (the orbit-counting theorem) — counting distinct configurations under a symmetry group orbit-counting theorem — The general statement.
Worked example
Count the squares each of the eight symmetries leaves exactly where it was, then average.
The identity fixes everything.
Why: Doing nothing leaves all 25 squares in place, so it contributes 25. The identity always contributes the full board, which is why it must be included.
Each of the three non-trivial rotations fixes only the centre.
Why: A rotation about the centre moves every other square, so each contributes 1, for 3 in total.
Each of the four reflections fixes the squares lying on its own line.
Why: Every mirror line on a 5-by-5 board passes through exactly 5 cells, whether it is an edge line or a diagonal. So each reflection contributes 5, for 20 in total.
\[ 25 + (1 + 1 + 1) + (5 + 5 + 5 + 5) = 48 \]
Divide by the number of symmetries.
Why: Eight symmetries, so divide the total of 48 by 8.
\[ \frac{48}{8} = 6 \]
Figure (svg): A table listing all eight symmetries of the square against the number of cells each one leaves fixed on a five by five board, totalling forty-eight, with the division by eight giving six orbits.
Verify: compare with the orbits enumerated by hand.
Why: The hand enumeration produced six orbits of sizes 1, 4, 4, 4, 4 and 8. Burnside produces 6 without ever listing them. Two completely independent methods, the same answer, which is as much confidence as you can get on a combinatorial count.
Fill the middle
Same theorem, even side length, so no cell lies on any mirror line. There are 16 cells and still 8 symmetries.
Fill in the blanks
\frac3___ = ___
Why: On an even board the rotations fix nothing, because there is no centre cell. The two edge mirror lines fall between rows and columns so they fix nothing either, while the two diagonals still pass through 4 cells each. The total is 24, and dividing by 8 gives 3 orbits: corners, edges, and inner cells. Fewer orbits than the odd board, which is exactly the effect of the mirror lines no longer landing on cells.
Real world
Symmetry reduction is not a mathematical decoration. It is a performance technique.
Discussion prompt
If the opening has 6 distinct moves rather than 25, what does that do to the cost of searching the first ply, and where else does the same trick apply?
Hint: Think about what happens to everything hanging below each of those moves.
Answer:
Searching 6 opening moves instead of 25 cuts the work by roughly a factor of four, and the saving is not just at the top: every subtree below a discarded move is discarded with it.
The same idea reappears throughout the course. Transposition tables exploit the fact that different move orders reach identical positions. Canonical forms in constraint satisfaction discard symmetric variable assignments. It is one idea with several names.
The general shape is worth carrying: whenever your state space has a symmetry, search one representative per orbit and multiply the result back if you need counts.
Pattern
Whenever a lecture waves at collapsing equivalent states, this is the procedure it is waving at.
Steps four and five are the ones that save the hours. They are how you find out you are wrong before you have built a search on top of a wrong count.
Check
Solve it on paper before you click.
Check your understanding
On a 3-by-3 board, how many genuinely distinct opening squares are there under the eight symmetries of the square?
Answer: B
Why: The nine cells fall into three orbits: the four corners, the four edge midpoints, and the single centre. Burnside confirms it: the identity fixes 9, each of the three rotations fixes only the centre for 3 more, and each of the four reflections fixes the 3 cells on its line for 12 more, giving 24, and 24 divided by 8 is 3.
Matching
This is the table Burnside's lemma consumes. Building it is the only real work in the theorem.
Match the pairs
Why: The identity moves nothing, so it fixes everything, and forgetting to include it is the most common Burnside error. A rotation about the centre moves every cell except the centre itself. A reflection fixes exactly the cells lying on its own mirror line, and on a 5-by-5 board every mirror line runs through 5 cells, diagonals included.
Error analysis
A student's Burnside attempt. The method is right and the answer is wrong.
Annotate
On: \( \frac{(1 + 1 + 1) + (5 + 5 + 5 + 5)}{8} = \frac{23}{8} \)
Include the identity every single time. It contributes the largest term in the sum and it is the easiest one to forget precisely because it does nothing.
Concept
Worth stating so the search in the next part has something concrete underneath it.
Because the board shrinks monotonically, the game cannot repeat positions or run forever. That guarantee is what makes the game tree finite and therefore searchable in principle, even though it remains far too large to search exhaustively.
Section
The algorithm the reduction was speeding up
Concept
Adversarial search assumes two players who alternate moves and want opposite things. One is trying to maximise a score and the other to minimise the same score, which is why a single number can describe the whole position.
Ply — One move by one player. A full round of both players is two plies, and mixing up plies with rounds is the most common depth-reporting error there is.
The game tree alternates between layers. On a MAX layer it is our turn and we choose the best available child. On a MIN layer it is the opponent's turn and they choose the worst child from our point of view.
Values are computed at the leaves and flow upward, each layer taking a maximum or a minimum. The value that reaches the root is the value of the position assuming both sides play optimally.
Picture it
Three opponent replies to each of our three moves. Read it bottom to top.
Figure (svg): A game tree with a MAX root, three MIN nodes beneath it, and nine leaf values, showing the minimum taken at each MIN node and the maximum taken at the root to give a value of three.
The root value is 3, and the move to play is the one leading to the MIN node that produced 3. Minimax returns both a value and the move that achieves it.
Worked example
The same tree, computed explicitly, because doing it once by hand is worth more than reading the pseudocode three times.
Evaluate the leaves. There is nothing to compute here, they are given.
Why: In a real search these come from either a terminal outcome or an evaluation function, which is the subject of Part 3.
Take the minimum at each MIN node.
Why: The opponent chooses among the children, and by assumption chooses whichever is worst for us, which is the smallest number.
\[ \min(3, 12, 8) = 3, \qquad \min(2, 4, 6) = 2, \qquad \min(14, 5, 2) = 2 \]
Take the maximum at the MAX root.
Why: We choose among the three MIN values, and we want the largest, because that is the best outcome available once the opponent has replied as well as they can.
\[ \max(3, 2, 2) = 3 \]
Figure (svg): The nine-leaf game tree with the three minimum values marked at the MIN layer and the maximum of those marked at the root as three.
Verify: sanity-check against the largest leaf on the board.
Why: The largest leaf anywhere is 14, and the root value is 3, far below it. That is correct rather than suspicious: 14 sits under a MIN node whose smallest child is 2, so the opponent would simply never let us reach it. A root value equal to the best leaf would be the actual warning sign, because it would mean the opponent was being ignored.
Anomaly
The tree contains a 14. Minimax returns 3.
Predict first
Why does the algorithm ignore a leaf worth more than four times the value it reports?
Correct: Because the opponent chooses which of our moves' consequences we get, and would never pick 14
Why: The 14 sits under a MIN node alongside a 5 and a 2. If we play the move leading there, the opponent picks from those three and takes the 2. We never get to choose the 14, because it is not our choice to make. This is the entire content of the min layer: outcomes we would love are worthless if somebody else picks.
Explain it to yourself
Minimax rests on one assumption about the opponent, and it is worth stating out loud.
Discussion prompt
What exactly does minimax assume about how the opponent plays, and what happens if that assumption is wrong?
Hint: What does taking the minimum at every MIN node imply about their skill?
Answer:
It assumes the opponent plays optimally: at every turn they find and take the move that is worst for us. It never assumes they will blunder.
If they play worse than optimally, the actual result is at least as good as minimax predicted. The value is a guaranteed floor rather than a prediction, which is a genuinely useful property.
The cost is that minimax will not set traps. A move that wins outright against a weak opponent but loses against a perfect one is rejected, because the algorithm only considers the perfect reply. That is why engines facing weak opponents sometimes use different criteria.
Concept
Minimax as described searches to terminal positions. For anything but a toy game, that is not remotely possible, and the reason is pure arithmetic.
\[ \text{nodes at depth } d \approx b^{\,d} \]
With a branching factor of 8, each additional ply multiplies the work by 8. Ten plies is over a billion positions, and games run far longer than ten plies.
So every practical game player does two things: it stops early, and it guesses the value of the positions where it stopped. Those two compromises are the subject of the next part.
Picture it
Branching factor 8, one bar per ply. Note the scale rather than the shape.
Figure (svg): A bar chart showing node counts at increasing search depths with a branching factor of eight: 8, 64, 512, 4096 and 32768.
This picture is why symmetry reduction from Part 1 mattered, and why alpha-beta in Part 4 matters more. Every technique in this deck is an attack on this graph.
Two truths and a lie
Four statements about what minimax does. One survives.
Eliminate the wrong options
Rule out the three that misstate the algorithm, and keep the one that is correct.
Survives elimination: m1
Why: The first is the definition. The value returned is what the position is worth under optimal play by both sides, which makes it a guaranteed floor rather than a prediction of what will happen against a particular opponent.
Ranking
Branching factor 8 throughout. Cheapest first.
Put in order
Why: Perfectly ordered alpha-beta at depth 4 costs about 8 to the power 2, which is 64, making it the cheapest of the four and equal in cost to plain minimax at depth 2 while seeing twice as far. Plain minimax costs 64, then 4096, then 262144. The ordering of the first two is the entire argument for alpha-beta: it buys depth 4 at the price of depth 2.
Warm-up
Predict, then check yourself against the next few slides.
Discussion prompt
Pure minimax searches all the way to the end of the game. Isolation on a 5-by-5 board is small. Could you search it exhaustively?
Hint: How many squares are removed per move, and how long can the game run?
Answer:
Each move removes one square, so a game lasts at most about 25 plies. With a branching factor of roughly 8 early on, a full tree is somewhere near 8 to the power 25, which is astronomically large.
The branching factor does fall as the board shrinks, so the true count is far below that bound, and 5-by-5 Isolation has in fact been solved. But the estimate makes the point: even a tiny board explodes, and the standard board sizes used in the course certainly cannot be searched exhaustively.
That is why every remaining technique in this deck exists. All of them attack the same exponent from different directions.
Section
What to do when you cannot reach the end
Concept
If the search stops before the game ends, the positions where it stopped are not wins or losses, so something has to estimate how good they are.
Evaluation function — A cheap estimate of how favourable a non-terminal position is, standing in for the true minimax value that would be too expensive to compute.
A good evaluation function correlates with the true value, is fast enough to run millions of times, and returns larger numbers for positions better for the maximising player.
It does not need to be accurate in an absolute sense. It only needs to rank positions correctly, because the search only ever compares.
Notation
This is the baseline heuristic for Isolation and it is worth understanding rather than memorising.
Annotate
On: \( \text{eval}(s) = \#\text{my legal moves} - \#\text{opponent legal moves} \)
Improving this function is the usual assignment. The improvements that work tend to weight the opponent's mobility more heavily, or add board-partition detection late in the game.
Comparison
Fill the missing cells. All three are legal; they are not equally useful.
Comparison matrix
| Candidate | Cheap to compute | Correlates with winning |
|---|---|---|
| always return 0 | yes | no, ranks nothing |
| my moves minus opponent moves | yes | reasonably |
| run a full minimax to the end | no, that is the thing we cannot afford | perfectly |
The middle row is the whole design problem: evaluation functions live on a trade-off between accuracy and cost, and the best one is not the most accurate but the most accurate you can afford to run at the depth you want.
Trap
The search looks four plies ahead and the evaluation at that depth is strongly favourable, so the move is good.
Reasoning: deeper search is better and four plies is a reasonable depth, so the estimate is reliable.
A fixed cutoff cannot see disasters that lie one ply beyond it. A position can look excellent at depth four and be lost at depth five, and the search has no way to know.
Worse, the search can learn to hide bad news. Faced with an unavoidable loss just past the horizon, it will happily play pointless delaying moves that push the loss beyond the cutoff, because from inside the horizon the position then looks fine.
This is the horizon effect, and it is a structural consequence of stopping at a fixed depth rather than a bug in any particular evaluation function.
The standard mitigations are to search further along volatile lines rather than stopping mid-exchange, and to use iterative deepening so the depth is set by the clock rather than fixed in advance.
Edge cases
Push it to the edge to see what the search is really contributing.
Discussion prompt
Suppose you had an evaluation function that returned the exact true minimax value of any position. How deep would you then need to search?
Hint: What would you learn from looking at the children?
Answer:
One ply. Evaluate each of your legal moves with the perfect function and take the best. No deeper search would tell you anything you did not already know.
That reframes what search is for: it is compensating for the evaluation function being imperfect. Every ply of search is buying a bit more accuracy from a cheap approximation.
It also explains the engineering trade-off. A slightly better evaluation function that halves your search speed may be a net loss, because you traded a ply of depth for a small gain in accuracy, and the ply may have been worth more.
Sorting
For Isolation specifically. The test is whether it is both cheap and informative.
Sort into buckets
Sort each candidate feature by whether it earns its place.
The removed-squares item is the instructive one. It is cheap and it is real information about the game, and it is still useless, because it does not differ between the two players.
Counterexample
Two engines, identical search code, same time per move.
\[ \text{A: fast, crude eval} \qquad \text{B: accurate eval, 4 times slower} \]
Discussion prompt
B judges positions better. Can A still be the stronger player, and how?
Hint: What does being four times slower cost, measured in plies?
Answer:
Yes, easily. At branching factor 8, a four-times slowdown costs a little over two thirds of a ply of depth once you account for alpha-beta, and in practice engines report losing roughly a ply for a slowdown of that size.
A ply of extra depth is usually worth more than a modest improvement in evaluation accuracy, because the extra ply resolves tactics concretely while the better evaluation only guesses better.
This is why evaluation functions in real engines are written to be brutally cheap. The right question is never is this feature informative, it is is this feature worth the depth it costs, and that is an empirical question you settle by playing the two versions against each other.
Section
Getting the same answer for far less work
Concept
Alpha-beta is not an approximation. It returns exactly the same value as minimax, and it does so by declining to examine branches that provably cannot affect the result.
Alpha — The best value the maximising player is already guaranteed somewhere higher in the tree.
Beta — The best value the minimising player is already guaranteed somewhere higher in the tree.
The rule: while exploring a MIN node, if it is already worth no more than alpha, stop. The maximising player has a better option elsewhere and will never choose this branch, however the unexplored children turn out.
Worked example
The same tree, left to right, tracking what is already guaranteed.
Explore the first MIN node fully.
Why: Its children are 3, 12 and 8, so its value is 3. There was nothing known before it, so nothing could have been pruned here.
\[ \alpha = 3 \quad \text{after the first branch} \]
Move to the second MIN node and look at its first child, which is 2.
Why: This node takes a minimum, so its final value is at most 2. It can only go down from here as more children are examined.
Compare with alpha and stop.
Why: The maximising player already has 3 in hand. This branch can deliver at most 2, so it will never be chosen, and its remaining children cannot change that. They are not evaluated at all.
\[ 2 \le \alpha = 3 \;\Longrightarrow\; \text{prune the remaining children} \]
Explore the third MIN node.
Why: Its children are 14, 5 and 2, giving 2. That is also below alpha, but the cutoff only triggers once a child has been seen that proves it, and here the deciding child is the last one anyway.
Verify: confirm the root value is unchanged.
Why: The root is the maximum of 3, at-most-2 and 2, which is 3, exactly what full minimax returned. Two leaves were never evaluated and the answer is identical, which is the guarantee alpha-beta makes.
Figure (svg): The same game tree with the second and third children of the middle MIN node crossed out and marked as never evaluated, while the root value remains three.
Prediction
Suppose the children of the second MIN node had been ordered 6, 4, 2 instead of 2, 4, 6.
Predict first
What happens to the pruning?
Correct: Nothing is pruned there, because no early child falls at or below alpha
Why: With 6 first the node is at most 6, which is still above alpha of 3, so the search must continue. After 4 it is at most 4, still above 3, so it continues again. Only after the final 2 does the value drop to 3 or below, and by then everything has been examined. The root value is unchanged at 3, because alpha-beta never changes the answer, only the amount of work.
Concept
The previous slide shows the whole story: alpha-beta's savings depend entirely on examining good moves first, because a strong early value raises alpha and makes later cutoffs possible.
\[ \text{worst case } O(b^{\,d}), \qquad \text{best case } O\!\left(b^{\,d/2}\right) \]
In the best case the exponent halves, which means that in the same time budget you can search roughly twice as deep. Doubling depth is an enormous gain in playing strength.
You cannot know the best order in advance, which is the obvious objection. The standard answer is to search shallowly first and use what you learn to order the deeper search, which is what iterative deepening does.
Concept
Rather than choosing a depth in advance, search to depth one, then depth two, then depth three, until the clock runs out, and play the best move from the deepest completed search.
The last point is the one that surprises people. With a branching factor of 8, everything shallower than the final level adds only about a seventh again on top of it, so re-searching is close to free.
Estimation
Branching factor 8. You search depth 1, then 2, then 3, then 4, keeping every pass.
Predict first
Roughly how much extra work is that compared with searching depth 4 directly?
Correct: Roughly a seventh extra
Why: The nodes form a geometric series dominated by its last term. Depths 1 through 3 total 8 plus 64 plus 512, which is 584, against 4096 at depth 4 alone, so the earlier passes add about fourteen percent. That overhead is much smaller than the pruning improvement the move ordering buys, which is why iterative deepening is standard rather than a compromise.
Check
Solve it on paper before you click.
Check your understanding
Which statement about alpha-beta pruning is correct?
Answer: B
Why: Alpha-beta is exact. It skips only branches that provably cannot change the root value, so its result is identical to full minimax while touching fewer nodes. How many fewer depends on move ordering, which ranges from no saving at all to halving the effective exponent.
Invariant
Step through the tree from Part 2 left to right, tracking the best value the maximiser has secured so far.
Step through it
At which step does alpha first become large enough to prune something?
Alpha only ever rises and beta only ever falls. That monotonicity is what makes the cutoff argument sound, and it is worth checking in any trace you produce.
Faded example
Fill in the comparison and the consequence.
Fill in the blanks
\textis less than or equal to \;stop and return, skipping the remaining children\; \alpha, \text___ ___
Why: A MIN node's value can only fall as more children are examined, so once it is already no better than what the maximiser has secured elsewhere, no remaining child can rescue it. The maximiser will never choose this branch, so the rest of it is irrelevant to the root value and can be skipped entirely.
Concept
One more standard technique, included here because it is the same idea as the symmetry reduction wearing different clothes.
Transposition — Two different sequences of moves that arrive at exactly the same position. The subtree below them is identical, so searching both is duplicated work.
A transposition table stores positions already searched along with their values, so the second arrival is a lookup rather than a search. In games where move order is flexible this can save a large fraction of the tree.
Notice the shape: identify states that are genuinely the same, keep one representative, and reuse the result. That is precisely what orbits did for the opening moves, applied to a different equivalence.
Trade off
Fill the missing cells. These stack, and each one attacks the exponent differently.
Comparison matrix
| Technique | What it saves | What it costs |
|---|---|---|
| symmetry reduction | duplicate subtrees at the root | code to canonicalise positions |
| alpha-beta | branches that cannot change the answer | nothing, the answer is exact |
| transposition table | re-searching repeated positions | memory, plus hashing every position |
| depth limit plus evaluation | the entire tail of the game | accuracy, and the horizon effect |
Only the last row trades away correctness. The first three are pure savings, which is why they are applied first and unconditionally.
Section
How to stop losing hours to a glossed-over paragraph
Concept
It is worth naming the failure precisely, because the fix follows from the diagnosis rather than from studying harder.
The lecture asserted a result, that 25 becomes 6, without naming the structure that produces it. You could see the result was true, could not see why, and reconstructed the argument yourself over several hours.
The reconstruction was correct and the time was mostly wasted, because the missing piece was a name. Once you know the words orbit and Burnside's lemma, the same result is a two-minute check.
So the skill to build is not more reconstruction. It is recognising the moment a source has asserted a result without naming its machinery, and going and finding the name.
Discrimination
Not every unexplained step deserves an hour. Sorting them is the time-management skill.
Sort into buckets
Sort each kind of gap by what it deserves.
Pattern
A pass structure that suits how you said you learn, which is by writing things out and drawing them.
The fourth step is where the leverage is. You solved the 5-by-5 case, which is hard. The 3-by-3 case has the same structure, is small enough to enumerate completely, and would have taken minutes.
Explain it
A classmate spent four hours on a constraint satisfaction lecture and still cannot state the main result.
Discussion prompt
They tell you the lecture said many assignments are equivalent so we only consider one of each. What should they go and look up, and what small example should they build?
Hint: You have already met this exact shape once in this deck.
Answer:
It is the same pattern as the Isolation reduction: a claim of equivalence with no criterion given. The name to look up is symmetry breaking in constraint satisfaction, and underneath it is the same idea of orbits under a group action.
The small example: a map-colouring problem with three regions and three colours. Every colouring can be recoloured by permuting the colour names, so the assignments come in orbits of size six under the six permutations, and you can enumerate the whole thing on one page.
Four hours became one lookup and one small drawing. The transferable move is noticing that any lecture saying we only consider one of each is asserting an equivalence and owes you a criterion.
Estimation
You are working full time and taking one 3-credit course. Assume roughly nine hours a week of study is realistic.
Predict first
Given the five-pass reading method, where should the largest single block of that time go?
Correct: The fourth pass, working the marked names on small examples
Why: Passes one through three are fast by design and exist only to produce a short, sorted list. The fourth pass is where understanding is actually built, and it is the one that replaces the hours you were losing to unguided reconstruction. Rewatching is the worst use of the time, because the gloss that lost you the first time is still there on the second viewing.
Connect it up
One page, built the way you said you learn best, on paper.
Draw it
Draw the 5-by-5 board and colour the six orbits. Beside it write the eight symmetries and, for each, how many cells it fixes, then the Burnside sum and the division by eight. Underneath, draw the nine-leaf minimax tree with its backed-up values, and mark the two leaves alpha-beta prunes. In the margin write the three questions this session did not answer for you. Bring the page and the questions to the next session.
The margin questions are the agenda for next time. They are the highest-value thing you can bring, because they are the gaps you found rather than the ones I guessed at.
Exit ticket
The transferable idea, rather than the specific count.
Predict first
A lecture says two configurations are equivalent and we only search one of them. What is the lecture obliged to have told you, and what should you go and find if it did not?
Correct: The criterion for equivalence, which means naming the symmetry group acting on the states
Why: Equivalence is never self-evident. It is always relative to some set of transformations you are allowed to apply, and until that set is named, you cannot count the classes or check your count. Once the group is named, the orbits are well defined and Burnside's lemma gives you an independent verification. That is the whole lesson of Part 1, and it generalises well past game playing.
Recap
Six things, and one habit.
| when a source says | the name to go and find |
|---|---|
| these configurations are equivalent | group action, orbits, Burnside's lemma |
| we search only one of each | symmetry breaking, canonical forms |
| we stop early and estimate | evaluation function, horizon effect |
| this branch cannot matter | alpha-beta pruning |
| we search deeper as time allows | iterative deepening |
The habit: when a lecture asserts a result without naming the machinery, that is a missing name rather than a missing minute. Find the name before rebuilding the argument, and build your example small enough to enumerate completely.
Georgia Tech CS 6601, Artificial Intelligence — Game Playing and the Isolation assignment Game Playing — The assignment this material supports.
Want this taught 1-on-1? Alexander tutors Artificial Intelligence — $55/session, free consultation.