# Visualizing A\* Search: Pathfinding Through Heuristic Guidance

> A single grid instance, carried from the statement of the pathfinding problem to a complete run of A\* search. The lecture separates the two costs that meet at a cell: the measured cost of the route traced so far, and an estimate of the cost still remaining. It then runs Dijkstra's algorithm on that grid, watching its frontier grow as a diamond that spends as much effort behind the start as ahead of it; builds the Manhattan estimate and shows why it never overshoots the true remaining cost; and finally expands by least f, following one comparison in the priority queue before the search runs to the goal. The two searches finish side by side on identical mazes, returning routes of identical cost after very different amounts of work.

- Canonical watch page: [Visualizing A\* Search: Pathfinding Through Heuristic Guidance](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance)
- Publisher: [Academa, Inc.](https://academa.ai)
- Subject: Computer Science
- Published: 2026-09-08T15:44:52.082Z
- Updated: 2026-09-08T15:44:52.082Z
- Duration: PT639S (10 minutes 39 seconds)
- Chapters: 4
- Views: 11
- Language: en-US
- Access: Free
- Video stream: [HLS content](https://academa.ai/media/l/01M20SKMMFZ3B2ZPP93PGBNY5D/0/dark/master.m3u8)
- Embed: [Player](https://academa.ai/embed/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance)
- Audiovisual record: [Semantic JSON](https://academa.ai/media/l/01M20SKMMFZ3B2ZPP93PGBNY5D/0/semantic.json)
- Thumbnail: [Image](https://academa.ai/media/l/01M20SKMMFZ3B2ZPP93PGBNY5D/0/dark/poster.jpg)

## Description

A\* search on one grid: g, h and f unpacked, an uninformed frontier flooding the maze, and an informed one steering to the goal.

## Chapters

- [00:00–02:31.435 · The Problem and the Two Costs](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=0)
- [02:31.435–04:42.404 · Searching Without a Compass](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.43533333333335)
- [04:42.404–07:8.03 · The Estimate of What Remains](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.4040625)
- [07:8.03–10:39 · The Informed Frontier](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.0296041666667)

## Transcript

### [00:00 · The Problem and the Two Costs](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=0)

Pathfinding is a search problem, and it is worth stating precisely before we solve it. We are given a graph, a start vertex, a goal vertex, and a cost on every edge, and we want a route of least total cost. Underneath it lies a second question: how much of the graph must an algorithm examine before it can commit to an answer? Here is an instance. Each cell of this grid is a vertex; each cell is joined to its neighbours above, below, left and right; and the shaded cells are walls, which no route may enter. One step from a cell to a neighbour costs one unit, so the cost of a route is the number of steps in it. This cell is the start. This one is the goal. A search algorithm answers one question repeatedly: of the cells it has reached but not yet examined, which should it examine next? Every algorithm in this lecture answers by attaching a single number to each candidate and taking the smallest. So consider one candidate. Take this cell, and call it n. Two different costs meet at n. One of them lies behind it. From S, the search has traced a route to n, one step at a time, and that route has a cost of five steps. That measured number is g of n. The other lies ahead of it. From n, some cost remains before G is reached, and the search cannot know it, because it has not been there. So it estimates. This dashed figure is the estimate: four cells across, one cell up, five in total. That number is h of n. Keep the distinction. g is known, because those steps have been taken. h is a guess about ground the search has not covered. A star search adds them. f of n is g of n plus h of n: the cost committed, plus the cost estimated. It is the algorithm's estimate of the total cost of the best route through n. Here that is five plus five, which is ten. And the rule of the algorithm is exactly this: always examine the reached cell whose f is smallest. Two numbers and one sum. What follows takes them apart: a search that uses g and nothing else, then the estimate h on its own, and then the two together.

### [02:31.435 · Searching Without a Compass](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.43533333333335)

Start with a search that has no information about where the goal is. Dijkstra's algorithm keeps, for every cell it has reached, the cheapest known cost of reaching it, and it always expands the reached cell whose cost is smallest. When every step costs the same, that is the order breadth-first search uses as well. Look at which quantity that rule uses. It uses g, the cost already accumulated, and nothing else. No term in it mentions the goal, so nothing in it can prefer one direction over another. So it grows in every direction at once. Watch the shading: its leading edge is the frontier, the boundary between cells already expanded and cells not yet reached. Stop it here. The outlined cells are the frontier at this instant: expanded cells behind them, unreached cells in front. The frontier is a diamond rather than a circle, because distance is counted in horizontal and vertical steps. And it spreads behind the start as readily as ahead of it. Let the wave run on, and half of that work is going away from G. Keep going. The expansion folds around the walls and continues, filling cells that no shortest route to G could use. The goal is reached last, because it is far from the start and the search had no reason to hurry towards it. The route returned is a shortest one: ten steps. That optimality is not negotiable. Whatever we add to make the search look in the right direction must still return a route of least cost. Now count the work. Before the goal came off the queue, every cell strictly closer to the start than the goal is had already been expanded. That is this many, out of the sixty-seven cells of this grid that are not walls. That is not a defect of the implementation; it follows from the rule. g measures the past, and a search that ranks candidates by the past alone cannot tell a promising direction from a hopeless one. What is missing is a term that looks forward.

### [04:42.404 · The Estimate of What Remains](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.4040625)

The missing term is an estimate of the cost that remains. For every cell we want a number saying, without any searching, roughly how far the goal still is. Here is the estimate this lecture uses. Ignore the walls completely. Count the horizontal separation between the cell and the goal, count the vertical separation, and add the two. That is the Manhattan distance. Take this cell. It is seven columns and two rows from the goal, so the estimate is nine. Move the cell and the number follows. Here it is six. Nearer the goal, it is two. And computing it costs two subtractions and an addition: no search, no queue, no walls consulted. The estimate ignores walls, and that has a consequence worth seeing. Move the cell here. The estimate is six: four columns across and two rows down. But look where the dashed figure runs. It goes straight through this wall, and no route can follow it. The true remaining cost is eight, not six. A route has to come down to this row, pass the barrier, and climb back up to G. So the estimate falls short of the truth, and that is precisely the property we want. An estimate that never exceeds the true remaining cost is called admissible. The Manhattan estimate is admissible on this grid, because any route must make at least the horizontal steps and at least the vertical steps that separate the cell from the goal, and walls can only force it to make more. Admissibility is what will let us keep the optimality that Dijkstra's algorithm gave us. Now put both costs together at this cell. The cheapest route the search can trace from S to it costs six steps, so g is six. The estimate ahead is six as well, so f is twelve. Notice that twelve is not the true cost of the best route through this cell. In green and yellow together, that route is fourteen steps. Twelve is a lower bound on it, and a lower bound is all we need: twelve already exceeds ten, and a ten-step route exists. So this cell can be discarded without ever being expanded. That is the mechanism: g rules out nothing, h rules out nothing, and their sum rules out most of the maze.

### [07:8.03 · The Informed Frontier](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.0296041666667)

Now the two terms together. One change to the rule: instead of expanding the reached cell of least g, A star search expands the reached cell of least f, where f is g plus h. Expand S. Its four neighbours become reached cells, each with g equal to one, and each is given an f. Those four are the queue. The four share the same g, so g cannot separate them. Their estimates differ. The neighbour towards the goal is seven from it by the estimate; the other three are nine, because a step in the wrong direction adds one instead of removing one. Add the columns and f follows: eight for the neighbour in the direction of the goal, ten for the other three. The smallest f wins, so the search steps that way. Repeat the comparison. The next three choices come out the same way, so the search runs straight along this row, and f stays at eight all the way. Then the row runs into the wall. The cell straight ahead is blocked, so there is nowhere to continue, and every reached cell now has an f of ten. The estimate of eight was optimistic, and the search has just discovered why. Many cells now tie at ten, and f alone cannot choose among them. This implementation prefers the smaller estimate, which keeps it moving towards G; a different tie-break would examine a wider band. What no tie-break can do is examine a cell of larger f before one of smaller f. So it turns the corner and carries on: ten, ten, ten. Then G comes off the queue with f equal to ten, which is its g plus nothing, since the estimate at the goal is zero. Eleven cells expanded. The route returned is the same ten-step route, and it is optimal, for the reason we established: the estimate never overshoots, so no unexpanded cell could have hidden anything cheaper. The queue was not empty when it stopped. These cells were reached and given an f, and then never expanded, because their f exceeded ten. Reaching a cell is cheap; expanding it is the work. Put the two searches side by side, on the same maze, with the same walls, both returning a route of cost ten. The counts are on the board. The larger belongs to the search that ranked by g alone; the smaller belongs to the search that added an estimate of what remained. Same route, a fraction of the work. Three points to take away. First, the two terms measure different things: g is a measured cost over ground the search has covered, h is an estimate over ground it has not, and f is the only quantity the algorithm ever compares. Second, the estimate must never exceed the true remaining cost. That is admissibility, and it is what keeps the returned route optimal. An estimate that overshoots can make the search settle for a route that is not shortest. Third, the quality of the estimate is the quality of the search. Set h to zero and f becomes g, and the algorithm is Dijkstra's again, expanding in every direction. Sharpen h towards the true remaining cost and the expanded region contracts towards the route itself. The equation is one addition. What it changes is the set of cells the algorithm never has to look at.

## About Academa, Inc.

Academa makes technical knowledge easier to understand through visual lectures and lets learners request new lecture videos on the topics they need.

## Complete audiovisual record

Immutable source: [semantic.json](https://academa.ai/media/l/01M20SKMMFZ3B2ZPP93PGBNY5D/0/semantic.json)

Record version: 1. Render attempt: 0.

### How to read this timeline

Each scene owns its object identifiers. A beat's board is the complete board when listed, empty when marked empty, and unchanged from the nearest earlier listed board in the same scene when marked unchanged. Action times are absolute positions in the published video.

### Scene 1: [The Problem and the Two Costs](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=0)

Span: 00:00–02:31.435 (0s–151.43533333333335s).

#### Objects

- cell\_mark: a Math \[text\] that says "$n$" drawn in grid
- cost\_line: a Math \[text\] that says "$g(n) = 5$"
- estimate\_line: a Math \[text\] that says "$h(n) = 5$"
- goal\_mark: a Math \[text\] that says "$G$" drawn in grid
- grid: a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0))
- lattice: a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0)
- leg\_across: a Line \[magenta\] drawn in grid (start=(5.5, 2.5), end=(9.5, 2.5), dashed=True)
- leg\_up: a Line \[magenta\] drawn in grid (start=(9.5, 2.5), end=(9.5, 3.5), dashed=True)
- point: a Point \[yellow\] drawn in grid (location=(2.5, 3.5))
- point\_2: a Point \[yellow\] drawn in grid (location=(0.5, 3.5))
- point\_3: a Point \[yellow\] drawn in grid (location=(1.5, 4.5))
- point\_4: a Point \[yellow\] drawn in grid (location=(1.5, 2.5))
- polygon: a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85)
- polygon\_10: a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85)
- polygon\_11: a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7)
- polygon\_12: a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7)
- polygon\_13: a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.55)
- polygon\_2: a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85)
- polygon\_3: a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85)
- polygon\_4: a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85)
- polygon\_5: a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85)
- polygon\_6: a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85)
- polygon\_7: a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85)
- polygon\_8: a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85)
- polygon\_9: a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85)
- question: a Panel that says "Unit-cost steps on a grid. Which cells must a search examine before it can return a shortest route from $S$ to $G$?"
- start\_mark: a Math \[text\] that says "$S$" drawn in grid
- total\_line: a Math \[text\] that says "$f(n) = g(n) + h(n)$"
- traced: a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(2.5, 3.5))
- traced\_2: a Line \[green\] drawn in grid (start=(2.5, 3.5), end=(3.5, 3.5))
- traced\_3: a Line \[green\] drawn in grid (start=(3.5, 3.5), end=(4.5, 3.5))
- traced\_4: a Line \[green\] drawn in grid (start=(4.5, 3.5), end=(5.5, 3.5))
- traced\_5: a Line \[green\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5))

#### Beats

##### [00:00](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=0)

Narration: Pathfinding is a search problem, and it is worth stating precisely before we solve it. We are given a graph, a start vertex, a goal vertex, and a cost on every edge, and we want a route of least total cost. Underneath it lies a second question: how much of the graph must an algorithm examine before it can commit to an answer?

Board: Empty.

Actions:
- [00:00](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=0): question is shown on the screen, written out.
- [00:21.363](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=21.3625): question moves to a new place on the board.

##### [00:21.963](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=21.962500000000002)

Narration: Here is an instance. Each cell of this grid is a vertex; each cell is joined to its neighbours above, below, left and right; and the shaded cells are walls, which no route may enter.

Board: question — a Panel that says "Unit-cost steps on a grid. Which cells must a search examine before it can return a shortest route from $S$ to $G$?"

Actions:
- [00:21.963](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=21.962500000000002): grid is shown on the screen, written out.
- [00:21.963](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=21.962500000000002): lattice is shown on the screen, written out.
- [00:32.864](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=32.864): polygon is shown on the screen, written out.
- [00:32.92](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=32.91983025780556): polygon\_2 is shown on the screen, written out.
- [00:32.976](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=32.975660515611104): polygon\_3 is shown on the screen, written out.
- [00:33.031](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=33.031490773416664): polygon\_4 is shown on the screen, written out.
- [00:33.087](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=33.08732103122222): polygon\_5 is shown on the screen, written out.
- [00:33.143](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=33.14315128902777): polygon\_6 is shown on the screen, written out.
- [00:33.199](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=33.19898154683333): polygon\_7 is shown on the screen, written out.
- [00:33.255](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=33.254811804638884): polygon\_8 is shown on the screen, written out.
- [00:33.311](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=33.31064206244444): polygon\_9 is shown on the screen, written out.
- [00:33.366](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=33.36647232025): polygon\_10 is shown on the screen, written out.

##### [00:36.041](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=36.0415)

Narration: One step from a cell to a neighbour costs one unit, so the cost of a route is the number of steps in it. This cell is the start. This one is the goal.

Board: question — a Panel that says "Unit-cost steps on a grid. Which cells must a search examine before it can return a shortest route from $S$ to $G$?"; grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85)

Actions:
- [00:43.193](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=43.19299999999999): polygon\_11 is shown on the screen, written out.
- [00:43.193](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=43.19299999999999): start\_mark is shown on the screen, written out.
- [00:45.202](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=45.20199999999999): polygon\_12 is shown on the screen, written out.
- [00:45.202](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=45.20199999999999): goal\_mark is shown on the screen, written out.

##### [00:46.742](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=46.742)

Narration: A search algorithm answers one question repeatedly: of the cells it has reached but not yet examined, which should it examine next? Every algorithm in this lecture answers by attaching a single number to each candidate and taking the smallest.

Board: question — a Panel that says "Unit-cost steps on a grid. Which cells must a search examine before it can return a shortest route from $S$ to $G$?"; grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid

Actions:
- [00:52.152](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=52.152): point is shown on the screen, grown.
- [00:52.152](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=52.152): point\_2 is shown on the screen, grown.
- [00:52.152](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=52.152): point\_3 is shown on the screen, grown.
- [00:52.152](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=52.152): point\_4 is shown on the screen, grown.
- [00:54.331](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=54.33079961215255): point is hidden from the screen.
- [00:54.331](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=54.33079961215255): point\_2 is hidden from the screen.
- [00:54.331](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=54.33079961215255): point\_3 is hidden from the screen.
- [00:54.331](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=54.33079961215255): point\_4 is hidden from the screen.

##### [01:3.271](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=63.271)

Narration: So consider one candidate. Take this cell, and call it n. Two different costs meet at n.

Board: Unchanged from the preceding beat in this scene.

Actions:
- [01:6.058](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=66.05799999999999): polygon\_13 is shown on the screen, written out.
- [01:6.058](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=66.05799999999999): cell\_mark is shown on the screen, written out.

##### [01:11.918](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=71.9175)

Narration: One of them lies behind it. From S, the search has traced a route to n, one step at a time, and that route has a cost of five steps. That measured number is g of n.

Board: question — a Panel that says "Unit-cost steps on a grid. Which cells must a search examine before it can return a shortest route from $S$ to $G$?"; grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.55); cell\_mark — a Math \[text\] that says "$n$" drawn in grid

Actions:
- [01:16.004](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=76.004): traced is shown on the screen, written out.
- [01:16.22](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=76.21999336659995): traced\_2 is shown on the screen, written out.
- [01:16.432](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=76.43175883706338): traced\_3 is shown on the screen, written out.
- [01:16.597](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=76.59725925538591): traced\_4 is shown on the screen, written out.
- [01:16.802](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=76.80228383183437): traced\_5 is shown on the screen, written out.
- [01:22.459](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=82.459): grid moves to a new place on the board.
- [01:22.459](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=82.459): cost\_line is shown on the screen, written out.

##### [01:25.102](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=85.102)

Narration: The other lies ahead of it. From n, some cost remains before G is reached, and the search cannot know it, because it has not been there. So it estimates. This dashed figure is the estimate: four cells across, one cell up, five in total. That number is h of n.

Board: question — a Panel that says "Unit-cost steps on a grid. Which cells must a search examine before it can return a shortest route from $S$ to $G$?"; grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; cost\_line — a Math \[text\] that says "$g(n) = 5$"; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.55); cell\_mark — a Math \[text\] that says "$n$" drawn in grid; traced — a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(2.5, 3.5)); traced\_2 — a Line \[green\] drawn in grid (start=(2.5, 3.5), end=(3.5, 3.5)); traced\_3 — a Line \[green\] drawn in grid (start=(3.5, 3.5), end=(4.5, 3.5)); traced\_4 — a Line \[green\] drawn in grid (start=(4.5, 3.5), end=(5.5, 3.5)); traced\_5 — a Line \[green\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5))

Actions:
- [01:35.888](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=95.888): leg\_across is shown on the screen, written out.
- [01:35.888](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=95.888): leg\_up is shown on the screen, written out.
- [01:40.776](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=100.77600000000001): estimate\_line is shown on the screen, written out.

##### [01:44.505](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=104.50450000000001)

Narration: Keep the distinction. g is known, because those steps have been taken. h is a guess about ground the search has not covered.

Board: question — a Panel that says "Unit-cost steps on a grid. Which cells must a search examine before it can return a shortest route from $S$ to $G$?"; grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; cost\_line — a Math \[text\] that says "$g(n) = 5$"; estimate\_line — a Math \[text\] that says "$h(n) = 5$"; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.55); cell\_mark — a Math \[text\] that says "$n$" drawn in grid; traced — a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(2.5, 3.5)); traced\_2 — a Line \[green\] drawn in grid (start=(2.5, 3.5), end=(3.5, 3.5)); traced\_3 — a Line \[green\] drawn in grid (start=(3.5, 3.5), end=(4.5, 3.5)); traced\_4 — a Line \[green\] drawn in grid (start=(4.5, 3.5), end=(5.5, 3.5)); traced\_5 — a Line \[green\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5)); leg\_across — a Line \[magenta\] drawn in grid (start=(5.5, 2.5), end=(9.5, 2.5), dashed=True); leg\_up — a Line \[magenta\] drawn in grid (start=(9.5, 2.5), end=(9.5, 3.5), dashed=True)

Actions:
- [01:46.89](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=106.89): cost\_line is emphasized.
- [01:50.106](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=110.10600000000001): cost\_line is no longer emphasized.
- [01:50.106](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=110.10600000000001): estimate\_line is emphasized.
- [01:52.591](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=112.59100000000001): estimate\_line is no longer emphasized.

##### [01:53.191](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=113.191)

Narration: A star search adds them. f of n is g of n plus h of n: the cost committed, plus the cost estimated. It is the algorithm's estimate of the total cost of the best route through n.

Board: Unchanged from the preceding beat in this scene.

Actions:
- [01:54.306](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=114.306): total\_line is shown on the screen, written out.
- [01:59.855](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=119.855): total\_line (the "g(n)" part) is emphasized.
- [02:1.503](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=121.503): total\_line (the "g(n)" part) is no longer emphasized.
- [02:1.503](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=121.503): total\_line (the "h(n)" part) is emphasized.
- [02:7.483](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=127.4825): total\_line (the "h(n)" part) is no longer emphasized.

##### [02:8.083](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=128.0825)

Narration: Here that is five plus five, which is ten. And the rule of the algorithm is exactly this: always examine the reached cell whose f is smallest.

Board: question — a Panel that says "Unit-cost steps on a grid. Which cells must a search examine before it can return a shortest route from $S$ to $G$?"; grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; cost\_line — a Math \[text\] that says "$g(n) = 5$"; estimate\_line — a Math \[text\] that says "$h(n) = 5$"; total\_line — a Math \[text\] that says "$f(n) = g(n) + h(n)$"; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.55); cell\_mark — a Math \[text\] that says "$n$" drawn in grid; traced — a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(2.5, 3.5)); traced\_2 — a Line \[green\] drawn in grid (start=(2.5, 3.5), end=(3.5, 3.5)); traced\_3 — a Line \[green\] drawn in grid (start=(3.5, 3.5), end=(4.5, 3.5)); traced\_4 — a Line \[green\] drawn in grid (start=(4.5, 3.5), end=(5.5, 3.5)); traced\_5 — a Line \[green\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5)); leg\_across — a Line \[magenta\] drawn in grid (start=(5.5, 2.5), end=(9.5, 2.5), dashed=True); leg\_up — a Line \[magenta\] drawn in grid (start=(9.5, 2.5), end=(9.5, 3.5), dashed=True)

Actions:
- [02:9.29](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=129.29000000000002): total\_line becomes "$f(n) = g(n) + h(n) = 5 + 5 = 10$".
- [02:17.719](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=137.719): A box is drawn around total\_line.

##### [02:19.364](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=139.36350000000002)

Narration: Two numbers and one sum. What follows takes them apart: a search that uses g and nothing else, then the estimate h on its own, and then the two together.

Board: Unchanged from the preceding beat in this scene.

Actions:
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): cost\_line is hidden from the screen — left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): estimate\_line is hidden from the screen — left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): grid is hidden from the screen — left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): lattice is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): polygon is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): polygon\_2 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): polygon\_3 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): polygon\_4 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): polygon\_5 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): polygon\_6 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): polygon\_7 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): polygon\_8 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): polygon\_9 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): polygon\_10 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): polygon\_11 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): start\_mark is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): polygon\_12 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): goal\_mark is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): polygon\_13 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): cell\_mark is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): traced is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): traced\_2 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): traced\_3 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): traced\_4 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): traced\_5 is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): leg\_across is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): leg\_up is hidden from the screen — grid left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): question is hidden from the screen — left the board.
- [02:30.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=150.39366666666672): total\_line is hidden from the screen — left the board.

### Scene 2: [Searching Without a Compass](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.43533333333335)

Span: 02:31.435–04:42.404 (151.43533333333335s–282.4040625s).

#### Objects

- closing: a Heading that says "The Cost of Having No Direction"
- count: a Math \[text\] that says "$upright("expanded") = 49$"
- goal\_mark: a Math \[text\] that says "$G$" drawn in grid
- grid: a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0))
- heading: a Heading that says "Ranking by Cost So Far"
- lattice: a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0)
- polygon: a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85)
- polygon\_10: a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85)
- polygon\_11: a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7)
- polygon\_12: a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7)
- polygon\_13: a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4)
- polygon\_14: a Polygon \[blue\] drawn in grid (vertices=((0.08, 3.08), (0.92, 3.08), (0.92, 3.92), (0.08, 3.92)), fill\_opacity=0.4)
- polygon\_15: a Polygon \[blue\] drawn in grid (vertices=((1.08, 4.08), (1.92, 4.08), (1.92, 4.92), (1.08, 4.92)), fill\_opacity=0.4)
- polygon\_16: a Polygon \[blue\] drawn in grid (vertices=((1.08, 2.08), (1.92, 2.08), (1.92, 2.92), (1.08, 2.92)), fill\_opacity=0.4)
- polygon\_17: a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4)
- polygon\_18: a Polygon \[blue\] drawn in grid (vertices=((2.08, 4.08), (2.92, 4.08), (2.92, 4.92), (2.08, 4.92)), fill\_opacity=0.4)
- polygon\_19: a Polygon \[blue\] drawn in grid (vertices=((2.08, 2.08), (2.92, 2.08), (2.92, 2.92), (2.08, 2.92)), fill\_opacity=0.4)
- polygon\_2: a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85)
- polygon\_20: a Polygon \[blue\] drawn in grid (vertices=((0.08, 4.08), (0.92, 4.08), (0.92, 4.92), (0.08, 4.92)), fill\_opacity=0.4)
- polygon\_21: a Polygon \[blue\] drawn in grid (vertices=((0.08, 2.08), (0.92, 2.08), (0.92, 2.92), (0.08, 2.92)), fill\_opacity=0.4)
- polygon\_22: a Polygon \[blue\] drawn in grid (vertices=((1.08, 5.08), (1.92, 5.08), (1.92, 5.92), (1.08, 5.92)), fill\_opacity=0.4)
- polygon\_23: a Polygon \[blue\] drawn in grid (vertices=((1.08, 1.08), (1.92, 1.08), (1.92, 1.92), (1.08, 1.92)), fill\_opacity=0.4)
- polygon\_24: a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4)
- polygon\_25: a Polygon \[blue\] drawn in grid (vertices=((3.08, 4.08), (3.92, 4.08), (3.92, 4.92), (3.08, 4.92)), fill\_opacity=0.4)
- polygon\_26: a Polygon \[blue\] drawn in grid (vertices=((3.08, 2.08), (3.92, 2.08), (3.92, 2.92), (3.08, 2.92)), fill\_opacity=0.4)
- polygon\_27: a Polygon \[blue\] drawn in grid (vertices=((2.08, 5.08), (2.92, 5.08), (2.92, 5.92), (2.08, 5.92)), fill\_opacity=0.4)
- polygon\_28: a Polygon \[blue\] drawn in grid (vertices=((2.08, 1.08), (2.92, 1.08), (2.92, 1.92), (2.08, 1.92)), fill\_opacity=0.4)
- polygon\_29: a Polygon \[blue\] drawn in grid (vertices=((0.08, 5.08), (0.92, 5.08), (0.92, 5.92), (0.08, 5.92)), fill\_opacity=0.4)
- polygon\_3: a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85)
- polygon\_30: a Polygon \[blue\] drawn in grid (vertices=((0.08, 1.08), (0.92, 1.08), (0.92, 1.92), (0.08, 1.92)), fill\_opacity=0.4)
- polygon\_31: a Polygon \[blue\] drawn in grid (vertices=((1.08, 6.08), (1.92, 6.08), (1.92, 6.92), (1.08, 6.92)), fill\_opacity=0.4)
- polygon\_32: a Polygon \[blue\] drawn in grid (vertices=((1.08, 0.08), (1.92, 0.08), (1.92, 0.92), (1.08, 0.92)), fill\_opacity=0.4)
- polygon\_33: a Polygon \[yellow\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.55)
- polygon\_34: a Polygon \[yellow\] drawn in grid (vertices=((4.08, 4.08), (4.92, 4.08), (4.92, 4.92), (4.08, 4.92)), fill\_opacity=0.55)
- polygon\_35: a Polygon \[yellow\] drawn in grid (vertices=((4.08, 2.08), (4.92, 2.08), (4.92, 2.92), (4.08, 2.92)), fill\_opacity=0.55)
- polygon\_36: a Polygon \[yellow\] drawn in grid (vertices=((3.08, 1.08), (3.92, 1.08), (3.92, 1.92), (3.08, 1.92)), fill\_opacity=0.55)
- polygon\_37: a Polygon \[yellow\] drawn in grid (vertices=((2.08, 6.08), (2.92, 6.08), (2.92, 6.92), (2.08, 6.92)), fill\_opacity=0.55)
- polygon\_38: a Polygon \[yellow\] drawn in grid (vertices=((2.08, 0.08), (2.92, 0.08), (2.92, 0.92), (2.08, 0.92)), fill\_opacity=0.55)
- polygon\_39: a Polygon \[yellow\] drawn in grid (vertices=((0.08, 6.08), (0.92, 6.08), (0.92, 6.92), (0.08, 6.92)), fill\_opacity=0.55)
- polygon\_4: a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85)
- polygon\_40: a Polygon \[yellow\] drawn in grid (vertices=((0.08, 0.08), (0.92, 0.08), (0.92, 0.92), (0.08, 0.92)), fill\_opacity=0.55)
- polygon\_41: a Polygon \[blue\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4)
- polygon\_42: a Polygon \[blue\] drawn in grid (vertices=((4.08, 4.08), (4.92, 4.08), (4.92, 4.92), (4.08, 4.92)), fill\_opacity=0.4)
- polygon\_43: a Polygon \[blue\] drawn in grid (vertices=((4.08, 2.08), (4.92, 2.08), (4.92, 2.92), (4.08, 2.92)), fill\_opacity=0.4)
- polygon\_44: a Polygon \[blue\] drawn in grid (vertices=((3.08, 1.08), (3.92, 1.08), (3.92, 1.92), (3.08, 1.92)), fill\_opacity=0.4)
- polygon\_45: a Polygon \[blue\] drawn in grid (vertices=((2.08, 6.08), (2.92, 6.08), (2.92, 6.92), (2.08, 6.92)), fill\_opacity=0.4)
- polygon\_46: a Polygon \[blue\] drawn in grid (vertices=((2.08, 0.08), (2.92, 0.08), (2.92, 0.92), (2.08, 0.92)), fill\_opacity=0.4)
- polygon\_47: a Polygon \[blue\] drawn in grid (vertices=((0.08, 6.08), (0.92, 6.08), (0.92, 6.92), (0.08, 6.92)), fill\_opacity=0.4)
- polygon\_48: a Polygon \[blue\] drawn in grid (vertices=((0.08, 0.08), (0.92, 0.08), (0.92, 0.92), (0.08, 0.92)), fill\_opacity=0.4)
- polygon\_49: a Polygon \[blue\] drawn in grid (vertices=((5.08, 4.08), (5.92, 4.08), (5.92, 4.92), (5.08, 4.92)), fill\_opacity=0.4)
- polygon\_5: a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85)
- polygon\_50: a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.4)
- polygon\_51: a Polygon \[blue\] drawn in grid (vertices=((4.08, 5.08), (4.92, 5.08), (4.92, 5.92), (4.08, 5.92)), fill\_opacity=0.4)
- polygon\_52: a Polygon \[blue\] drawn in grid (vertices=((3.08, 0.08), (3.92, 0.08), (3.92, 0.92), (3.08, 0.92)), fill\_opacity=0.4)
- polygon\_53: a Polygon \[blue\] drawn in grid (vertices=((5.08, 5.08), (5.92, 5.08), (5.92, 5.92), (5.08, 5.92)), fill\_opacity=0.4)
- polygon\_54: a Polygon \[blue\] drawn in grid (vertices=((6.08, 2.08), (6.92, 2.08), (6.92, 2.92), (6.08, 2.92)), fill\_opacity=0.4)
- polygon\_55: a Polygon \[blue\] drawn in grid (vertices=((5.08, 1.08), (5.92, 1.08), (5.92, 1.92), (5.08, 1.92)), fill\_opacity=0.4)
- polygon\_56: a Polygon \[blue\] drawn in grid (vertices=((4.08, 6.08), (4.92, 6.08), (4.92, 6.92), (4.08, 6.92)), fill\_opacity=0.4)
- polygon\_57: a Polygon \[blue\] drawn in grid (vertices=((5.08, 6.08), (5.92, 6.08), (5.92, 6.92), (5.08, 6.92)), fill\_opacity=0.4)
- polygon\_58: a Polygon \[blue\] drawn in grid (vertices=((7.08, 2.08), (7.92, 2.08), (7.92, 2.92), (7.08, 2.92)), fill\_opacity=0.4)
- polygon\_59: a Polygon \[blue\] drawn in grid (vertices=((6.08, 1.08), (6.92, 1.08), (6.92, 1.92), (6.08, 1.92)), fill\_opacity=0.4)
- polygon\_6: a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85)
- polygon\_60: a Polygon \[blue\] drawn in grid (vertices=((5.08, 0.08), (5.92, 0.08), (5.92, 0.92), (5.08, 0.92)), fill\_opacity=0.4)
- polygon\_61: a Polygon \[blue\] drawn in grid (vertices=((8.08, 2.08), (8.92, 2.08), (8.92, 2.92), (8.08, 2.92)), fill\_opacity=0.4)
- polygon\_62: a Polygon \[blue\] drawn in grid (vertices=((7.08, 3.08), (7.92, 3.08), (7.92, 3.92), (7.08, 3.92)), fill\_opacity=0.4)
- polygon\_63: a Polygon \[blue\] drawn in grid (vertices=((7.08, 1.08), (7.92, 1.08), (7.92, 1.92), (7.08, 1.92)), fill\_opacity=0.4)
- polygon\_64: a Polygon \[blue\] drawn in grid (vertices=((6.08, 0.08), (6.92, 0.08), (6.92, 0.92), (6.08, 0.92)), fill\_opacity=0.4)
- polygon\_65: a Polygon \[blue\] drawn in grid (vertices=((9.08, 2.08), (9.92, 2.08), (9.92, 2.92), (9.08, 2.92)), fill\_opacity=0.4)
- polygon\_66: a Polygon \[blue\] drawn in grid (vertices=((8.08, 3.08), (8.92, 3.08), (8.92, 3.92), (8.08, 3.92)), fill\_opacity=0.4)
- polygon\_67: a Polygon \[blue\] drawn in grid (vertices=((7.08, 4.08), (7.92, 4.08), (7.92, 4.92), (7.08, 4.92)), fill\_opacity=0.4)
- polygon\_68: a Polygon \[blue\] drawn in grid (vertices=((7.08, 0.08), (7.92, 0.08), (7.92, 0.92), (7.08, 0.92)), fill\_opacity=0.4)
- polygon\_7: a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85)
- polygon\_8: a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85)
- polygon\_9: a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85)
- route: a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(2.5, 3.5))
- route\_10: a Line \[green\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5))
- route\_2: a Line \[green\] drawn in grid (start=(2.5, 3.5), end=(3.5, 3.5))
- route\_3: a Line \[green\] drawn in grid (start=(3.5, 3.5), end=(4.5, 3.5))
- route\_4: a Line \[green\] drawn in grid (start=(4.5, 3.5), end=(5.5, 3.5))
- route\_5: a Line \[green\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5))
- route\_6: a Line \[green\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5))
- route\_7: a Line \[green\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5))
- route\_8: a Line \[green\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5))
- route\_9: a Line \[green\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5))
- rule: a Tex \[text\] that says "Expand the reached cell of least $g(n)$."
- start\_mark: a Math \[text\] that says "$S$" drawn in grid
- verdict: a Text \[text\] that says "Ranking by $g$ alone contains no preference for any direction."

#### Beats

##### [02:31.435](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.43533333333335)

Narration: Start with a search that has no information about where the goal is. Dijkstra's algorithm keeps, for every cell it has reached, the cheapest known cost of reaching it, and it always expands the reached cell whose cost is smallest. When every step costs the same, that is the order breadth-first search uses as well.

Board: Empty.

Actions:
- [02:31.435](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.43533333333335): heading is shown on the screen, written out.
- [02:31.435](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.43533333333335): grid is shown on the screen, written out.
- [02:31.435](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.43533333333335): lattice is shown on the screen, written out.
- [02:31.435](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.43533333333335): polygon is shown on the screen, written out.
- [02:31.463](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.46293333333335): polygon\_2 is shown on the screen, written out.
- [02:31.491](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.49102147016012): polygon\_3 is shown on the screen, written out.
- [02:31.52](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.52008588064047): polygon\_4 is shown on the screen, written out.
- [02:31.549](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.54915029112084): polygon\_5 is shown on the screen, written out.
- [02:31.578](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.57821470160118): polygon\_6 is shown on the screen, written out.
- [02:31.607](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.60727911208153): polygon\_7 is shown on the screen, written out.
- [02:31.636](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.63634352256187): polygon\_8 is shown on the screen, written out.
- [02:31.665](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.66540793304222): polygon\_9 is shown on the screen, written out.
- [02:31.694](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=151.69447234352256): polygon\_10 is shown on the screen, written out.
- [02:34.337](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=154.33733333333333): polygon\_11 is shown on the screen, written out.
- [02:34.337](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=154.33733333333333): start\_mark is shown on the screen, written out.
- [02:34.337](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=154.33733333333333): polygon\_12 is shown on the screen, written out.
- [02:34.337](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=154.33733333333333): goal\_mark is shown on the screen, written out.
- [02:44.751](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=164.75133333333335): rule is shown on the screen, written out.

##### [02:51.888](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=171.88783333333333)

Narration: Look at which quantity that rule uses. It uses g, the cost already accumulated, and nothing else. No term in it mentions the goal, so nothing in it can prefer one direction over another.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule — a Tex \[text\] that says "Expand the reached cell of least $g(n)$."; heading — a Heading that says "Ranking by Cost So Far"; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid

Actions:
- [02:55.08](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=175.08033333333336): rule is emphasized.
- [03:2.755](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=182.75533333333334): rule is no longer emphasized.

##### [03:5.311](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=185.31083333333333)

Narration: So it grows in every direction at once. Watch the shading: its leading edge is the frontier, the boundary between cells already expanded and cells not yet reached.

Board: Unchanged from the preceding beat in this scene.

Actions:
- [03:8.567](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=188.56733333333335): polygon\_13 is shown on the screen, written out.
- [03:8.664](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=188.6642539281706): polygon\_14 is shown on the screen, written out.
- [03:8.761](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=188.76117452300787): polygon\_15 is shown on the screen, written out.
- [03:8.858](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=188.85809511784512): polygon\_16 is shown on the screen, written out.
- [03:8.931](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=188.9305016835017): polygon\_17 is shown on the screen, written out.
- [03:8.981](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=188.98054377104378): polygon\_18 is shown on the screen, written out.
- [03:9.048](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=189.04771268237937): polygon\_19 is shown on the screen, written out.
- [03:9.181](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=189.18134998129443): polygon\_20 is shown on the screen, written out.
- [03:9.315](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=189.31498728020952): polygon\_21 is shown on the screen, written out.
- [03:9.449](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=189.44862457912458): polygon\_22 is shown on the screen, written out.
- [03:9.582](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=189.58226187803967): polygon\_23 is shown on the screen, written out.
- [03:9.716](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=189.71589917695474): polygon\_24 is shown on the screen, written out.
- [03:9.826](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=189.8261590909091): polygon\_25 is shown on the screen, written out.
- [03:9.936](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=189.93616540404042): polygon\_26 is shown on the screen, written out.
- [03:10.028](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=190.02778451178455): polygon\_27 is shown on the screen, written out.
- [03:10.11](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=190.11039709595963): polygon\_28 is shown on the screen, written out.
- [03:10.193](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=190.1930096801347): polygon\_29 is shown on the screen, written out.
- [03:10.276](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=190.2756222643098): polygon\_30 is shown on the screen, written out.
- [03:10.358](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=190.35829090909093): polygon\_31 is shown on the screen, written out.
- [03:10.442](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=190.44249966329969): polygon\_32 is shown on the screen, written out.

##### [03:17.028](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=197.02783333333335)

Narration: Stop it here. The outlined cells are the frontier at this instant: expanded cells behind them, unreached cells in front.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule — a Tex \[text\] that says "Expand the reached cell of least $g(n)$."; heading — a Heading that says "Ranking by Cost So Far"; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); polygon\_14 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 3.08), (0.92, 3.08), (0.92, 3.92), (0.08, 3.92)), fill\_opacity=0.4); polygon\_15 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 4.08), (1.92, 4.08), (1.92, 4.92), (1.08, 4.92)), fill\_opacity=0.4); polygon\_16 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 2.08), (1.92, 2.08), (1.92, 2.92), (1.08, 2.92)), fill\_opacity=0.4); polygon\_17 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4); polygon\_18 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 4.08), (2.92, 4.08), (2.92, 4.92), (2.08, 4.92)), fill\_opacity=0.4); polygon\_19 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 2.08), (2.92, 2.08), (2.92, 2.92), (2.08, 2.92)), fill\_opacity=0.4); polygon\_20 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 4.08), (0.92, 4.08), (0.92, 4.92), (0.08, 4.92)), fill\_opacity=0.4); polygon\_21 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 2.08), (0.92, 2.08), (0.92, 2.92), (0.08, 2.92)), fill\_opacity=0.4); polygon\_22 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 5.08), (1.92, 5.08), (1.92, 5.92), (1.08, 5.92)), fill\_opacity=0.4); polygon\_23 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 1.08), (1.92, 1.08), (1.92, 1.92), (1.08, 1.92)), fill\_opacity=0.4); polygon\_24 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4); polygon\_25 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 4.08), (3.92, 4.08), (3.92, 4.92), (3.08, 4.92)), fill\_opacity=0.4); polygon\_26 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 2.08), (3.92, 2.08), (3.92, 2.92), (3.08, 2.92)), fill\_opacity=0.4); polygon\_27 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 5.08), (2.92, 5.08), (2.92, 5.92), (2.08, 5.92)), fill\_opacity=0.4); polygon\_28 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 1.08), (2.92, 1.08), (2.92, 1.92), (2.08, 1.92)), fill\_opacity=0.4); polygon\_29 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 5.08), (0.92, 5.08), (0.92, 5.92), (0.08, 5.92)), fill\_opacity=0.4); polygon\_30 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 1.08), (0.92, 1.08), (0.92, 1.92), (0.08, 1.92)), fill\_opacity=0.4); polygon\_31 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 6.08), (1.92, 6.08), (1.92, 6.92), (1.08, 6.92)), fill\_opacity=0.4); polygon\_32 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 0.08), (1.92, 0.08), (1.92, 0.92), (1.08, 0.92)), fill\_opacity=0.4)

Actions:
- [03:18.908](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=198.90833333333336): polygon\_33 is shown on the screen, written out.
- [03:18.951](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=198.95062291963862): polygon\_34 is shown on the screen, written out.
- [03:18.993](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=198.9929125059439): polygon\_35 is shown on the screen, written out.
- [03:19.035](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=199.0352020922492): polygon\_36 is shown on the screen, written out.
- [03:19.077](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=199.07749167855445): polygon\_37 is shown on the screen, written out.
- [03:19.12](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=199.11978126485974): polygon\_38 is shown on the screen, written out.
- [03:19.162](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=199.16207085116503): polygon\_39 is shown on the screen, written out.
- [03:19.204](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=199.2043604374703): polygon\_40 is shown on the screen, written out.

##### [03:25.917](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=205.91683333333333)

Narration: The frontier is a diamond rather than a circle, because distance is counted in horizontal and vertical steps. And it spreads behind the start as readily as ahead of it. Let the wave run on, and half of that work is going away from G.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule — a Tex \[text\] that says "Expand the reached cell of least $g(n)$."; heading — a Heading that says "Ranking by Cost So Far"; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); polygon\_14 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 3.08), (0.92, 3.08), (0.92, 3.92), (0.08, 3.92)), fill\_opacity=0.4); polygon\_15 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 4.08), (1.92, 4.08), (1.92, 4.92), (1.08, 4.92)), fill\_opacity=0.4); polygon\_16 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 2.08), (1.92, 2.08), (1.92, 2.92), (1.08, 2.92)), fill\_opacity=0.4); polygon\_17 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4); polygon\_18 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 4.08), (2.92, 4.08), (2.92, 4.92), (2.08, 4.92)), fill\_opacity=0.4); polygon\_19 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 2.08), (2.92, 2.08), (2.92, 2.92), (2.08, 2.92)), fill\_opacity=0.4); polygon\_20 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 4.08), (0.92, 4.08), (0.92, 4.92), (0.08, 4.92)), fill\_opacity=0.4); polygon\_21 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 2.08), (0.92, 2.08), (0.92, 2.92), (0.08, 2.92)), fill\_opacity=0.4); polygon\_22 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 5.08), (1.92, 5.08), (1.92, 5.92), (1.08, 5.92)), fill\_opacity=0.4); polygon\_23 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 1.08), (1.92, 1.08), (1.92, 1.92), (1.08, 1.92)), fill\_opacity=0.4); polygon\_24 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4); polygon\_25 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 4.08), (3.92, 4.08), (3.92, 4.92), (3.08, 4.92)), fill\_opacity=0.4); polygon\_26 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 2.08), (3.92, 2.08), (3.92, 2.92), (3.08, 2.92)), fill\_opacity=0.4); polygon\_27 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 5.08), (2.92, 5.08), (2.92, 5.92), (2.08, 5.92)), fill\_opacity=0.4); polygon\_28 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 1.08), (2.92, 1.08), (2.92, 1.92), (2.08, 1.92)), fill\_opacity=0.4); polygon\_29 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 5.08), (0.92, 5.08), (0.92, 5.92), (0.08, 5.92)), fill\_opacity=0.4); polygon\_30 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 1.08), (0.92, 1.08), (0.92, 1.92), (0.08, 1.92)), fill\_opacity=0.4); polygon\_31 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 6.08), (1.92, 6.08), (1.92, 6.92), (1.08, 6.92)), fill\_opacity=0.4); polygon\_32 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 0.08), (1.92, 0.08), (1.92, 0.92), (1.08, 0.92)), fill\_opacity=0.4); polygon\_33 — a Polygon \[yellow\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.55); polygon\_34 — a Polygon \[yellow\] drawn in grid (vertices=((4.08, 4.08), (4.92, 4.08), (4.92, 4.92), (4.08, 4.92)), fill\_opacity=0.55); polygon\_35 — a Polygon \[yellow\] drawn in grid (vertices=((4.08, 2.08), (4.92, 2.08), (4.92, 2.92), (4.08, 2.92)), fill\_opacity=0.55); polygon\_36 — a Polygon \[yellow\] drawn in grid (vertices=((3.08, 1.08), (3.92, 1.08), (3.92, 1.92), (3.08, 1.92)), fill\_opacity=0.55); polygon\_37 — a Polygon \[yellow\] drawn in grid (vertices=((2.08, 6.08), (2.92, 6.08), (2.92, 6.92), (2.08, 6.92)), fill\_opacity=0.55); polygon\_38 — a Polygon \[yellow\] drawn in grid (vertices=((2.08, 0.08), (2.92, 0.08), (2.92, 0.92), (2.08, 0.92)), fill\_opacity=0.55); polygon\_39 — a Polygon \[yellow\] drawn in grid (vertices=((0.08, 6.08), (0.92, 6.08), (0.92, 6.92), (0.08, 6.92)), fill\_opacity=0.55); polygon\_40 — a Polygon \[yellow\] drawn in grid (vertices=((0.08, 0.08), (0.92, 0.08), (0.92, 0.92), (0.08, 0.92)), fill\_opacity=0.55)

Actions:
- [03:36.714](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=216.71433333333334): polygon\_33 is hidden from the screen.
- [03:36.714](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=216.71433333333334): polygon\_34 is hidden from the screen.
- [03:36.714](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=216.71433333333334): polygon\_35 is hidden from the screen.
- [03:36.714](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=216.71433333333334): polygon\_36 is hidden from the screen.
- [03:36.714](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=216.71433333333334): polygon\_37 is hidden from the screen.
- [03:36.714](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=216.71433333333334): polygon\_38 is hidden from the screen.
- [03:36.714](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=216.71433333333334): polygon\_39 is hidden from the screen.
- [03:36.714](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=216.71433333333334): polygon\_40 is hidden from the screen.
- [03:36.714](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=216.71433333333334): polygon\_41 is shown on the screen, written out.
- [03:36.779](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=216.77881962056426): polygon\_42 is shown on the screen, written out.
- [03:36.843](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=216.84330590779516): polygon\_43 is shown on the screen, written out.
- [03:36.908](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=216.90779219502605): polygon\_44 is shown on the screen, written out.
- [03:36.972](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=216.97227848225697): polygon\_45 is shown on the screen, written out.
- [03:37.032](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=217.03245689570434): polygon\_46 is shown on the screen, written out.
- [03:37.092](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=217.09193160817853): polygon\_47 is shown on the screen, written out.
- [03:37.151](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=217.1514063206527): polygon\_48 is shown on the screen, written out.
- [03:37.272](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=217.2723416642092): polygon\_49 is shown on the screen, written out.
- [03:37.444](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=217.44412395556867): polygon\_50 is shown on the screen, written out.
- [03:37.616](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=217.61590624692815): polygon\_51 is shown on the screen, written out.
- [03:37.763](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=217.7630073233068): polygon\_52 is shown on the screen, written out.
- [03:37.83](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=217.82972768603167): polygon\_53 is shown on the screen, written out.
- [03:37.896](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=217.8964480487565): polygon\_54 is shown on the screen, written out.
- [03:37.963](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=217.96316841148138): polygon\_55 is shown on the screen, written out.
- [03:38.02](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=218.02002876241028): polygon\_56 is shown on the screen, written out.

##### [03:41.044](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=221.04383333333334)

Narration: Keep going. The expansion folds around the walls and continues, filling cells that no shortest route to G could use.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule — a Tex \[text\] that says "Expand the reached cell of least $g(n)$."; heading — a Heading that says "Ranking by Cost So Far"; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); polygon\_14 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 3.08), (0.92, 3.08), (0.92, 3.92), (0.08, 3.92)), fill\_opacity=0.4); polygon\_15 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 4.08), (1.92, 4.08), (1.92, 4.92), (1.08, 4.92)), fill\_opacity=0.4); polygon\_16 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 2.08), (1.92, 2.08), (1.92, 2.92), (1.08, 2.92)), fill\_opacity=0.4); polygon\_17 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4); polygon\_18 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 4.08), (2.92, 4.08), (2.92, 4.92), (2.08, 4.92)), fill\_opacity=0.4); polygon\_19 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 2.08), (2.92, 2.08), (2.92, 2.92), (2.08, 2.92)), fill\_opacity=0.4); polygon\_20 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 4.08), (0.92, 4.08), (0.92, 4.92), (0.08, 4.92)), fill\_opacity=0.4); polygon\_21 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 2.08), (0.92, 2.08), (0.92, 2.92), (0.08, 2.92)), fill\_opacity=0.4); polygon\_22 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 5.08), (1.92, 5.08), (1.92, 5.92), (1.08, 5.92)), fill\_opacity=0.4); polygon\_23 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 1.08), (1.92, 1.08), (1.92, 1.92), (1.08, 1.92)), fill\_opacity=0.4); polygon\_24 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4); polygon\_25 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 4.08), (3.92, 4.08), (3.92, 4.92), (3.08, 4.92)), fill\_opacity=0.4); polygon\_26 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 2.08), (3.92, 2.08), (3.92, 2.92), (3.08, 2.92)), fill\_opacity=0.4); polygon\_27 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 5.08), (2.92, 5.08), (2.92, 5.92), (2.08, 5.92)), fill\_opacity=0.4); polygon\_28 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 1.08), (2.92, 1.08), (2.92, 1.92), (2.08, 1.92)), fill\_opacity=0.4); polygon\_29 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 5.08), (0.92, 5.08), (0.92, 5.92), (0.08, 5.92)), fill\_opacity=0.4); polygon\_30 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 1.08), (0.92, 1.08), (0.92, 1.92), (0.08, 1.92)), fill\_opacity=0.4); polygon\_31 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 6.08), (1.92, 6.08), (1.92, 6.92), (1.08, 6.92)), fill\_opacity=0.4); polygon\_32 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 0.08), (1.92, 0.08), (1.92, 0.92), (1.08, 0.92)), fill\_opacity=0.4); polygon\_41 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4); polygon\_42 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 4.08), (4.92, 4.08), (4.92, 4.92), (4.08, 4.92)), fill\_opacity=0.4); polygon\_43 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 2.08), (4.92, 2.08), (4.92, 2.92), (4.08, 2.92)), fill\_opacity=0.4); polygon\_44 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 1.08), (3.92, 1.08), (3.92, 1.92), (3.08, 1.92)), fill\_opacity=0.4); polygon\_45 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 6.08), (2.92, 6.08), (2.92, 6.92), (2.08, 6.92)), fill\_opacity=0.4); polygon\_46 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 0.08), (2.92, 0.08), (2.92, 0.92), (2.08, 0.92)), fill\_opacity=0.4); polygon\_47 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 6.08), (0.92, 6.08), (0.92, 6.92), (0.08, 6.92)), fill\_opacity=0.4); polygon\_48 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 0.08), (0.92, 0.08), (0.92, 0.92), (0.08, 0.92)), fill\_opacity=0.4); polygon\_49 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 4.08), (5.92, 4.08), (5.92, 4.92), (5.08, 4.92)), fill\_opacity=0.4); polygon\_50 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.4); polygon\_51 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 5.08), (4.92, 5.08), (4.92, 5.92), (4.08, 5.92)), fill\_opacity=0.4); polygon\_52 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 0.08), (3.92, 0.08), (3.92, 0.92), (3.08, 0.92)), fill\_opacity=0.4); polygon\_53 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 5.08), (5.92, 5.08), (5.92, 5.92), (5.08, 5.92)), fill\_opacity=0.4); polygon\_54 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 2.08), (6.92, 2.08), (6.92, 2.92), (6.08, 2.92)), fill\_opacity=0.4); polygon\_55 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 1.08), (5.92, 1.08), (5.92, 1.92), (5.08, 1.92)), fill\_opacity=0.4); polygon\_56 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 6.08), (4.92, 6.08), (4.92, 6.92), (4.08, 6.92)), fill\_opacity=0.4)

Actions:
- [03:41.264](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=221.26433333333335): polygon\_57 is shown on the screen, written out.
- [03:41.317](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=221.31730958001378): polygon\_58 is shown on the screen, written out.
- [03:41.37](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=221.37028582669421): polygon\_59 is shown on the screen, written out.
- [03:41.423](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=221.42326207337464): polygon\_60 is shown on the screen, written out.
- [03:41.476](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=221.47623832005507): polygon\_61 is shown on the screen, written out.
- [03:41.529](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=221.5292145667355): polygon\_62 is shown on the screen, written out.
- [03:41.684](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=221.68419915974653): polygon\_63 is shown on the screen, written out.
- [03:41.876](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=221.87624822605346): polygon\_64 is shown on the screen, written out.
- [03:42.068](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=222.06829729236043): polygon\_65 is shown on the screen, written out.
- [03:42.26](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=222.2603463586674): polygon\_66 is shown on the screen, written out.
- [03:42.452](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=222.45239542497433): polygon\_67 is shown on the screen, written out.
- [03:42.644](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=222.64444449128132): polygon\_68 is shown on the screen, written out.

##### [03:49.817](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=229.81733333333335)

Narration: The goal is reached last, because it is far from the start and the search had no reason to hurry towards it. The route returned is a shortest one: ten steps.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule — a Tex \[text\] that says "Expand the reached cell of least $g(n)$."; heading — a Heading that says "Ranking by Cost So Far"; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); polygon\_14 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 3.08), (0.92, 3.08), (0.92, 3.92), (0.08, 3.92)), fill\_opacity=0.4); polygon\_15 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 4.08), (1.92, 4.08), (1.92, 4.92), (1.08, 4.92)), fill\_opacity=0.4); polygon\_16 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 2.08), (1.92, 2.08), (1.92, 2.92), (1.08, 2.92)), fill\_opacity=0.4); polygon\_17 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4); polygon\_18 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 4.08), (2.92, 4.08), (2.92, 4.92), (2.08, 4.92)), fill\_opacity=0.4); polygon\_19 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 2.08), (2.92, 2.08), (2.92, 2.92), (2.08, 2.92)), fill\_opacity=0.4); polygon\_20 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 4.08), (0.92, 4.08), (0.92, 4.92), (0.08, 4.92)), fill\_opacity=0.4); polygon\_21 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 2.08), (0.92, 2.08), (0.92, 2.92), (0.08, 2.92)), fill\_opacity=0.4); polygon\_22 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 5.08), (1.92, 5.08), (1.92, 5.92), (1.08, 5.92)), fill\_opacity=0.4); polygon\_23 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 1.08), (1.92, 1.08), (1.92, 1.92), (1.08, 1.92)), fill\_opacity=0.4); polygon\_24 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4); polygon\_25 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 4.08), (3.92, 4.08), (3.92, 4.92), (3.08, 4.92)), fill\_opacity=0.4); polygon\_26 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 2.08), (3.92, 2.08), (3.92, 2.92), (3.08, 2.92)), fill\_opacity=0.4); polygon\_27 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 5.08), (2.92, 5.08), (2.92, 5.92), (2.08, 5.92)), fill\_opacity=0.4); polygon\_28 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 1.08), (2.92, 1.08), (2.92, 1.92), (2.08, 1.92)), fill\_opacity=0.4); polygon\_29 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 5.08), (0.92, 5.08), (0.92, 5.92), (0.08, 5.92)), fill\_opacity=0.4); polygon\_30 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 1.08), (0.92, 1.08), (0.92, 1.92), (0.08, 1.92)), fill\_opacity=0.4); polygon\_31 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 6.08), (1.92, 6.08), (1.92, 6.92), (1.08, 6.92)), fill\_opacity=0.4); polygon\_32 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 0.08), (1.92, 0.08), (1.92, 0.92), (1.08, 0.92)), fill\_opacity=0.4); polygon\_41 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4); polygon\_42 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 4.08), (4.92, 4.08), (4.92, 4.92), (4.08, 4.92)), fill\_opacity=0.4); polygon\_43 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 2.08), (4.92, 2.08), (4.92, 2.92), (4.08, 2.92)), fill\_opacity=0.4); polygon\_44 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 1.08), (3.92, 1.08), (3.92, 1.92), (3.08, 1.92)), fill\_opacity=0.4); polygon\_45 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 6.08), (2.92, 6.08), (2.92, 6.92), (2.08, 6.92)), fill\_opacity=0.4); polygon\_46 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 0.08), (2.92, 0.08), (2.92, 0.92), (2.08, 0.92)), fill\_opacity=0.4); polygon\_47 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 6.08), (0.92, 6.08), (0.92, 6.92), (0.08, 6.92)), fill\_opacity=0.4); polygon\_48 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 0.08), (0.92, 0.08), (0.92, 0.92), (0.08, 0.92)), fill\_opacity=0.4); polygon\_49 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 4.08), (5.92, 4.08), (5.92, 4.92), (5.08, 4.92)), fill\_opacity=0.4); polygon\_50 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.4); polygon\_51 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 5.08), (4.92, 5.08), (4.92, 5.92), (4.08, 5.92)), fill\_opacity=0.4); polygon\_52 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 0.08), (3.92, 0.08), (3.92, 0.92), (3.08, 0.92)), fill\_opacity=0.4); polygon\_53 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 5.08), (5.92, 5.08), (5.92, 5.92), (5.08, 5.92)), fill\_opacity=0.4); polygon\_54 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 2.08), (6.92, 2.08), (6.92, 2.92), (6.08, 2.92)), fill\_opacity=0.4); polygon\_55 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 1.08), (5.92, 1.08), (5.92, 1.92), (5.08, 1.92)), fill\_opacity=0.4); polygon\_56 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 6.08), (4.92, 6.08), (4.92, 6.92), (4.08, 6.92)), fill\_opacity=0.4); polygon\_57 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 6.08), (5.92, 6.08), (5.92, 6.92), (5.08, 6.92)), fill\_opacity=0.4); polygon\_58 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 2.08), (7.92, 2.08), (7.92, 2.92), (7.08, 2.92)), fill\_opacity=0.4); polygon\_59 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 1.08), (6.92, 1.08), (6.92, 1.92), (6.08, 1.92)), fill\_opacity=0.4); polygon\_60 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 0.08), (5.92, 0.08), (5.92, 0.92), (5.08, 0.92)), fill\_opacity=0.4); polygon\_61 — a Polygon \[blue\] drawn in grid (vertices=((8.08, 2.08), (8.92, 2.08), (8.92, 2.92), (8.08, 2.92)), fill\_opacity=0.4); polygon\_62 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 3.08), (7.92, 3.08), (7.92, 3.92), (7.08, 3.92)), fill\_opacity=0.4); polygon\_63 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 1.08), (7.92, 1.08), (7.92, 1.92), (7.08, 1.92)), fill\_opacity=0.4); polygon\_64 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 0.08), (6.92, 0.08), (6.92, 0.92), (6.08, 0.92)), fill\_opacity=0.4); polygon\_65 — a Polygon \[blue\] drawn in grid (vertices=((9.08, 2.08), (9.92, 2.08), (9.92, 2.92), (9.08, 2.92)), fill\_opacity=0.4); polygon\_66 — a Polygon \[blue\] drawn in grid (vertices=((8.08, 3.08), (8.92, 3.08), (8.92, 3.92), (8.08, 3.92)), fill\_opacity=0.4); polygon\_67 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 4.08), (7.92, 4.08), (7.92, 4.92), (7.08, 4.92)), fill\_opacity=0.4); polygon\_68 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 0.08), (7.92, 0.08), (7.92, 0.92), (7.08, 0.92)), fill\_opacity=0.4)

Actions:
- [03:50.722](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=230.72233333333332): polygon\_12 is indicated — a transient flash.
- [03:56.33](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=236.33033333333333): route is shown on the screen, written out.
- [03:56.41](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=236.4104032328528): route\_2 is shown on the screen, written out.
- [03:56.49](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=236.49047313237222): route\_3 is shown on the screen, written out.
- [03:56.574](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=236.57384578418524): route\_4 is shown on the screen, written out.
- [03:56.686](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=236.68612771224699): route\_5 is shown on the screen, written out.
- [03:56.798](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=236.7984096403087): route\_6 is shown on the screen, written out.
- [03:56.911](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=236.91069156837045): route\_7 is shown on the screen, written out.
- [03:57.023](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=237.0229734964322): route\_8 is shown on the screen, written out.
- [03:57.117](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=237.11715727391874): route\_9 is shown on the screen, written out.
- [03:57.211](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=237.21145522062037): route\_10 is shown on the screen, written out.

##### [04:0.297](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=240.29733333333334)

Narration: That optimality is not negotiable. Whatever we add to make the search look in the right direction must still return a route of least cost.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule — a Tex \[text\] that says "Expand the reached cell of least $g(n)$."; heading — a Heading that says "Ranking by Cost So Far"; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); polygon\_14 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 3.08), (0.92, 3.08), (0.92, 3.92), (0.08, 3.92)), fill\_opacity=0.4); polygon\_15 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 4.08), (1.92, 4.08), (1.92, 4.92), (1.08, 4.92)), fill\_opacity=0.4); polygon\_16 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 2.08), (1.92, 2.08), (1.92, 2.92), (1.08, 2.92)), fill\_opacity=0.4); polygon\_17 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4); polygon\_18 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 4.08), (2.92, 4.08), (2.92, 4.92), (2.08, 4.92)), fill\_opacity=0.4); polygon\_19 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 2.08), (2.92, 2.08), (2.92, 2.92), (2.08, 2.92)), fill\_opacity=0.4); polygon\_20 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 4.08), (0.92, 4.08), (0.92, 4.92), (0.08, 4.92)), fill\_opacity=0.4); polygon\_21 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 2.08), (0.92, 2.08), (0.92, 2.92), (0.08, 2.92)), fill\_opacity=0.4); polygon\_22 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 5.08), (1.92, 5.08), (1.92, 5.92), (1.08, 5.92)), fill\_opacity=0.4); polygon\_23 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 1.08), (1.92, 1.08), (1.92, 1.92), (1.08, 1.92)), fill\_opacity=0.4); polygon\_24 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4); polygon\_25 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 4.08), (3.92, 4.08), (3.92, 4.92), (3.08, 4.92)), fill\_opacity=0.4); polygon\_26 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 2.08), (3.92, 2.08), (3.92, 2.92), (3.08, 2.92)), fill\_opacity=0.4); polygon\_27 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 5.08), (2.92, 5.08), (2.92, 5.92), (2.08, 5.92)), fill\_opacity=0.4); polygon\_28 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 1.08), (2.92, 1.08), (2.92, 1.92), (2.08, 1.92)), fill\_opacity=0.4); polygon\_29 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 5.08), (0.92, 5.08), (0.92, 5.92), (0.08, 5.92)), fill\_opacity=0.4); polygon\_30 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 1.08), (0.92, 1.08), (0.92, 1.92), (0.08, 1.92)), fill\_opacity=0.4); polygon\_31 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 6.08), (1.92, 6.08), (1.92, 6.92), (1.08, 6.92)), fill\_opacity=0.4); polygon\_32 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 0.08), (1.92, 0.08), (1.92, 0.92), (1.08, 0.92)), fill\_opacity=0.4); polygon\_41 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4); polygon\_42 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 4.08), (4.92, 4.08), (4.92, 4.92), (4.08, 4.92)), fill\_opacity=0.4); polygon\_43 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 2.08), (4.92, 2.08), (4.92, 2.92), (4.08, 2.92)), fill\_opacity=0.4); polygon\_44 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 1.08), (3.92, 1.08), (3.92, 1.92), (3.08, 1.92)), fill\_opacity=0.4); polygon\_45 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 6.08), (2.92, 6.08), (2.92, 6.92), (2.08, 6.92)), fill\_opacity=0.4); polygon\_46 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 0.08), (2.92, 0.08), (2.92, 0.92), (2.08, 0.92)), fill\_opacity=0.4); polygon\_47 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 6.08), (0.92, 6.08), (0.92, 6.92), (0.08, 6.92)), fill\_opacity=0.4); polygon\_48 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 0.08), (0.92, 0.08), (0.92, 0.92), (0.08, 0.92)), fill\_opacity=0.4); polygon\_49 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 4.08), (5.92, 4.08), (5.92, 4.92), (5.08, 4.92)), fill\_opacity=0.4); polygon\_50 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.4); polygon\_51 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 5.08), (4.92, 5.08), (4.92, 5.92), (4.08, 5.92)), fill\_opacity=0.4); polygon\_52 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 0.08), (3.92, 0.08), (3.92, 0.92), (3.08, 0.92)), fill\_opacity=0.4); polygon\_53 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 5.08), (5.92, 5.08), (5.92, 5.92), (5.08, 5.92)), fill\_opacity=0.4); polygon\_54 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 2.08), (6.92, 2.08), (6.92, 2.92), (6.08, 2.92)), fill\_opacity=0.4); polygon\_55 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 1.08), (5.92, 1.08), (5.92, 1.92), (5.08, 1.92)), fill\_opacity=0.4); polygon\_56 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 6.08), (4.92, 6.08), (4.92, 6.92), (4.08, 6.92)), fill\_opacity=0.4); polygon\_57 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 6.08), (5.92, 6.08), (5.92, 6.92), (5.08, 6.92)), fill\_opacity=0.4); polygon\_58 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 2.08), (7.92, 2.08), (7.92, 2.92), (7.08, 2.92)), fill\_opacity=0.4); polygon\_59 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 1.08), (6.92, 1.08), (6.92, 1.92), (6.08, 1.92)), fill\_opacity=0.4); polygon\_60 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 0.08), (5.92, 0.08), (5.92, 0.92), (5.08, 0.92)), fill\_opacity=0.4); polygon\_61 — a Polygon \[blue\] drawn in grid (vertices=((8.08, 2.08), (8.92, 2.08), (8.92, 2.92), (8.08, 2.92)), fill\_opacity=0.4); polygon\_62 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 3.08), (7.92, 3.08), (7.92, 3.92), (7.08, 3.92)), fill\_opacity=0.4); polygon\_63 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 1.08), (7.92, 1.08), (7.92, 1.92), (7.08, 1.92)), fill\_opacity=0.4); polygon\_64 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 0.08), (6.92, 0.08), (6.92, 0.92), (6.08, 0.92)), fill\_opacity=0.4); polygon\_65 — a Polygon \[blue\] drawn in grid (vertices=((9.08, 2.08), (9.92, 2.08), (9.92, 2.92), (9.08, 2.92)), fill\_opacity=0.4); polygon\_66 — a Polygon \[blue\] drawn in grid (vertices=((8.08, 3.08), (8.92, 3.08), (8.92, 3.92), (8.08, 3.92)), fill\_opacity=0.4); polygon\_67 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 4.08), (7.92, 4.08), (7.92, 4.92), (7.08, 4.92)), fill\_opacity=0.4); polygon\_68 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 0.08), (7.92, 0.08), (7.92, 0.92), (7.08, 0.92)), fill\_opacity=0.4); route — a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(2.5, 3.5)); route\_2 — a Line \[green\] drawn in grid (start=(2.5, 3.5), end=(3.5, 3.5)); route\_3 — a Line \[green\] drawn in grid (start=(3.5, 3.5), end=(4.5, 3.5)); route\_4 — a Line \[green\] drawn in grid (start=(4.5, 3.5), end=(5.5, 3.5)); route\_5 — a Line \[green\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5)); route\_6 — a Line \[green\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5)); route\_7 — a Line \[green\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5)); route\_8 — a Line \[green\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5)); route\_9 — a Line \[green\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5)); route\_10 — a Line \[green\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5))

Actions:
- [04:7.495](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=247.49533333333335): route is indicated — a transient flash.
- [04:7.495](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=247.49533333333335): route\_2 is indicated — a transient flash.
- [04:7.495](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=247.49533333333335): route\_3 is indicated — a transient flash.
- [04:7.495](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=247.49533333333335): route\_4 is indicated — a transient flash.
- [04:7.495](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=247.49533333333335): route\_5 is indicated — a transient flash.
- [04:7.495](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=247.49533333333335): route\_6 is indicated — a transient flash.
- [04:7.495](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=247.49533333333335): route\_7 is indicated — a transient flash.
- [04:7.495](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=247.49533333333335): route\_8 is indicated — a transient flash.
- [04:7.495](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=247.49533333333335): route\_9 is indicated — a transient flash.
- [04:7.495](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=247.49533333333335): route\_10 is indicated — a transient flash.
- [04:8.714](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=248.71433333333334): grid moves to a new place on the board.
- [04:8.714](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=248.71433333333334): rule moves to a new place on the board.
- [04:8.714](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=248.71433333333334): heading is hidden from the screen — left the board.

##### [04:9.914](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=249.91433333333333)

Narration: Now count the work. Before the goal came off the queue, every cell strictly closer to the start than the goal is had already been expanded. That is this many, out of the sixty-seven cells of this grid that are not walls.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule — a Tex \[text\] that says "Expand the reached cell of least $g(n)$."; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); polygon\_14 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 3.08), (0.92, 3.08), (0.92, 3.92), (0.08, 3.92)), fill\_opacity=0.4); polygon\_15 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 4.08), (1.92, 4.08), (1.92, 4.92), (1.08, 4.92)), fill\_opacity=0.4); polygon\_16 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 2.08), (1.92, 2.08), (1.92, 2.92), (1.08, 2.92)), fill\_opacity=0.4); polygon\_17 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4); polygon\_18 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 4.08), (2.92, 4.08), (2.92, 4.92), (2.08, 4.92)), fill\_opacity=0.4); polygon\_19 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 2.08), (2.92, 2.08), (2.92, 2.92), (2.08, 2.92)), fill\_opacity=0.4); polygon\_20 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 4.08), (0.92, 4.08), (0.92, 4.92), (0.08, 4.92)), fill\_opacity=0.4); polygon\_21 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 2.08), (0.92, 2.08), (0.92, 2.92), (0.08, 2.92)), fill\_opacity=0.4); polygon\_22 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 5.08), (1.92, 5.08), (1.92, 5.92), (1.08, 5.92)), fill\_opacity=0.4); polygon\_23 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 1.08), (1.92, 1.08), (1.92, 1.92), (1.08, 1.92)), fill\_opacity=0.4); polygon\_24 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4); polygon\_25 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 4.08), (3.92, 4.08), (3.92, 4.92), (3.08, 4.92)), fill\_opacity=0.4); polygon\_26 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 2.08), (3.92, 2.08), (3.92, 2.92), (3.08, 2.92)), fill\_opacity=0.4); polygon\_27 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 5.08), (2.92, 5.08), (2.92, 5.92), (2.08, 5.92)), fill\_opacity=0.4); polygon\_28 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 1.08), (2.92, 1.08), (2.92, 1.92), (2.08, 1.92)), fill\_opacity=0.4); polygon\_29 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 5.08), (0.92, 5.08), (0.92, 5.92), (0.08, 5.92)), fill\_opacity=0.4); polygon\_30 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 1.08), (0.92, 1.08), (0.92, 1.92), (0.08, 1.92)), fill\_opacity=0.4); polygon\_31 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 6.08), (1.92, 6.08), (1.92, 6.92), (1.08, 6.92)), fill\_opacity=0.4); polygon\_32 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 0.08), (1.92, 0.08), (1.92, 0.92), (1.08, 0.92)), fill\_opacity=0.4); polygon\_41 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4); polygon\_42 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 4.08), (4.92, 4.08), (4.92, 4.92), (4.08, 4.92)), fill\_opacity=0.4); polygon\_43 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 2.08), (4.92, 2.08), (4.92, 2.92), (4.08, 2.92)), fill\_opacity=0.4); polygon\_44 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 1.08), (3.92, 1.08), (3.92, 1.92), (3.08, 1.92)), fill\_opacity=0.4); polygon\_45 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 6.08), (2.92, 6.08), (2.92, 6.92), (2.08, 6.92)), fill\_opacity=0.4); polygon\_46 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 0.08), (2.92, 0.08), (2.92, 0.92), (2.08, 0.92)), fill\_opacity=0.4); polygon\_47 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 6.08), (0.92, 6.08), (0.92, 6.92), (0.08, 6.92)), fill\_opacity=0.4); polygon\_48 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 0.08), (0.92, 0.08), (0.92, 0.92), (0.08, 0.92)), fill\_opacity=0.4); polygon\_49 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 4.08), (5.92, 4.08), (5.92, 4.92), (5.08, 4.92)), fill\_opacity=0.4); polygon\_50 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.4); polygon\_51 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 5.08), (4.92, 5.08), (4.92, 5.92), (4.08, 5.92)), fill\_opacity=0.4); polygon\_52 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 0.08), (3.92, 0.08), (3.92, 0.92), (3.08, 0.92)), fill\_opacity=0.4); polygon\_53 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 5.08), (5.92, 5.08), (5.92, 5.92), (5.08, 5.92)), fill\_opacity=0.4); polygon\_54 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 2.08), (6.92, 2.08), (6.92, 2.92), (6.08, 2.92)), fill\_opacity=0.4); polygon\_55 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 1.08), (5.92, 1.08), (5.92, 1.92), (5.08, 1.92)), fill\_opacity=0.4); polygon\_56 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 6.08), (4.92, 6.08), (4.92, 6.92), (4.08, 6.92)), fill\_opacity=0.4); polygon\_57 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 6.08), (5.92, 6.08), (5.92, 6.92), (5.08, 6.92)), fill\_opacity=0.4); polygon\_58 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 2.08), (7.92, 2.08), (7.92, 2.92), (7.08, 2.92)), fill\_opacity=0.4); polygon\_59 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 1.08), (6.92, 1.08), (6.92, 1.92), (6.08, 1.92)), fill\_opacity=0.4); polygon\_60 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 0.08), (5.92, 0.08), (5.92, 0.92), (5.08, 0.92)), fill\_opacity=0.4); polygon\_61 — a Polygon \[blue\] drawn in grid (vertices=((8.08, 2.08), (8.92, 2.08), (8.92, 2.92), (8.08, 2.92)), fill\_opacity=0.4); polygon\_62 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 3.08), (7.92, 3.08), (7.92, 3.92), (7.08, 3.92)), fill\_opacity=0.4); polygon\_63 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 1.08), (7.92, 1.08), (7.92, 1.92), (7.08, 1.92)), fill\_opacity=0.4); polygon\_64 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 0.08), (6.92, 0.08), (6.92, 0.92), (6.08, 0.92)), fill\_opacity=0.4); polygon\_65 — a Polygon \[blue\] drawn in grid (vertices=((9.08, 2.08), (9.92, 2.08), (9.92, 2.92), (9.08, 2.92)), fill\_opacity=0.4); polygon\_66 — a Polygon \[blue\] drawn in grid (vertices=((8.08, 3.08), (8.92, 3.08), (8.92, 3.92), (8.08, 3.92)), fill\_opacity=0.4); polygon\_67 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 4.08), (7.92, 4.08), (7.92, 4.92), (7.08, 4.92)), fill\_opacity=0.4); polygon\_68 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 0.08), (7.92, 0.08), (7.92, 0.92), (7.08, 0.92)), fill\_opacity=0.4); route — a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(2.5, 3.5)); route\_2 — a Line \[green\] drawn in grid (start=(2.5, 3.5), end=(3.5, 3.5)); route\_3 — a Line \[green\] drawn in grid (start=(3.5, 3.5), end=(4.5, 3.5)); route\_4 — a Line \[green\] drawn in grid (start=(4.5, 3.5), end=(5.5, 3.5)); route\_5 — a Line \[green\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5)); route\_6 — a Line \[green\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5)); route\_7 — a Line \[green\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5)); route\_8 — a Line \[green\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5)); route\_9 — a Line \[green\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5)); route\_10 — a Line \[green\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5))

Actions:
- [04:9.914](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=249.91433333333333): closing is shown on the screen, written out.
- [04:10.541](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=250.54133333333334): count is shown on the screen, written out.
- [04:20.038](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=260.03833333333336): count is indicated — a transient flash.

##### [04:25.178](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=265.17783333333335)

Narration: That is not a defect of the implementation; it follows from the rule. g measures the past, and a search that ranks candidates by the past alone cannot tell a promising direction from a hopeless one.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule — a Tex \[text\] that says "Expand the reached cell of least $g(n)$."; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); polygon\_14 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 3.08), (0.92, 3.08), (0.92, 3.92), (0.08, 3.92)), fill\_opacity=0.4); polygon\_15 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 4.08), (1.92, 4.08), (1.92, 4.92), (1.08, 4.92)), fill\_opacity=0.4); polygon\_16 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 2.08), (1.92, 2.08), (1.92, 2.92), (1.08, 2.92)), fill\_opacity=0.4); polygon\_17 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4); polygon\_18 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 4.08), (2.92, 4.08), (2.92, 4.92), (2.08, 4.92)), fill\_opacity=0.4); polygon\_19 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 2.08), (2.92, 2.08), (2.92, 2.92), (2.08, 2.92)), fill\_opacity=0.4); polygon\_20 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 4.08), (0.92, 4.08), (0.92, 4.92), (0.08, 4.92)), fill\_opacity=0.4); polygon\_21 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 2.08), (0.92, 2.08), (0.92, 2.92), (0.08, 2.92)), fill\_opacity=0.4); polygon\_22 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 5.08), (1.92, 5.08), (1.92, 5.92), (1.08, 5.92)), fill\_opacity=0.4); polygon\_23 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 1.08), (1.92, 1.08), (1.92, 1.92), (1.08, 1.92)), fill\_opacity=0.4); polygon\_24 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4); polygon\_25 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 4.08), (3.92, 4.08), (3.92, 4.92), (3.08, 4.92)), fill\_opacity=0.4); polygon\_26 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 2.08), (3.92, 2.08), (3.92, 2.92), (3.08, 2.92)), fill\_opacity=0.4); polygon\_27 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 5.08), (2.92, 5.08), (2.92, 5.92), (2.08, 5.92)), fill\_opacity=0.4); polygon\_28 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 1.08), (2.92, 1.08), (2.92, 1.92), (2.08, 1.92)), fill\_opacity=0.4); polygon\_29 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 5.08), (0.92, 5.08), (0.92, 5.92), (0.08, 5.92)), fill\_opacity=0.4); polygon\_30 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 1.08), (0.92, 1.08), (0.92, 1.92), (0.08, 1.92)), fill\_opacity=0.4); polygon\_31 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 6.08), (1.92, 6.08), (1.92, 6.92), (1.08, 6.92)), fill\_opacity=0.4); polygon\_32 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 0.08), (1.92, 0.08), (1.92, 0.92), (1.08, 0.92)), fill\_opacity=0.4); polygon\_41 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4); polygon\_42 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 4.08), (4.92, 4.08), (4.92, 4.92), (4.08, 4.92)), fill\_opacity=0.4); polygon\_43 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 2.08), (4.92, 2.08), (4.92, 2.92), (4.08, 2.92)), fill\_opacity=0.4); polygon\_44 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 1.08), (3.92, 1.08), (3.92, 1.92), (3.08, 1.92)), fill\_opacity=0.4); polygon\_45 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 6.08), (2.92, 6.08), (2.92, 6.92), (2.08, 6.92)), fill\_opacity=0.4); polygon\_46 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 0.08), (2.92, 0.08), (2.92, 0.92), (2.08, 0.92)), fill\_opacity=0.4); polygon\_47 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 6.08), (0.92, 6.08), (0.92, 6.92), (0.08, 6.92)), fill\_opacity=0.4); polygon\_48 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 0.08), (0.92, 0.08), (0.92, 0.92), (0.08, 0.92)), fill\_opacity=0.4); polygon\_49 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 4.08), (5.92, 4.08), (5.92, 4.92), (5.08, 4.92)), fill\_opacity=0.4); polygon\_50 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.4); polygon\_51 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 5.08), (4.92, 5.08), (4.92, 5.92), (4.08, 5.92)), fill\_opacity=0.4); polygon\_52 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 0.08), (3.92, 0.08), (3.92, 0.92), (3.08, 0.92)), fill\_opacity=0.4); polygon\_53 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 5.08), (5.92, 5.08), (5.92, 5.92), (5.08, 5.92)), fill\_opacity=0.4); polygon\_54 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 2.08), (6.92, 2.08), (6.92, 2.92), (6.08, 2.92)), fill\_opacity=0.4); polygon\_55 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 1.08), (5.92, 1.08), (5.92, 1.92), (5.08, 1.92)), fill\_opacity=0.4); polygon\_56 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 6.08), (4.92, 6.08), (4.92, 6.92), (4.08, 6.92)), fill\_opacity=0.4); polygon\_57 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 6.08), (5.92, 6.08), (5.92, 6.92), (5.08, 6.92)), fill\_opacity=0.4); polygon\_58 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 2.08), (7.92, 2.08), (7.92, 2.92), (7.08, 2.92)), fill\_opacity=0.4); polygon\_59 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 1.08), (6.92, 1.08), (6.92, 1.92), (6.08, 1.92)), fill\_opacity=0.4); polygon\_60 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 0.08), (5.92, 0.08), (5.92, 0.92), (5.08, 0.92)), fill\_opacity=0.4); polygon\_61 — a Polygon \[blue\] drawn in grid (vertices=((8.08, 2.08), (8.92, 2.08), (8.92, 2.92), (8.08, 2.92)), fill\_opacity=0.4); polygon\_62 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 3.08), (7.92, 3.08), (7.92, 3.92), (7.08, 3.92)), fill\_opacity=0.4); polygon\_63 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 1.08), (7.92, 1.08), (7.92, 1.92), (7.08, 1.92)), fill\_opacity=0.4); polygon\_64 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 0.08), (6.92, 0.08), (6.92, 0.92), (6.08, 0.92)), fill\_opacity=0.4); polygon\_65 — a Polygon \[blue\] drawn in grid (vertices=((9.08, 2.08), (9.92, 2.08), (9.92, 2.92), (9.08, 2.92)), fill\_opacity=0.4); polygon\_66 — a Polygon \[blue\] drawn in grid (vertices=((8.08, 3.08), (8.92, 3.08), (8.92, 3.92), (8.08, 3.92)), fill\_opacity=0.4); polygon\_67 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 4.08), (7.92, 4.08), (7.92, 4.92), (7.08, 4.92)), fill\_opacity=0.4); polygon\_68 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 0.08), (7.92, 0.08), (7.92, 0.92), (7.08, 0.92)), fill\_opacity=0.4); route — a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(2.5, 3.5)); route\_2 — a Line \[green\] drawn in grid (start=(2.5, 3.5), end=(3.5, 3.5)); route\_3 — a Line \[green\] drawn in grid (start=(3.5, 3.5), end=(4.5, 3.5)); route\_4 — a Line \[green\] drawn in grid (start=(4.5, 3.5), end=(5.5, 3.5)); route\_5 — a Line \[green\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5)); route\_6 — a Line \[green\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5)); route\_7 — a Line \[green\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5)); route\_8 — a Line \[green\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5)); route\_9 — a Line \[green\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5)); route\_10 — a Line \[green\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5)); count — a Math \[text\] that says "$upright("expanded") = 49$"; closing — a Heading that says "The Cost of Having No Direction"

Actions:
- [04:28.208](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=268.20833333333337): verdict is shown on the screen, written out.

##### [04:38.282](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=278.28183333333334)

Narration: What is missing is a term that looks forward.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule — a Tex \[text\] that says "Expand the reached cell of least $g(n)$."; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); polygon\_14 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 3.08), (0.92, 3.08), (0.92, 3.92), (0.08, 3.92)), fill\_opacity=0.4); polygon\_15 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 4.08), (1.92, 4.08), (1.92, 4.92), (1.08, 4.92)), fill\_opacity=0.4); polygon\_16 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 2.08), (1.92, 2.08), (1.92, 2.92), (1.08, 2.92)), fill\_opacity=0.4); polygon\_17 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4); polygon\_18 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 4.08), (2.92, 4.08), (2.92, 4.92), (2.08, 4.92)), fill\_opacity=0.4); polygon\_19 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 2.08), (2.92, 2.08), (2.92, 2.92), (2.08, 2.92)), fill\_opacity=0.4); polygon\_20 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 4.08), (0.92, 4.08), (0.92, 4.92), (0.08, 4.92)), fill\_opacity=0.4); polygon\_21 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 2.08), (0.92, 2.08), (0.92, 2.92), (0.08, 2.92)), fill\_opacity=0.4); polygon\_22 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 5.08), (1.92, 5.08), (1.92, 5.92), (1.08, 5.92)), fill\_opacity=0.4); polygon\_23 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 1.08), (1.92, 1.08), (1.92, 1.92), (1.08, 1.92)), fill\_opacity=0.4); polygon\_24 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4); polygon\_25 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 4.08), (3.92, 4.08), (3.92, 4.92), (3.08, 4.92)), fill\_opacity=0.4); polygon\_26 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 2.08), (3.92, 2.08), (3.92, 2.92), (3.08, 2.92)), fill\_opacity=0.4); polygon\_27 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 5.08), (2.92, 5.08), (2.92, 5.92), (2.08, 5.92)), fill\_opacity=0.4); polygon\_28 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 1.08), (2.92, 1.08), (2.92, 1.92), (2.08, 1.92)), fill\_opacity=0.4); polygon\_29 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 5.08), (0.92, 5.08), (0.92, 5.92), (0.08, 5.92)), fill\_opacity=0.4); polygon\_30 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 1.08), (0.92, 1.08), (0.92, 1.92), (0.08, 1.92)), fill\_opacity=0.4); polygon\_31 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 6.08), (1.92, 6.08), (1.92, 6.92), (1.08, 6.92)), fill\_opacity=0.4); polygon\_32 — a Polygon \[blue\] drawn in grid (vertices=((1.08, 0.08), (1.92, 0.08), (1.92, 0.92), (1.08, 0.92)), fill\_opacity=0.4); polygon\_41 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4); polygon\_42 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 4.08), (4.92, 4.08), (4.92, 4.92), (4.08, 4.92)), fill\_opacity=0.4); polygon\_43 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 2.08), (4.92, 2.08), (4.92, 2.92), (4.08, 2.92)), fill\_opacity=0.4); polygon\_44 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 1.08), (3.92, 1.08), (3.92, 1.92), (3.08, 1.92)), fill\_opacity=0.4); polygon\_45 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 6.08), (2.92, 6.08), (2.92, 6.92), (2.08, 6.92)), fill\_opacity=0.4); polygon\_46 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 0.08), (2.92, 0.08), (2.92, 0.92), (2.08, 0.92)), fill\_opacity=0.4); polygon\_47 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 6.08), (0.92, 6.08), (0.92, 6.92), (0.08, 6.92)), fill\_opacity=0.4); polygon\_48 — a Polygon \[blue\] drawn in grid (vertices=((0.08, 0.08), (0.92, 0.08), (0.92, 0.92), (0.08, 0.92)), fill\_opacity=0.4); polygon\_49 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 4.08), (5.92, 4.08), (5.92, 4.92), (5.08, 4.92)), fill\_opacity=0.4); polygon\_50 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.4); polygon\_51 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 5.08), (4.92, 5.08), (4.92, 5.92), (4.08, 5.92)), fill\_opacity=0.4); polygon\_52 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 0.08), (3.92, 0.08), (3.92, 0.92), (3.08, 0.92)), fill\_opacity=0.4); polygon\_53 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 5.08), (5.92, 5.08), (5.92, 5.92), (5.08, 5.92)), fill\_opacity=0.4); polygon\_54 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 2.08), (6.92, 2.08), (6.92, 2.92), (6.08, 2.92)), fill\_opacity=0.4); polygon\_55 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 1.08), (5.92, 1.08), (5.92, 1.92), (5.08, 1.92)), fill\_opacity=0.4); polygon\_56 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 6.08), (4.92, 6.08), (4.92, 6.92), (4.08, 6.92)), fill\_opacity=0.4); polygon\_57 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 6.08), (5.92, 6.08), (5.92, 6.92), (5.08, 6.92)), fill\_opacity=0.4); polygon\_58 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 2.08), (7.92, 2.08), (7.92, 2.92), (7.08, 2.92)), fill\_opacity=0.4); polygon\_59 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 1.08), (6.92, 1.08), (6.92, 1.92), (6.08, 1.92)), fill\_opacity=0.4); polygon\_60 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 0.08), (5.92, 0.08), (5.92, 0.92), (5.08, 0.92)), fill\_opacity=0.4); polygon\_61 — a Polygon \[blue\] drawn in grid (vertices=((8.08, 2.08), (8.92, 2.08), (8.92, 2.92), (8.08, 2.92)), fill\_opacity=0.4); polygon\_62 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 3.08), (7.92, 3.08), (7.92, 3.92), (7.08, 3.92)), fill\_opacity=0.4); polygon\_63 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 1.08), (7.92, 1.08), (7.92, 1.92), (7.08, 1.92)), fill\_opacity=0.4); polygon\_64 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 0.08), (6.92, 0.08), (6.92, 0.92), (6.08, 0.92)), fill\_opacity=0.4); polygon\_65 — a Polygon \[blue\] drawn in grid (vertices=((9.08, 2.08), (9.92, 2.08), (9.92, 2.92), (9.08, 2.92)), fill\_opacity=0.4); polygon\_66 — a Polygon \[blue\] drawn in grid (vertices=((8.08, 3.08), (8.92, 3.08), (8.92, 3.92), (8.08, 3.92)), fill\_opacity=0.4); polygon\_67 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 4.08), (7.92, 4.08), (7.92, 4.92), (7.08, 4.92)), fill\_opacity=0.4); polygon\_68 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 0.08), (7.92, 0.08), (7.92, 0.92), (7.08, 0.92)), fill\_opacity=0.4); route — a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(2.5, 3.5)); route\_2 — a Line \[green\] drawn in grid (start=(2.5, 3.5), end=(3.5, 3.5)); route\_3 — a Line \[green\] drawn in grid (start=(3.5, 3.5), end=(4.5, 3.5)); route\_4 — a Line \[green\] drawn in grid (start=(4.5, 3.5), end=(5.5, 3.5)); route\_5 — a Line \[green\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5)); route\_6 — a Line \[green\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5)); route\_7 — a Line \[green\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5)); route\_8 — a Line \[green\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5)); route\_9 — a Line \[green\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5)); route\_10 — a Line \[green\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5)); count — a Math \[text\] that says "$upright("expanded") = 49$"; verdict — a Text \[text\] that says "Ranking by $g$ alone contains no preference for any direction."; closing — a Heading that says "The Cost of Having No Direction"

Actions:
- [04:39.048](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=279.04833333333335): rule is indicated — a transient flash.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): closing is hidden from the screen — left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): count is hidden from the screen — left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): grid is hidden from the screen — left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): lattice is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_2 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_3 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_4 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_5 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_6 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_7 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_8 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_9 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_10 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_11 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): start\_mark is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_12 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): goal\_mark is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_13 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_14 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_15 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_16 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_17 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_18 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_19 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_20 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_21 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_22 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_23 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_24 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_25 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_26 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_27 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_28 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_29 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_30 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_31 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_32 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_41 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_42 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_43 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_44 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_45 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_46 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_47 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_48 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_49 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_50 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_51 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_52 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_53 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_54 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_55 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_56 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_57 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_58 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_59 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_60 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_61 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_62 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_63 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_64 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_65 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_66 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_67 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): polygon\_68 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): route is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): route\_2 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): route\_3 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): route\_4 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): route\_5 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): route\_6 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): route\_7 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): route\_8 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): route\_9 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): route\_10 is hidden from the screen — grid left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): rule is hidden from the screen — left the board.
- [04:41.362](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=281.3623958333334): verdict is hidden from the screen — left the board.

### Scene 3: [The Estimate of What Remains](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.4040625)

Span: 04:42.404–07:8.03 (282.4040625s–428.0296041666667s).

#### Objects

- bound: a Math \[text\] that says "$h(n) \<= upright("true remaining cost")$"
- bound\_note: a Text \[text\] that says "Any route must take at least $Delta x$ horizontal and $Delta y$ vertical steps. Walls can only add more."
- col: a VariableNumber (initial\_value=2.0)
- cost\_at: a Math \[text\] that says "$g(n) = 6$"
- cost\_route: a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(1.5, 4.5))
- cost\_route\_2: a Line \[green\] drawn in grid (start=(1.5, 4.5), end=(2.5, 4.5))
- cost\_route\_3: a Line \[green\] drawn in grid (start=(2.5, 4.5), end=(3.5, 4.5))
- cost\_route\_4: a Line \[green\] drawn in grid (start=(3.5, 4.5), end=(4.5, 4.5))
- cost\_route\_5: a Line \[green\] drawn in grid (start=(4.5, 4.5), end=(4.5, 5.5))
- cost\_route\_6: a Line \[green\] drawn in grid (start=(4.5, 5.5), end=(5.5, 5.5))
- est\_at: a Math \[text\] that says "$h(n) = 6$"
- estimate: a VariableNumber (initial\_value=9.0, format\_spec='.0f')
- goal\_mark: a Math \[text\] that says "$G$" drawn in grid
- grid: a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0))
- h\_def: a Math \[text\] that says "$h(n) = Delta x + Delta y$"
- h\_panel: a Panel that says "$Delta x$ and $Delta y$ are the horizontal and vertical separations from the cell to the goal. Walls are ignored."
- head\_adm: a Heading that says "The Estimate Never Overshoots"
- head\_est: a Heading that says "An Estimate That Costs Nothing"
- head\_sum: a Heading that says "What the Sum Rules Out"
- lattice: a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0)
- leg\_across: a Line \[magenta\] drawn in grid (start=((col + 0.5), (row + 0.5)), end=(9.5, (row + 0.5)), dashed=True)
- leg\_up: a Line \[magenta\] drawn in grid (start=(9.5, (row + 0.5)), end=(9.5, 3.5), dashed=True)
- polygon: a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85)
- polygon\_10: a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85)
- polygon\_11: a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7)
- polygon\_12: a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7)
- polygon\_2: a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85)
- polygon\_3: a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85)
- polygon\_4: a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85)
- polygon\_5: a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85)
- polygon\_6: a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85)
- polygon\_7: a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85)
- polygon\_8: a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85)
- polygon\_9: a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85)
- probe: a Polygon \[blue\] drawn in grid (vertices=(((col + 0.08), (row + 0.08)), ((col + 0.92), (row + 0.08)), ((…, fill\_opacity=0.55)
- reading: a Point \[magenta\] labelled "h = 9" drawn in grid (location=((col + 0.5), \<VariableNumber row = 5.0\>), show\_marker=False)
- row: a VariableNumber (initial\_value=1.0)
- start\_mark: a Math \[text\] that says "$S$" drawn in grid
- total\_at: a Math \[text\] that says "$f(n) = 12$"
- true\_route: a Line \[yellow\] drawn in grid (start=(5.5, 5.5), end=(5.5, 4.5))
- true\_route\_2: a Line \[yellow\] drawn in grid (start=(5.5, 4.5), end=(5.5, 3.5))
- true\_route\_3: a Line \[yellow\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5))
- true\_route\_4: a Line \[yellow\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5))
- true\_route\_5: a Line \[yellow\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5))
- true\_route\_6: a Line \[yellow\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5))
- true\_route\_7: a Line \[yellow\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5))
- true\_route\_8: a Line \[yellow\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5))
- verdict: a Text \[text\] that says "A cell with $f(n) = 12$ cannot lie on a route costing 10."

#### Beats

##### [04:42.404](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.4040625)

Narration: The missing term is an estimate of the cost that remains. For every cell we want a number saying, without any searching, roughly how far the goal still is.

Board: Empty.

Actions:
- [04:42.404](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.4040625): head\_est is shown on the screen, written out.
- [04:42.404](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.4040625): grid is shown on the screen, written out.
- [04:42.404](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.4040625): lattice is shown on the screen, written out.
- [04:42.404](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.4040625): polygon is shown on the screen, written out.
- [04:42.446](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.4460625): polygon\_2 is shown on the screen, written out.
- [04:42.479](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.47906692477875): polygon\_3 is shown on the screen, written out.
- [04:42.494](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.49408019911505): polygon\_4 is shown on the screen, written out.
- [04:42.509](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.50909347345134): polygon\_5 is shown on the screen, written out.
- [04:42.524](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.52410674778764): polygon\_6 is shown on the screen, written out.
- [04:42.539](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.5391200221239): polygon\_7 is shown on the screen, written out.
- [04:42.554](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.5541332964602): polygon\_8 is shown on the screen, written out.
- [04:42.569](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.5691465707965): polygon\_9 is shown on the screen, written out.
- [04:42.584](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=282.5841598451328): polygon\_10 is shown on the screen, written out.
- [04:50.101](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=290.1010625): polygon\_11 is shown on the screen, written out.
- [04:50.101](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=290.1010625): start\_mark is shown on the screen, written out.
- [04:50.101](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=290.1010625): polygon\_12 is shown on the screen, written out.
- [04:50.101](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=290.1010625): goal\_mark is shown on the screen, written out.

##### [04:51.99](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=291.9900625)

Narration: Here is the estimate this lecture uses. Ignore the walls completely. Count the horizontal separation between the cell and the goal, count the vertical separation, and add the two. That is the Manhattan distance.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); head\_est — a Heading that says "An Estimate That Costs Nothing"; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid

Actions:
- [04:55.125](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=295.1250625): grid moves to a new place on the board.
- [04:55.125](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=295.1250625): h\_panel is shown on the screen, written out.
- [05:2.346](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=302.3460625): h\_def is shown on the screen, written out.

##### [05:6.499](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=306.49906250000004)

Narration: Take this cell. It is seven columns and two rows from the goal, so the estimate is nine.

Board: h\_panel — a Panel that says "$Delta x$ and $Delta y$ are the horizontal and vertical separations from the cell to the goal. Walls are ignored."; h\_def — a Math \[text\] that says "$h(n) = Delta x + Delta y$"; grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); head\_est — a Heading that says "An Estimate That Costs Nothing"; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid

Actions:
- [05:6.847](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=306.8470625): probe is shown on the screen, written out.
- [05:6.847](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=306.8470625): leg\_across is shown on the screen, written out.
- [05:6.847](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=306.8470625): leg\_up is shown on the screen, written out.
- [05:12.141](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=312.14106250000003): reading is shown on the screen, written out.

##### [05:13.658](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=313.6580625)

Narration: Move the cell and the number follows. Here it is six.

Board: h\_panel — a Panel that says "$Delta x$ and $Delta y$ are the horizontal and vertical separations from the cell to the goal. Walls are ignored."; h\_def — a Math \[text\] that says "$h(n) = Delta x + Delta y$"; grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); head\_est — a Heading that says "An Estimate That Costs Nothing"; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; probe — a Polygon \[blue\] drawn in grid (vertices=(((col + 0.08), (row + 0.08)), ((col + 0.92), (row + 0.08)), ((…, fill\_opacity=0.55); leg\_across — a Line \[magenta\] drawn in grid (start=((col + 0.5), (row + 0.5)), end=(9.5, (row + 0.5)), dashed=True); leg\_up — a Line \[magenta\] drawn in grid (start=(9.5, (row + 0.5)), end=(9.5, 3.5), dashed=True); reading — a Point \[magenta\] labelled "h = 9" drawn in grid (location=((col + 0.5), \<VariableNumber row = 5.0\>), show\_marker=False)

Actions:
- [05:14.134](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=314.1340625): probe is redrawn as the numbers it depends on change.
- [05:14.134](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=314.1340625): leg\_across is redrawn as the numbers it depends on change.
- [05:14.134](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=314.1340625): reading is redrawn as the numbers it depends on change.
- [05:14.134](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=314.1340625): col ticks to 5.0.
- [05:14.134](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=314.1340625): estimate ticks to 6.0.

##### [05:18.711](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=318.71056250000004)

Narration: Nearer the goal, it is two. And computing it costs two subtractions and an addition: no search, no queue, no walls consulted.

Board: Unchanged from the preceding beat in this scene.

Actions:
- [05:18.902](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=318.9020625): probe is redrawn as the numbers it depends on change.
- [05:18.902](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=318.9020625): leg\_across is redrawn as the numbers it depends on change.
- [05:18.902](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=318.9020625): leg\_up is redrawn as the numbers it depends on change.
- [05:18.902](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=318.9020625): reading is redrawn as the numbers it depends on change.
- [05:18.902](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=318.9020625): col ticks to 8.0.
- [05:18.902](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=318.9020625): row ticks to 4.0.
- [05:18.902](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=318.9020625): estimate ticks to 2.0.
- [05:28.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=328.39356250000003): h\_def is hidden from the screen — left the board.
- [05:28.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=328.39356250000003): h\_panel is hidden from the screen — left the board.
- [05:28.394](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=328.39356250000003): head\_est is hidden from the screen — left the board.

##### [05:29.194](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=329.1935625)

Narration: The estimate ignores walls, and that has a consequence worth seeing. Move the cell here.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; probe — a Polygon \[blue\] drawn in grid (vertices=(((col + 0.08), (row + 0.08)), ((col + 0.92), (row + 0.08)), ((…, fill\_opacity=0.55); leg\_across — a Line \[magenta\] drawn in grid (start=((col + 0.5), (row + 0.5)), end=(9.5, (row + 0.5)), dashed=True); leg\_up — a Line \[magenta\] drawn in grid (start=(9.5, (row + 0.5)), end=(9.5, 3.5), dashed=True); reading — a Point \[magenta\] labelled "h = 9" drawn in grid (location=((col + 0.5), \<VariableNumber row = 5.0\>), show\_marker=False)

Actions:
- [05:29.194](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=329.1935625): head\_adm is shown on the screen, written out.
- [05:35.121](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=335.1210625): probe is redrawn as the numbers it depends on change.
- [05:35.121](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=335.1210625): leg\_across is redrawn as the numbers it depends on change.
- [05:35.121](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=335.1210625): leg\_up is redrawn as the numbers it depends on change.
- [05:35.121](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=335.1210625): reading is redrawn as the numbers it depends on change.
- [05:35.121](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=335.1210625): col ticks to 5.0.
- [05:35.121](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=335.1210625): row ticks to 5.0.
- [05:35.121](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=335.1210625): estimate ticks to 6.0.

##### [05:36.464](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=336.4635625)

Narration: The estimate is six: four columns across and two rows down. But look where the dashed figure runs. It goes straight through this wall, and no route can follow it.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; probe — a Polygon \[blue\] drawn in grid (vertices=(((col + 0.08), (row + 0.08)), ((col + 0.92), (row + 0.08)), ((…, fill\_opacity=0.55); leg\_across — a Line \[magenta\] drawn in grid (start=((col + 0.5), (row + 0.5)), end=(9.5, (row + 0.5)), dashed=True); leg\_up — a Line \[magenta\] drawn in grid (start=(9.5, (row + 0.5)), end=(9.5, 3.5), dashed=True); reading — a Point \[magenta\] labelled "h = 9" drawn in grid (location=((col + 0.5), \<VariableNumber row = 5.0\>), show\_marker=False); head\_adm — a Heading that says "The Estimate Never Overshoots"

Actions:
- [05:44.509](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=344.5090625): polygon\_7 is indicated — a transient flash.

##### [05:47.025](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=347.0250625)

Narration: The true remaining cost is eight, not six. A route has to come down to this row, pass the barrier, and climb back up to G.

Board: Unchanged from the preceding beat in this scene.

Actions:
- [05:50.833](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=350.8330625): true\_route is shown on the screen, written out.
- [05:50.965](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=350.96510712531574): true\_route\_2 is shown on the screen, written out.
- [05:51.102](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=351.1023379701095): true\_route\_3 is shown on the screen, written out.
- [05:51.31](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=351.30972570516417): true\_route\_4 is shown on the screen, written out.
- [05:51.449](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=351.44893470507066): true\_route\_5 is shown on the screen, written out.
- [05:51.583](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=351.5830945516419): true\_route\_6 is shown on the screen, written out.
- [05:51.722](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=351.72183246912715): true\_route\_7 is shown on the screen, written out.
- [05:51.866](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=351.86599413064835): true\_route\_8 is shown on the screen, written out.

##### [05:56.425](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=356.4250625)

Narration: So the estimate falls short of the truth, and that is precisely the property we want. An estimate that never exceeds the true remaining cost is called admissible.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; probe — a Polygon \[blue\] drawn in grid (vertices=(((col + 0.08), (row + 0.08)), ((col + 0.92), (row + 0.08)), ((…, fill\_opacity=0.55); leg\_across — a Line \[magenta\] drawn in grid (start=((col + 0.5), (row + 0.5)), end=(9.5, (row + 0.5)), dashed=True); leg\_up — a Line \[magenta\] drawn in grid (start=(9.5, (row + 0.5)), end=(9.5, 3.5), dashed=True); reading — a Point \[magenta\] labelled "h = 9" drawn in grid (location=((col + 0.5), \<VariableNumber row = 5.0\>), show\_marker=False); head\_adm — a Heading that says "The Estimate Never Overshoots"; true\_route — a Line \[yellow\] drawn in grid (start=(5.5, 5.5), end=(5.5, 4.5)); true\_route\_2 — a Line \[yellow\] drawn in grid (start=(5.5, 4.5), end=(5.5, 3.5)); true\_route\_3 — a Line \[yellow\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5)); true\_route\_4 — a Line \[yellow\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5)); true\_route\_5 — a Line \[yellow\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5)); true\_route\_6 — a Line \[yellow\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5)); true\_route\_7 — a Line \[yellow\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5)); true\_route\_8 — a Line \[yellow\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5))

Actions:
- [06:0.164](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=360.1640625): bound is shown on the screen, written out.

##### [06:6.929](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=366.9290625)

Narration: The Manhattan estimate is admissible on this grid, because any route must make at least the horizontal steps and at least the vertical steps that separate the cell from the goal, and walls can only force it to make more. Admissibility is what will let us keep the optimality that Dijkstra's algorithm gave us.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; probe — a Polygon \[blue\] drawn in grid (vertices=(((col + 0.08), (row + 0.08)), ((col + 0.92), (row + 0.08)), ((…, fill\_opacity=0.55); leg\_across — a Line \[magenta\] drawn in grid (start=((col + 0.5), (row + 0.5)), end=(9.5, (row + 0.5)), dashed=True); leg\_up — a Line \[magenta\] drawn in grid (start=(9.5, (row + 0.5)), end=(9.5, 3.5), dashed=True); reading — a Point \[magenta\] labelled "h = 9" drawn in grid (location=((col + 0.5), \<VariableNumber row = 5.0\>), show\_marker=False); bound — a Math \[text\] that says "$h(n) \<= upright("true remaining cost")$"; head\_adm — a Heading that says "The Estimate Never Overshoots"; true\_route — a Line \[yellow\] drawn in grid (start=(5.5, 5.5), end=(5.5, 4.5)); true\_route\_2 — a Line \[yellow\] drawn in grid (start=(5.5, 4.5), end=(5.5, 3.5)); true\_route\_3 — a Line \[yellow\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5)); true\_route\_4 — a Line \[yellow\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5)); true\_route\_5 — a Line \[yellow\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5)); true\_route\_6 — a Line \[yellow\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5)); true\_route\_7 — a Line \[yellow\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5)); true\_route\_8 — a Line \[yellow\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5))

Actions:
- [06:10.481](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=370.4810625): bound\_note is shown on the screen, written out.
- [06:24.53](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=384.5300625): bound is hidden from the screen — left the board.
- [06:24.53](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=384.5300625): bound\_note is hidden from the screen — left the board.
- [06:24.53](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=384.5300625): head\_adm is hidden from the screen — left the board.

##### [06:25.13](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=385.1300625)

Narration: Now put both costs together at this cell. The cheapest route the search can trace from S to it costs six steps, so g is six. The estimate ahead is six as well, so f is twelve.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; probe — a Polygon \[blue\] drawn in grid (vertices=(((col + 0.08), (row + 0.08)), ((col + 0.92), (row + 0.08)), ((…, fill\_opacity=0.55); leg\_across — a Line \[magenta\] drawn in grid (start=((col + 0.5), (row + 0.5)), end=(9.5, (row + 0.5)), dashed=True); leg\_up — a Line \[magenta\] drawn in grid (start=(9.5, (row + 0.5)), end=(9.5, 3.5), dashed=True); reading — a Point \[magenta\] labelled "h = 9" drawn in grid (location=((col + 0.5), \<VariableNumber row = 5.0\>), show\_marker=False); true\_route — a Line \[yellow\] drawn in grid (start=(5.5, 5.5), end=(5.5, 4.5)); true\_route\_2 — a Line \[yellow\] drawn in grid (start=(5.5, 4.5), end=(5.5, 3.5)); true\_route\_3 — a Line \[yellow\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5)); true\_route\_4 — a Line \[yellow\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5)); true\_route\_5 — a Line \[yellow\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5)); true\_route\_6 — a Line \[yellow\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5)); true\_route\_7 — a Line \[yellow\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5)); true\_route\_8 — a Line \[yellow\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5))

Actions:
- [06:25.13](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=385.1300625): head\_sum is shown on the screen, written out.
- [06:29.356](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=389.3560625): cost\_route is shown on the screen, written out.
- [06:29.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=389.539539624183): cost\_route\_2 is shown on the screen, written out.
- [06:29.724](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=389.72375975490195): cost\_route\_3 is shown on the screen, written out.
- [06:29.933](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=389.93296250000003): cost\_route\_4 is shown on the screen, written out.
- [06:30.22](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=390.2202781862745): cost\_route\_5 is shown on the screen, written out.
- [06:30.643](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=390.64255269607844): cost\_route\_6 is shown on the screen, written out.
- [06:32.618](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=392.6180625): cost\_at is shown on the screen, written out.
- [06:33.999](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=393.99906250000004): est\_at is shown on the screen, written out.
- [06:36.275](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=396.2750625): total\_at is shown on the screen, written out.

##### [06:37.711](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=397.7110625)

Narration: Notice that twelve is not the true cost of the best route through this cell. In green and yellow together, that route is fourteen steps. Twelve is a lower bound on it, and a lower bound is all we need: twelve already exceeds ten, and a ten-step route exists.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; probe — a Polygon \[blue\] drawn in grid (vertices=(((col + 0.08), (row + 0.08)), ((col + 0.92), (row + 0.08)), ((…, fill\_opacity=0.55); leg\_across — a Line \[magenta\] drawn in grid (start=((col + 0.5), (row + 0.5)), end=(9.5, (row + 0.5)), dashed=True); leg\_up — a Line \[magenta\] drawn in grid (start=(9.5, (row + 0.5)), end=(9.5, 3.5), dashed=True); reading — a Point \[magenta\] labelled "h = 9" drawn in grid (location=((col + 0.5), \<VariableNumber row = 5.0\>), show\_marker=False); true\_route — a Line \[yellow\] drawn in grid (start=(5.5, 5.5), end=(5.5, 4.5)); true\_route\_2 — a Line \[yellow\] drawn in grid (start=(5.5, 4.5), end=(5.5, 3.5)); true\_route\_3 — a Line \[yellow\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5)); true\_route\_4 — a Line \[yellow\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5)); true\_route\_5 — a Line \[yellow\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5)); true\_route\_6 — a Line \[yellow\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5)); true\_route\_7 — a Line \[yellow\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5)); true\_route\_8 — a Line \[yellow\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5)); cost\_at — a Math \[text\] that says "$g(n) = 6$"; est\_at — a Math \[text\] that says "$h(n) = 6$"; total\_at — a Math \[text\] that says "$f(n) = 12$"; head\_sum — a Heading that says "What the Sum Rules Out"; cost\_route — a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(1.5, 4.5)); cost\_route\_2 — a Line \[green\] drawn in grid (start=(1.5, 4.5), end=(2.5, 4.5)); cost\_route\_3 — a Line \[green\] drawn in grid (start=(2.5, 4.5), end=(3.5, 4.5)); cost\_route\_4 — a Line \[green\] drawn in grid (start=(3.5, 4.5), end=(4.5, 4.5)); cost\_route\_5 — a Line \[green\] drawn in grid (start=(4.5, 4.5), end=(4.5, 5.5)); cost\_route\_6 — a Line \[green\] drawn in grid (start=(4.5, 5.5), end=(5.5, 5.5))

Actions:
- [06:47.37](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=407.3700625): total\_at is indicated — a transient flash.
- [06:51.399](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=411.3990625): verdict is shown on the screen, written out.
- [06:53.686](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=413.68606250000005): A box is drawn around total\_at.

##### [06:55.32](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=415.3195625)

Narration: So this cell can be discarded without ever being expanded. That is the mechanism: g rules out nothing, h rules out nothing, and their sum rules out most of the maze.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; probe — a Polygon \[blue\] drawn in grid (vertices=(((col + 0.08), (row + 0.08)), ((col + 0.92), (row + 0.08)), ((…, fill\_opacity=0.55); leg\_across — a Line \[magenta\] drawn in grid (start=((col + 0.5), (row + 0.5)), end=(9.5, (row + 0.5)), dashed=True); leg\_up — a Line \[magenta\] drawn in grid (start=(9.5, (row + 0.5)), end=(9.5, 3.5), dashed=True); reading — a Point \[magenta\] labelled "h = 9" drawn in grid (location=((col + 0.5), \<VariableNumber row = 5.0\>), show\_marker=False); true\_route — a Line \[yellow\] drawn in grid (start=(5.5, 5.5), end=(5.5, 4.5)); true\_route\_2 — a Line \[yellow\] drawn in grid (start=(5.5, 4.5), end=(5.5, 3.5)); true\_route\_3 — a Line \[yellow\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5)); true\_route\_4 — a Line \[yellow\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5)); true\_route\_5 — a Line \[yellow\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5)); true\_route\_6 — a Line \[yellow\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5)); true\_route\_7 — a Line \[yellow\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5)); true\_route\_8 — a Line \[yellow\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5)); cost\_at — a Math \[text\] that says "$g(n) = 6$"; est\_at — a Math \[text\] that says "$h(n) = 6$"; total\_at — a Math \[text\] that says "$f(n) = 12$"; verdict — a Text \[text\] that says "A cell with $f(n) = 12$ cannot lie on a route costing 10."; head\_sum — a Heading that says "What the Sum Rules Out"; cost\_route — a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(1.5, 4.5)); cost\_route\_2 — a Line \[green\] drawn in grid (start=(1.5, 4.5), end=(2.5, 4.5)); cost\_route\_3 — a Line \[green\] drawn in grid (start=(2.5, 4.5), end=(3.5, 4.5)); cost\_route\_4 — a Line \[green\] drawn in grid (start=(3.5, 4.5), end=(4.5, 4.5)); cost\_route\_5 — a Line \[green\] drawn in grid (start=(4.5, 4.5), end=(4.5, 5.5)); cost\_route\_6 — a Line \[green\] drawn in grid (start=(4.5, 5.5), end=(5.5, 5.5))

Actions:
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): cost\_at is hidden from the screen — left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): est\_at is hidden from the screen — left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): grid is hidden from the screen — left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): lattice is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): polygon is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): polygon\_2 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): polygon\_3 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): polygon\_4 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): polygon\_5 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): polygon\_6 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): polygon\_7 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): polygon\_8 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): polygon\_9 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): polygon\_10 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): polygon\_11 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): start\_mark is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): polygon\_12 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): goal\_mark is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): probe is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): leg\_across is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): leg\_up is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): reading is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): true\_route is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): true\_route\_2 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): true\_route\_3 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): true\_route\_4 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): true\_route\_5 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): true\_route\_6 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): true\_route\_7 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): true\_route\_8 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): cost\_route is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): cost\_route\_2 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): cost\_route\_3 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): cost\_route\_4 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): cost\_route\_5 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): cost\_route\_6 is hidden from the screen — grid left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): head\_sum is hidden from the screen — left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): total\_at is hidden from the screen — left the board.
- [07:6.988](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=426.9879375): verdict is hidden from the screen — left the board.

### Scene 4: [The Informed Frontier](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.0296041666667)

Span: 07:8.03–10:38.939 (428.0296041666667s–638.93875s).

#### Objects

- blind: a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0))
- blind\_goal\_mark: a Math \[text\] that says "$G$" drawn in blind
- blind\_label: a Tex \[text\] that says "Ranked by $g$: 49 cells expanded"
- blind\_lattice: a Gridlines \[gray\] drawn in blind (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0)
- blind\_start\_mark: a Math \[text\] that says "$S$" drawn in blind
- goal\_mark: a Math \[text\] that says "$G$" drawn in grid
- grid: a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0))
- head\_close: a Heading that says "What to Carry Away"
- head\_cmp: a Heading that says "The Same Route, Different Work"
- head\_more: a Heading that says "Where the Frontier Goes"
- head\_queue: a Heading that says "One Comparison in the Queue"
- head\_run: a Heading that says "Ranking by Cost Plus Estimate"
- lattice: a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0)
- point\_one: a Text \[text\] that says "1. $g$ is measured, $h$ is estimated, and $f$ is the only number compared."
- point\_three: a Text \[text\] that says "3. $h = 0$ gives Dijkstra; a sharper $h$ narrows the expanded region."
- point\_two: a Text \[text\] that says "2. An admissible $h$ never overshoots, so the route stays optimal."
- polygon: a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85)
- polygon\_10: a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85)
- polygon\_11: a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7)
- polygon\_12: a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7)
- polygon\_13: a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4)
- polygon\_14: a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4)
- polygon\_15: a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4)
- polygon\_16: a Polygon \[blue\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4)
- polygon\_17: a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.4)
- polygon\_18: a Polygon \[blue\] drawn in grid (vertices=((6.08, 2.08), (6.92, 2.08), (6.92, 2.92), (6.08, 2.92)), fill\_opacity=0.4)
- polygon\_19: a Polygon \[blue\] drawn in grid (vertices=((7.08, 2.08), (7.92, 2.08), (7.92, 2.92), (7.08, 2.92)), fill\_opacity=0.4)
- polygon\_2: a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85)
- polygon\_20: a Polygon \[blue\] drawn in grid (vertices=((7.08, 3.08), (7.92, 3.08), (7.92, 3.92), (7.08, 3.92)), fill\_opacity=0.4)
- polygon\_21: a Polygon \[blue\] drawn in grid (vertices=((8.08, 3.08), (8.92, 3.08), (8.92, 3.92), (8.08, 3.92)), fill\_opacity=0.4)
- polygon\_22: a Polygon \[yellow\] drawn in grid (vertices=((0.08, 3.08), (0.92, 3.08), (0.92, 3.92), (0.08, 3.92)), fill\_opacity=0.35)
- polygon\_23: a Polygon \[yellow\] drawn in grid (vertices=((1.08, 2.08), (1.92, 2.08), (1.92, 2.92), (1.08, 2.92)), fill\_opacity=0.35)
- polygon\_24: a Polygon \[yellow\] drawn in grid (vertices=((1.08, 4.08), (1.92, 4.08), (1.92, 4.92), (1.08, 4.92)), fill\_opacity=0.35)
- polygon\_25: a Polygon \[yellow\] drawn in grid (vertices=((2.08, 2.08), (2.92, 2.08), (2.92, 2.92), (2.08, 2.92)), fill\_opacity=0.35)
- polygon\_26: a Polygon \[yellow\] drawn in grid (vertices=((2.08, 4.08), (2.92, 4.08), (2.92, 4.92), (2.08, 4.92)), fill\_opacity=0.35)
- polygon\_27: a Polygon \[yellow\] drawn in grid (vertices=((3.08, 2.08), (3.92, 2.08), (3.92, 2.92), (3.08, 2.92)), fill\_opacity=0.35)
- polygon\_28: a Polygon \[yellow\] drawn in grid (vertices=((3.08, 4.08), (3.92, 4.08), (3.92, 4.92), (3.08, 4.92)), fill\_opacity=0.35)
- polygon\_29: a Polygon \[yellow\] drawn in grid (vertices=((4.08, 2.08), (4.92, 2.08), (4.92, 2.92), (4.08, 2.92)), fill\_opacity=0.35)
- polygon\_3: a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85)
- polygon\_30: a Polygon \[yellow\] drawn in grid (vertices=((4.08, 4.08), (4.92, 4.08), (4.92, 4.92), (4.08, 4.92)), fill\_opacity=0.35)
- polygon\_31: a Polygon \[yellow\] drawn in grid (vertices=((5.08, 1.08), (5.92, 1.08), (5.92, 1.92), (5.08, 1.92)), fill\_opacity=0.35)
- polygon\_32: a Polygon \[yellow\] drawn in grid (vertices=((5.08, 4.08), (5.92, 4.08), (5.92, 4.92), (5.08, 4.92)), fill\_opacity=0.35)
- polygon\_33: a Polygon \[yellow\] drawn in grid (vertices=((6.08, 1.08), (6.92, 1.08), (6.92, 1.92), (6.08, 1.92)), fill\_opacity=0.35)
- polygon\_34: a Polygon \[yellow\] drawn in grid (vertices=((7.08, 1.08), (7.92, 1.08), (7.92, 1.92), (7.08, 1.92)), fill\_opacity=0.35)
- polygon\_35: a Polygon \[yellow\] drawn in grid (vertices=((7.08, 4.08), (7.92, 4.08), (7.92, 4.92), (7.08, 4.92)), fill\_opacity=0.35)
- polygon\_36: a Polygon \[yellow\] drawn in grid (vertices=((8.08, 2.08), (8.92, 2.08), (8.92, 2.92), (8.08, 2.92)), fill\_opacity=0.35)
- polygon\_37: a Polygon \[yellow\] drawn in grid (vertices=((8.08, 4.08), (8.92, 4.08), (8.92, 4.92), (8.08, 4.92)), fill\_opacity=0.35)
- polygon\_38: a Polygon \[gray\] drawn in blind (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85)
- polygon\_39: a Polygon \[gray\] drawn in blind (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85)
- polygon\_4: a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85)
- polygon\_40: a Polygon \[gray\] drawn in blind (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85)
- polygon\_41: a Polygon \[gray\] drawn in blind (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85)
- polygon\_42: a Polygon \[gray\] drawn in blind (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85)
- polygon\_43: a Polygon \[gray\] drawn in blind (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85)
- polygon\_44: a Polygon \[gray\] drawn in blind (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85)
- polygon\_45: a Polygon \[gray\] drawn in blind (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85)
- polygon\_46: a Polygon \[gray\] drawn in blind (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85)
- polygon\_47: a Polygon \[gray\] drawn in blind (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85)
- polygon\_48: a Polygon \[green\] drawn in blind (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7)
- polygon\_49: a Polygon \[red\] drawn in blind (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7)
- polygon\_5: a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85)
- polygon\_50: a Polygon \[blue\] drawn in blind (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4)
- polygon\_51: a Polygon \[blue\] drawn in blind (vertices=((0.08, 3.08), (0.92, 3.08), (0.92, 3.92), (0.08, 3.92)), fill\_opacity=0.4)
- polygon\_52: a Polygon \[blue\] drawn in blind (vertices=((1.08, 4.08), (1.92, 4.08), (1.92, 4.92), (1.08, 4.92)), fill\_opacity=0.4)
- polygon\_53: a Polygon \[blue\] drawn in blind (vertices=((1.08, 2.08), (1.92, 2.08), (1.92, 2.92), (1.08, 2.92)), fill\_opacity=0.4)
- polygon\_54: a Polygon \[blue\] drawn in blind (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4)
- polygon\_55: a Polygon \[blue\] drawn in blind (vertices=((2.08, 4.08), (2.92, 4.08), (2.92, 4.92), (2.08, 4.92)), fill\_opacity=0.4)
- polygon\_56: a Polygon \[blue\] drawn in blind (vertices=((2.08, 2.08), (2.92, 2.08), (2.92, 2.92), (2.08, 2.92)), fill\_opacity=0.4)
- polygon\_57: a Polygon \[blue\] drawn in blind (vertices=((0.08, 4.08), (0.92, 4.08), (0.92, 4.92), (0.08, 4.92)), fill\_opacity=0.4)
- polygon\_58: a Polygon \[blue\] drawn in blind (vertices=((0.08, 2.08), (0.92, 2.08), (0.92, 2.92), (0.08, 2.92)), fill\_opacity=0.4)
- polygon\_59: a Polygon \[blue\] drawn in blind (vertices=((1.08, 5.08), (1.92, 5.08), (1.92, 5.92), (1.08, 5.92)), fill\_opacity=0.4)
- polygon\_6: a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85)
- polygon\_60: a Polygon \[blue\] drawn in blind (vertices=((1.08, 1.08), (1.92, 1.08), (1.92, 1.92), (1.08, 1.92)), fill\_opacity=0.4)
- polygon\_61: a Polygon \[blue\] drawn in blind (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4)
- polygon\_62: a Polygon \[blue\] drawn in blind (vertices=((3.08, 4.08), (3.92, 4.08), (3.92, 4.92), (3.08, 4.92)), fill\_opacity=0.4)
- polygon\_63: a Polygon \[blue\] drawn in blind (vertices=((3.08, 2.08), (3.92, 2.08), (3.92, 2.92), (3.08, 2.92)), fill\_opacity=0.4)
- polygon\_64: a Polygon \[blue\] drawn in blind (vertices=((2.08, 5.08), (2.92, 5.08), (2.92, 5.92), (2.08, 5.92)), fill\_opacity=0.4)
- polygon\_65: a Polygon \[blue\] drawn in blind (vertices=((2.08, 1.08), (2.92, 1.08), (2.92, 1.92), (2.08, 1.92)), fill\_opacity=0.4)
- polygon\_66: a Polygon \[blue\] drawn in blind (vertices=((0.08, 5.08), (0.92, 5.08), (0.92, 5.92), (0.08, 5.92)), fill\_opacity=0.4)
- polygon\_67: a Polygon \[blue\] drawn in blind (vertices=((0.08, 1.08), (0.92, 1.08), (0.92, 1.92), (0.08, 1.92)), fill\_opacity=0.4)
- polygon\_68: a Polygon \[blue\] drawn in blind (vertices=((1.08, 6.08), (1.92, 6.08), (1.92, 6.92), (1.08, 6.92)), fill\_opacity=0.4)
- polygon\_69: a Polygon \[blue\] drawn in blind (vertices=((1.08, 0.08), (1.92, 0.08), (1.92, 0.92), (1.08, 0.92)), fill\_opacity=0.4)
- polygon\_7: a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85)
- polygon\_70: a Polygon \[blue\] drawn in blind (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4)
- polygon\_71: a Polygon \[blue\] drawn in blind (vertices=((4.08, 4.08), (4.92, 4.08), (4.92, 4.92), (4.08, 4.92)), fill\_opacity=0.4)
- polygon\_72: a Polygon \[blue\] drawn in blind (vertices=((4.08, 2.08), (4.92, 2.08), (4.92, 2.92), (4.08, 2.92)), fill\_opacity=0.4)
- polygon\_73: a Polygon \[blue\] drawn in blind (vertices=((3.08, 1.08), (3.92, 1.08), (3.92, 1.92), (3.08, 1.92)), fill\_opacity=0.4)
- polygon\_74: a Polygon \[blue\] drawn in blind (vertices=((2.08, 6.08), (2.92, 6.08), (2.92, 6.92), (2.08, 6.92)), fill\_opacity=0.4)
- polygon\_75: a Polygon \[blue\] drawn in blind (vertices=((2.08, 0.08), (2.92, 0.08), (2.92, 0.92), (2.08, 0.92)), fill\_opacity=0.4)
- polygon\_76: a Polygon \[blue\] drawn in blind (vertices=((0.08, 6.08), (0.92, 6.08), (0.92, 6.92), (0.08, 6.92)), fill\_opacity=0.4)
- polygon\_77: a Polygon \[blue\] drawn in blind (vertices=((0.08, 0.08), (0.92, 0.08), (0.92, 0.92), (0.08, 0.92)), fill\_opacity=0.4)
- polygon\_78: a Polygon \[blue\] drawn in blind (vertices=((5.08, 4.08), (5.92, 4.08), (5.92, 4.92), (5.08, 4.92)), fill\_opacity=0.4)
- polygon\_79: a Polygon \[blue\] drawn in blind (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.4)
- polygon\_8: a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85)
- polygon\_80: a Polygon \[blue\] drawn in blind (vertices=((4.08, 5.08), (4.92, 5.08), (4.92, 5.92), (4.08, 5.92)), fill\_opacity=0.4)
- polygon\_81: a Polygon \[blue\] drawn in blind (vertices=((3.08, 0.08), (3.92, 0.08), (3.92, 0.92), (3.08, 0.92)), fill\_opacity=0.4)
- polygon\_82: a Polygon \[blue\] drawn in blind (vertices=((5.08, 5.08), (5.92, 5.08), (5.92, 5.92), (5.08, 5.92)), fill\_opacity=0.4)
- polygon\_83: a Polygon \[blue\] drawn in blind (vertices=((6.08, 2.08), (6.92, 2.08), (6.92, 2.92), (6.08, 2.92)), fill\_opacity=0.4)
- polygon\_84: a Polygon \[blue\] drawn in blind (vertices=((5.08, 1.08), (5.92, 1.08), (5.92, 1.92), (5.08, 1.92)), fill\_opacity=0.4)
- polygon\_85: a Polygon \[blue\] drawn in blind (vertices=((4.08, 6.08), (4.92, 6.08), (4.92, 6.92), (4.08, 6.92)), fill\_opacity=0.4)
- polygon\_86: a Polygon \[blue\] drawn in blind (vertices=((5.08, 6.08), (5.92, 6.08), (5.92, 6.92), (5.08, 6.92)), fill\_opacity=0.4)
- polygon\_87: a Polygon \[blue\] drawn in blind (vertices=((7.08, 2.08), (7.92, 2.08), (7.92, 2.92), (7.08, 2.92)), fill\_opacity=0.4)
- polygon\_88: a Polygon \[blue\] drawn in blind (vertices=((6.08, 1.08), (6.92, 1.08), (6.92, 1.92), (6.08, 1.92)), fill\_opacity=0.4)
- polygon\_89: a Polygon \[blue\] drawn in blind (vertices=((5.08, 0.08), (5.92, 0.08), (5.92, 0.92), (5.08, 0.92)), fill\_opacity=0.4)
- polygon\_9: a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85)
- polygon\_90: a Polygon \[blue\] drawn in blind (vertices=((8.08, 2.08), (8.92, 2.08), (8.92, 2.92), (8.08, 2.92)), fill\_opacity=0.4)
- polygon\_91: a Polygon \[blue\] drawn in blind (vertices=((7.08, 3.08), (7.92, 3.08), (7.92, 3.92), (7.08, 3.92)), fill\_opacity=0.4)
- polygon\_92: a Polygon \[blue\] drawn in blind (vertices=((7.08, 1.08), (7.92, 1.08), (7.92, 1.92), (7.08, 1.92)), fill\_opacity=0.4)
- polygon\_93: a Polygon \[blue\] drawn in blind (vertices=((6.08, 0.08), (6.92, 0.08), (6.92, 0.92), (6.08, 0.92)), fill\_opacity=0.4)
- polygon\_94: a Polygon \[blue\] drawn in blind (vertices=((9.08, 2.08), (9.92, 2.08), (9.92, 2.92), (9.08, 2.92)), fill\_opacity=0.4)
- polygon\_95: a Polygon \[blue\] drawn in blind (vertices=((8.08, 3.08), (8.92, 3.08), (8.92, 3.92), (8.08, 3.92)), fill\_opacity=0.4)
- polygon\_96: a Polygon \[blue\] drawn in blind (vertices=((7.08, 4.08), (7.92, 4.08), (7.92, 4.92), (7.08, 4.92)), fill\_opacity=0.4)
- polygon\_97: a Polygon \[blue\] drawn in blind (vertices=((7.08, 0.08), (7.92, 0.08), (7.92, 0.92), (7.08, 0.92)), fill\_opacity=0.4)
- queue: a Table \[text\] that says "reached cell $g$ $h$ $f$ towards $G$ 1 7 8 away from $G$ 1 9 10 above $S$ 1 9 10 below $S$ 1 9 10" (rows=(('reached cell', '$g$', '$h$', '$f$'), ('towards $G$', '1', '7…, header=True)
- route: a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(2.5, 3.5))
- route\_10: a Line \[green\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5))
- route\_2: a Line \[green\] drawn in grid (start=(2.5, 3.5), end=(3.5, 3.5))
- route\_3: a Line \[green\] drawn in grid (start=(3.5, 3.5), end=(4.5, 3.5))
- route\_4: a Line \[green\] drawn in grid (start=(4.5, 3.5), end=(5.5, 3.5))
- route\_5: a Line \[green\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5))
- route\_6: a Line \[green\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5))
- route\_7: a Line \[green\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5))
- route\_8: a Line \[green\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5))
- route\_9: a Line \[green\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5))
- rule\_star: a Tex \[text\] that says "Expand the reached cell of least $f(n) = g(n) + h(n)$."
- star\_label: a Tex \[text\] that says "Ranked by $g + h$: 11 cells expanded"
- star\_marks: a Math \[text\] that says "$8$" drawn in grid
- star\_marks\_2: a Math \[text\] that says "$8$" drawn in grid
- star\_marks\_3: a Math \[text\] that says "$8$" drawn in grid
- star\_marks\_4: a Math \[text\] that says "$8$" drawn in grid
- star\_marks\_5: a Math \[text\] that says "$10$" drawn in grid
- star\_marks\_6: a Math \[text\] that says "$10$" drawn in grid
- star\_marks\_7: a Math \[text\] that says "$10$" drawn in grid
- star\_marks\_8: a Math \[text\] that says "$10$" drawn in grid
- star\_marks\_9: a Math \[text\] that says "$10$" drawn in grid
- start\_mark: a Math \[text\] that says "$S$" drawn in grid
- total\_note: a Text \[text\] that says "With a consistent estimate, $f$ never decreases along a route."

#### Beats

##### [07:8.03](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.0296041666667)

Narration: Now the two terms together. One change to the rule: instead of expanding the reached cell of least g, A star search expands the reached cell of least f, where f is g plus h.

Board: Empty.

Actions:
- [07:8.03](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.0296041666667): head\_run is shown on the screen, written out.
- [07:8.03](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.0296041666667): grid is shown on the screen, written out.
- [07:8.03](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.0296041666667): lattice is shown on the screen, written out.
- [07:8.03](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.0296041666667): polygon is shown on the screen, written out.
- [07:8.064](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.0644041666667): polygon\_2 is shown on the screen, written out.
- [07:8.096](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.09610228249375): polygon\_3 is shown on the screen, written out.
- [07:8.122](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.1215966299749): polygon\_4 is shown on the screen, written out.
- [07:8.147](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.14709097745606): polygon\_5 is shown on the screen, written out.
- [07:8.173](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.1725853249372): polygon\_6 is shown on the screen, written out.
- [07:8.198](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.1980796724184): polygon\_7 is shown on the screen, written out.
- [07:8.224](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.2235740198995): polygon\_8 is shown on the screen, written out.
- [07:8.249](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.2490683673807): polygon\_9 is shown on the screen, written out.
- [07:8.275](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.2745627148618): polygon\_10 is shown on the screen, written out.
- [07:8.275](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.2745627148618): polygon\_11 is shown on the screen, written out.
- [07:8.275](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.2745627148618): start\_mark is shown on the screen, written out.
- [07:8.275](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.2745627148618): polygon\_12 is shown on the screen, written out.
- [07:8.275](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=428.2745627148618): goal\_mark is shown on the screen, written out.
- [07:17.016](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=437.01560416666666): rule\_star is shown on the screen, written out.
- [07:19.82](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=439.8196041666667): grid moves to a new place on the board.
- [07:19.82](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=439.8196041666667): rule\_star moves to a new place on the board.
- [07:19.82](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=439.8196041666667): head\_run is hidden from the screen — left the board.

##### [07:20.42](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=440.41960416666666)

Narration: Expand S. Its four neighbours become reached cells, each with g equal to one, and each is given an f. Those four are the queue.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule\_star — a Tex \[text\] that says "Expand the reached cell of least $f(n) = g(n) + h(n)$."; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid

Actions:
- [07:20.42](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=440.41960416666666): head\_queue is shown on the screen, written out.
- [07:20.542](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=440.5416041666667): polygon\_11 is indicated — a transient flash.
- [07:29.075](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=449.0746041666667): queue is shown on the screen, written out.

##### [07:30.429](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=450.42910416666666)

Narration: The four share the same g, so g cannot separate them. Their estimates differ. The neighbour towards the goal is seven from it by the estimate; the other three are nine, because a step in the wrong direction adds one instead of removing one.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule\_star — a Tex \[text\] that says "Expand the reached cell of least $f(n) = g(n) + h(n)$."; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; head\_queue — a Heading that says "One Comparison in the Queue"

Actions:
- [07:36.513](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=456.5126041666667): queue is shown on the screen, written out.
- [07:39.694](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=459.69360416666666): queue is shown on the screen, written out.
- [07:39.895](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=459.89458126043905): queue is shown on the screen, written out.
- [07:40.709](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=460.70937247971847): queue is shown on the screen, written out.

##### [07:44.915](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=464.91460416666666)

Narration: Add the columns and f follows: eight for the neighbour in the direction of the goal, ten for the other three. The smallest f wins, so the search steps that way.

Board: Unchanged from the preceding beat in this scene.

Actions:
- [07:45.217](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=465.2166041666667): queue (the "column=4" part) is emphasized.
- [07:51.719](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=471.71860416666664): queue (the "column=4" part) is no longer emphasized.
- [07:51.719](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=471.71860416666664): queue (the "row=2" part) is emphasized.
- [07:53.82](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=473.8196041666667): polygon\_13 is shown on the screen, written out.
- [07:53.82](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=473.8196041666667): star\_marks is shown on the screen, written out.
- [07:55.073](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=475.07310416666667): rule\_star moves to a new place on the board.
- [07:55.073](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=475.07310416666667): head\_queue is hidden from the screen — left the board.
- [07:55.073](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=475.07310416666667): queue is hidden from the screen — left the board.
- [07:55.073](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=475.07310416666667): queue (the "row=2" part) is no longer emphasized.

##### [07:55.673](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=475.6731041666667)

Narration: Repeat the comparison. The next three choices come out the same way, so the search runs straight along this row, and f stays at eight all the way.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule\_star — a Tex \[text\] that says "Expand the reached cell of least $f(n) = g(n) + h(n)$."; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); star\_marks — a Math \[text\] that says "$8$" drawn in grid

Actions:
- [07:55.673](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=475.6731041666667): head\_more is shown on the screen, written out.
- [08:0.84](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=480.8396041666667): polygon\_14 is shown on the screen, written out.
- [08:1.229](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=481.22921017746734): star\_marks\_2 is shown on the screen, written out.
- [08:1.471](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=481.470816188268): polygon\_15 is shown on the screen, written out.
- [08:1.715](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=481.71516916627536): star\_marks\_3 is shown on the screen, written out.
- [08:1.956](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=481.95553184922125): polygon\_16 is shown on the screen, written out.
- [08:2.571](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=482.57100431928467): star\_marks\_4 is shown on the screen, written out.
- [08:03](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=482.9996041666667): total\_note is shown on the screen, written out.

##### [08:5.445](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=485.4451041666667)

Narration: Then the row runs into the wall. The cell straight ahead is blocked, so there is nowhere to continue, and every reached cell now has an f of ten. The estimate of eight was optimistic, and the search has just discovered why.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule\_star — a Tex \[text\] that says "Expand the reached cell of least $f(n) = g(n) + h(n)$."; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); star\_marks — a Math \[text\] that says "$8$" drawn in grid; total\_note — a Text \[text\] that says "With a consistent estimate, $f$ never decreases along a route."; head\_more — a Heading that says "Where the Frontier Goes"; polygon\_14 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4); star\_marks\_2 — a Math \[text\] that says "$8$" drawn in grid; polygon\_15 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4); star\_marks\_3 — a Math \[text\] that says "$8$" drawn in grid; polygon\_16 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4); star\_marks\_4 — a Math \[text\] that says "$8$" drawn in grid

Actions:
- [08:9.102](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=489.1016041666667): polygon\_5 is indicated — a transient flash.

##### [08:19.42](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=499.41960416666666)

Narration: Many cells now tie at ten, and f alone cannot choose among them. This implementation prefers the smaller estimate, which keeps it moving towards G; a different tie-break would examine a wider band. What no tie-break can do is examine a cell of larger f before one of smaller f.

Board: Unchanged from the preceding beat in this scene.

Actions:
- None.

##### [08:37.585](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=517.5851041666667)

Narration: So it turns the corner and carries on: ten, ten, ten. Then G comes off the queue with f equal to ten, which is its g plus nothing, since the estimate at the goal is zero.

Board: Unchanged from the preceding beat in this scene.

Actions:
- [08:38.131](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=518.1306041666667): polygon\_17 is shown on the screen, written out.
- [08:38.431](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=518.4308463462833): star\_marks\_5 is shown on the screen, written out.
- [08:38.625](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=518.6253226328624): polygon\_18 is shown on the screen, written out.
- [08:38.9](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=518.8996818659604): star\_marks\_6 is shown on the screen, written out.
- [08:39.118](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=519.1175191515305): polygon\_19 is shown on the screen, written out.
- [08:39.37](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=519.3696996510259): star\_marks\_7 is shown on the screen, written out.
- [08:39.817](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=519.8165731374033): polygon\_20 is shown on the screen, written out.
- [08:40.544](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=520.5437200092499): star\_marks\_8 is shown on the screen, written out.
- [08:41.265](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=521.2646540153044): polygon\_21 is shown on the screen, written out.
- [08:42.453](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=522.4525625924991): star\_marks\_9 is shown on the screen, written out.
- [08:43.704](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=523.7036041666667): polygon\_12 is indicated — a transient flash.

##### [08:50.724](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=530.7236041666666)

Narration: Eleven cells expanded. The route returned is the same ten-step route, and it is optimal, for the reason we established: the estimate never overshoots, so no unexpanded cell could have hidden anything cheaper.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule\_star — a Tex \[text\] that says "Expand the reached cell of least $f(n) = g(n) + h(n)$."; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); star\_marks — a Math \[text\] that says "$8$" drawn in grid; total\_note — a Text \[text\] that says "With a consistent estimate, $f$ never decreases along a route."; head\_more — a Heading that says "Where the Frontier Goes"; polygon\_14 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4); star\_marks\_2 — a Math \[text\] that says "$8$" drawn in grid; polygon\_15 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4); star\_marks\_3 — a Math \[text\] that says "$8$" drawn in grid; polygon\_16 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4); star\_marks\_4 — a Math \[text\] that says "$8$" drawn in grid; polygon\_17 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.4); star\_marks\_5 — a Math \[text\] that says "$10$" drawn in grid; polygon\_18 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 2.08), (6.92, 2.08), (6.92, 2.92), (6.08, 2.92)), fill\_opacity=0.4); star\_marks\_6 — a Math \[text\] that says "$10$" drawn in grid; polygon\_19 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 2.08), (7.92, 2.08), (7.92, 2.92), (7.08, 2.92)), fill\_opacity=0.4); star\_marks\_7 — a Math \[text\] that says "$10$" drawn in grid; polygon\_20 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 3.08), (7.92, 3.08), (7.92, 3.92), (7.08, 3.92)), fill\_opacity=0.4); star\_marks\_8 — a Math \[text\] that says "$10$" drawn in grid; polygon\_21 — a Polygon \[blue\] drawn in grid (vertices=((8.08, 3.08), (8.92, 3.08), (8.92, 3.92), (8.08, 3.92)), fill\_opacity=0.4); star\_marks\_9 — a Math \[text\] that says "$10$" drawn in grid

Actions:
- [08:53.65](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=533.6496041666667): route is shown on the screen, written out.
- [08:53.726](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=533.7255163344064): route\_2 is shown on the screen, written out.
- [08:53.801](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=533.8014285021462): route\_3 is shown on the screen, written out.
- [08:53.881](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=533.8813026972923): route\_4 is shown on the screen, written out.
- [08:53.996](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=533.9960910963898): route\_5 is shown on the screen, written out.
- [08:54.111](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=534.1108794954873): route\_6 is shown on the screen, written out.
- [08:54.226](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=534.2256678945847): route\_7 is shown on the screen, written out.
- [08:54.34](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=534.3404562936822): route\_8 is shown on the screen, written out.
- [08:54.435](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=534.4352774372627): route\_9 is shown on the screen, written out.
- [08:54.519](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=534.5186004519564): route\_10 is shown on the screen, written out.

##### [09:4.908](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=544.9076041666667)

Narration: The queue was not empty when it stopped. These cells were reached and given an f, and then never expanded, because their f exceeded ten. Reaching a cell is cheap; expanding it is the work.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); rule\_star — a Tex \[text\] that says "Expand the reached cell of least $f(n) = g(n) + h(n)$."; lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); star\_marks — a Math \[text\] that says "$8$" drawn in grid; total\_note — a Text \[text\] that says "With a consistent estimate, $f$ never decreases along a route."; head\_more — a Heading that says "Where the Frontier Goes"; polygon\_14 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4); star\_marks\_2 — a Math \[text\] that says "$8$" drawn in grid; polygon\_15 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4); star\_marks\_3 — a Math \[text\] that says "$8$" drawn in grid; polygon\_16 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4); star\_marks\_4 — a Math \[text\] that says "$8$" drawn in grid; polygon\_17 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.4); star\_marks\_5 — a Math \[text\] that says "$10$" drawn in grid; polygon\_18 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 2.08), (6.92, 2.08), (6.92, 2.92), (6.08, 2.92)), fill\_opacity=0.4); star\_marks\_6 — a Math \[text\] that says "$10$" drawn in grid; polygon\_19 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 2.08), (7.92, 2.08), (7.92, 2.92), (7.08, 2.92)), fill\_opacity=0.4); star\_marks\_7 — a Math \[text\] that says "$10$" drawn in grid; polygon\_20 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 3.08), (7.92, 3.08), (7.92, 3.92), (7.08, 3.92)), fill\_opacity=0.4); star\_marks\_8 — a Math \[text\] that says "$10$" drawn in grid; polygon\_21 — a Polygon \[blue\] drawn in grid (vertices=((8.08, 3.08), (8.92, 3.08), (8.92, 3.92), (8.08, 3.92)), fill\_opacity=0.4); star\_marks\_9 — a Math \[text\] that says "$10$" drawn in grid; route — a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(2.5, 3.5)); route\_2 — a Line \[green\] drawn in grid (start=(2.5, 3.5), end=(3.5, 3.5)); route\_3 — a Line \[green\] drawn in grid (start=(3.5, 3.5), end=(4.5, 3.5)); route\_4 — a Line \[green\] drawn in grid (start=(4.5, 3.5), end=(5.5, 3.5)); route\_5 — a Line \[green\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5)); route\_6 — a Line \[green\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5)); route\_7 — a Line \[green\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5)); route\_8 — a Line \[green\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5)); route\_9 — a Line \[green\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5)); route\_10 — a Line \[green\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5))

Actions:
- [09:7.787](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=547.7866041666666): polygon\_22 is shown on the screen, written out.
- [09:7.843](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=547.8427658427668): polygon\_23 is shown on the screen, written out.
- [09:7.899](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=547.8989275188668): polygon\_24 is shown on the screen, written out.
- [09:7.955](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=547.9550891949668): polygon\_25 is shown on the screen, written out.
- [09:8.011](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=548.0112508710669): polygon\_26 is shown on the screen, written out.
- [09:8.068](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=548.0677107030917): polygon\_27 is shown on the screen, written out.
- [09:8.133](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=548.1331320103767): polygon\_28 is shown on the screen, written out.
- [09:8.199](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=548.1985533176618): polygon\_29 is shown on the screen, written out.
- [09:8.264](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=548.2639746249467): polygon\_30 is shown on the screen, written out.
- [09:8.329](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=548.3293959322317): polygon\_31 is shown on the screen, written out.
- [09:8.393](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=548.3934975754671): polygon\_32 is shown on the screen, written out.
- [09:8.438](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=548.4384269163471): polygon\_33 is shown on the screen, written out.
- [09:8.483](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=548.4833562572272): polygon\_34 is shown on the screen, written out.
- [09:8.528](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=548.5282855981072): polygon\_35 is shown on the screen, written out.
- [09:8.573](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=548.5732149389872): polygon\_36 is shown on the screen, written out.
- [09:8.624](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=548.6235042944738): polygon\_37 is shown on the screen, written out.
- [09:18.178](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.1776041666667): grid moves to a new place on the board.
- [09:18.178](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.1776041666667): head\_more is hidden from the screen — left the board.
- [09:18.178](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.1776041666667): rule\_star is hidden from the screen — left the board.
- [09:18.178](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.1776041666667): total\_note is hidden from the screen — left the board.

##### [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666)

Narration: Put the two searches side by side, on the same maze, with the same walls, both returning a route of cost ten.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); star\_marks — a Math \[text\] that says "$8$" drawn in grid; polygon\_14 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4); star\_marks\_2 — a Math \[text\] that says "$8$" drawn in grid; polygon\_15 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4); star\_marks\_3 — a Math \[text\] that says "$8$" drawn in grid; polygon\_16 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4); star\_marks\_4 — a Math \[text\] that says "$8$" drawn in grid; polygon\_17 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.4); star\_marks\_5 — a Math \[text\] that says "$10$" drawn in grid; polygon\_18 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 2.08), (6.92, 2.08), (6.92, 2.92), (6.08, 2.92)), fill\_opacity=0.4); star\_marks\_6 — a Math \[text\] that says "$10$" drawn in grid; polygon\_19 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 2.08), (7.92, 2.08), (7.92, 2.92), (7.08, 2.92)), fill\_opacity=0.4); star\_marks\_7 — a Math \[text\] that says "$10$" drawn in grid; polygon\_20 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 3.08), (7.92, 3.08), (7.92, 3.92), (7.08, 3.92)), fill\_opacity=0.4); star\_marks\_8 — a Math \[text\] that says "$10$" drawn in grid; polygon\_21 — a Polygon \[blue\] drawn in grid (vertices=((8.08, 3.08), (8.92, 3.08), (8.92, 3.92), (8.08, 3.92)), fill\_opacity=0.4); star\_marks\_9 — a Math \[text\] that says "$10$" drawn in grid; route — a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(2.5, 3.5)); route\_2 — a Line \[green\] drawn in grid (start=(2.5, 3.5), end=(3.5, 3.5)); route\_3 — a Line \[green\] drawn in grid (start=(3.5, 3.5), end=(4.5, 3.5)); route\_4 — a Line \[green\] drawn in grid (start=(4.5, 3.5), end=(5.5, 3.5)); route\_5 — a Line \[green\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5)); route\_6 — a Line \[green\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5)); route\_7 — a Line \[green\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5)); route\_8 — a Line \[green\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5)); route\_9 — a Line \[green\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5)); route\_10 — a Line \[green\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5)); polygon\_22 — a Polygon \[yellow\] drawn in grid (vertices=((0.08, 3.08), (0.92, 3.08), (0.92, 3.92), (0.08, 3.92)), fill\_opacity=0.35); polygon\_23 — a Polygon \[yellow\] drawn in grid (vertices=((1.08, 2.08), (1.92, 2.08), (1.92, 2.92), (1.08, 2.92)), fill\_opacity=0.35); polygon\_24 — a Polygon \[yellow\] drawn in grid (vertices=((1.08, 4.08), (1.92, 4.08), (1.92, 4.92), (1.08, 4.92)), fill\_opacity=0.35); polygon\_25 — a Polygon \[yellow\] drawn in grid (vertices=((2.08, 2.08), (2.92, 2.08), (2.92, 2.92), (2.08, 2.92)), fill\_opacity=0.35); polygon\_26 — a Polygon \[yellow\] drawn in grid (vertices=((2.08, 4.08), (2.92, 4.08), (2.92, 4.92), (2.08, 4.92)), fill\_opacity=0.35); polygon\_27 — a Polygon \[yellow\] drawn in grid (vertices=((3.08, 2.08), (3.92, 2.08), (3.92, 2.92), (3.08, 2.92)), fill\_opacity=0.35); polygon\_28 — a Polygon \[yellow\] drawn in grid (vertices=((3.08, 4.08), (3.92, 4.08), (3.92, 4.92), (3.08, 4.92)), fill\_opacity=0.35); polygon\_29 — a Polygon \[yellow\] drawn in grid (vertices=((4.08, 2.08), (4.92, 2.08), (4.92, 2.92), (4.08, 2.92)), fill\_opacity=0.35); polygon\_30 — a Polygon \[yellow\] drawn in grid (vertices=((4.08, 4.08), (4.92, 4.08), (4.92, 4.92), (4.08, 4.92)), fill\_opacity=0.35); polygon\_31 — a Polygon \[yellow\] drawn in grid (vertices=((5.08, 1.08), (5.92, 1.08), (5.92, 1.92), (5.08, 1.92)), fill\_opacity=0.35); polygon\_32 — a Polygon \[yellow\] drawn in grid (vertices=((5.08, 4.08), (5.92, 4.08), (5.92, 4.92), (5.08, 4.92)), fill\_opacity=0.35); polygon\_33 — a Polygon \[yellow\] drawn in grid (vertices=((6.08, 1.08), (6.92, 1.08), (6.92, 1.92), (6.08, 1.92)), fill\_opacity=0.35); polygon\_34 — a Polygon \[yellow\] drawn in grid (vertices=((7.08, 1.08), (7.92, 1.08), (7.92, 1.92), (7.08, 1.92)), fill\_opacity=0.35); polygon\_35 — a Polygon \[yellow\] drawn in grid (vertices=((7.08, 4.08), (7.92, 4.08), (7.92, 4.92), (7.08, 4.92)), fill\_opacity=0.35); polygon\_36 — a Polygon \[yellow\] drawn in grid (vertices=((8.08, 2.08), (8.92, 2.08), (8.92, 2.92), (8.08, 2.92)), fill\_opacity=0.35); polygon\_37 — a Polygon \[yellow\] drawn in grid (vertices=((8.08, 4.08), (8.92, 4.08), (8.92, 4.92), (8.08, 4.92)), fill\_opacity=0.35)

Actions:
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): head\_cmp is shown on the screen, written out.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_22 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_23 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_24 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_25 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_26 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_27 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_28 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_29 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_30 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_31 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_32 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_33 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_34 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_35 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_36 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_37 is hidden from the screen.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): blind is shown on the screen, written out.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): blind\_lattice is shown on the screen, written out.
- [09:18.778](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.7776041666666): polygon\_38 is shown on the screen, written out.
- [09:18.917](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=558.9168041666667): polygon\_39 is shown on the screen, written out.
- [09:19.056](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=559.0560041666668): polygon\_40 is shown on the screen, written out.
- [09:19.135](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=559.1351419883867): polygon\_41 is shown on the screen, written out.
- [09:19.154](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=559.1542176318268): polygon\_42 is shown on the screen, written out.
- [09:19.173](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=559.1732932752668): polygon\_43 is shown on the screen, written out.
- [09:19.192](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=559.1923689187068): polygon\_44 is shown on the screen, written out.
- [09:19.211](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=559.2114445621469): polygon\_45 is shown on the screen, written out.
- [09:19.231](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=559.2305202055869): polygon\_46 is shown on the screen, written out.
- [09:19.25](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=559.249595849027): polygon\_47 is shown on the screen, written out.
- [09:19.25](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=559.249595849027): polygon\_48 is shown on the screen, written out.
- [09:19.25](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=559.249595849027): blind\_start\_mark is shown on the screen, written out.
- [09:19.25](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=559.249595849027): polygon\_49 is shown on the screen, written out.
- [09:19.25](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=559.249595849027): blind\_goal\_mark is shown on the screen, written out.
- [09:20.055](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.0546041666666): polygon\_50 is shown on the screen, written out.
- [09:20.075](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.0754579017577): polygon\_51 is shown on the screen, written out.
- [09:20.096](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.0963116368487): polygon\_52 is shown on the screen, written out.
- [09:20.117](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.1171653719398): polygon\_53 is shown on the screen, written out.
- [09:20.138](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.1380191070307): polygon\_54 is shown on the screen, written out.
- [09:20.159](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.1588728421218): polygon\_55 is shown on the screen, written out.
- [09:20.18](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.1797265772128): polygon\_56 is shown on the screen, written out.
- [09:20.201](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.2005803123038): polygon\_57 is shown on the screen, written out.
- [09:20.221](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.2214340473948): polygon\_58 is shown on the screen, written out.
- [09:20.242](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.2422877824858): polygon\_59 is shown on the screen, written out.
- [09:20.263](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.263141517577): polygon\_60 is shown on the screen, written out.
- [09:20.284](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.2839952526679): polygon\_61 is shown on the screen, written out.
- [09:20.305](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.304848987759): polygon\_62 is shown on the screen, written out.
- [09:20.326](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.32570272285): polygon\_63 is shown on the screen, written out.
- [09:20.347](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.346556457941): polygon\_64 is shown on the screen, written out.
- [09:20.368](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.3676964453861): polygon\_65 is shown on the screen, written out.
- [09:20.389](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.3891025973007): polygon\_66 is shown on the screen, written out.
- [09:20.411](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.4105087492153): polygon\_67 is shown on the screen, written out.
- [09:20.432](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.43191490113): polygon\_68 is shown on the screen, written out.
- [09:20.453](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.4533210530445): polygon\_69 is shown on the screen, written out.
- [09:20.475](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.4747272049592): polygon\_70 is shown on the screen, written out.
- [09:20.496](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.4961333568738): polygon\_71 is shown on the screen, written out.
- [09:20.518](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.5175395087884): polygon\_72 is shown on the screen, written out.
- [09:20.539](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.5389456607031): polygon\_73 is shown on the screen, written out.
- [09:20.573](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.5725175376648): polygon\_74 is shown on the screen, written out.
- [09:20.609](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.6085972614563): polygon\_75 is shown on the screen, written out.
- [09:20.645](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.644676985248): polygon\_76 is shown on the screen, written out.
- [09:20.681](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.6807567090395): polygon\_77 is shown on the screen, written out.
- [09:20.717](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.7168364328311): polygon\_78 is shown on the screen, written out.
- [09:20.753](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.7529161566227): polygon\_79 is shown on the screen, written out.
- [09:20.789](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.7889958804143): polygon\_80 is shown on the screen, written out.
- [09:20.825](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.825075604206): polygon\_81 is shown on the screen, written out.
- [09:20.861](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.8611553279975): polygon\_82 is shown on the screen, written out.
- [09:20.897](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.897235051789): polygon\_83 is shown on the screen, written out.
- [09:20.933](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.9333147755807): polygon\_84 is shown on the screen, written out.
- [09:20.969](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=560.9693944993722): polygon\_85 is shown on the screen, written out.
- [09:21.005](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=561.0054742231639): polygon\_86 is shown on the screen, written out.
- [09:21.042](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=561.0415539469554): polygon\_87 is shown on the screen, written out.
- [09:21.078](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=561.077633670747): polygon\_88 is shown on the screen, written out.
- [09:21.114](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=561.1137133945385): polygon\_89 is shown on the screen, written out.
- [09:21.15](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=561.1497931183302): polygon\_90 is shown on the screen, written out.
- [09:21.178](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=561.1780109463277): polygon\_91 is shown on the screen, written out.
- [09:21.197](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=561.1966550141243): polygon\_92 is shown on the screen, written out.
- [09:21.215](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=561.2152990819209): polygon\_93 is shown on the screen, written out.
- [09:21.234](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=561.2339431497176): polygon\_94 is shown on the screen, written out.
- [09:21.253](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=561.2525872175141): polygon\_95 is shown on the screen, written out.
- [09:21.271](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=561.2712312853107): polygon\_96 is shown on the screen, written out.
- [09:21.29](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=561.2898753531073): polygon\_97 is shown on the screen, written out.

##### [09:26.251](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=566.2506041666667)

Narration: The counts are on the board. The larger belongs to the search that ranked by g alone; the smaller belongs to the search that added an estimate of what remained. Same route, a fraction of the work.

Board: grid — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); lattice — a Gridlines \[gray\] drawn in grid (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon — a Polygon \[gray\] drawn in grid (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_2 — a Polygon \[gray\] drawn in grid (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_3 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_4 — a Polygon \[gray\] drawn in grid (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_5 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_6 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_7 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_8 — a Polygon \[gray\] drawn in grid (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_9 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_10 — a Polygon \[gray\] drawn in grid (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_11 — a Polygon \[green\] drawn in grid (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); start\_mark — a Math \[text\] that says "$S$" drawn in grid; polygon\_12 — a Polygon \[red\] drawn in grid (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); goal\_mark — a Math \[text\] that says "$G$" drawn in grid; polygon\_13 — a Polygon \[blue\] drawn in grid (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); star\_marks — a Math \[text\] that says "$8$" drawn in grid; polygon\_14 — a Polygon \[blue\] drawn in grid (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4); star\_marks\_2 — a Math \[text\] that says "$8$" drawn in grid; polygon\_15 — a Polygon \[blue\] drawn in grid (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4); star\_marks\_3 — a Math \[text\] that says "$8$" drawn in grid; polygon\_16 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4); star\_marks\_4 — a Math \[text\] that says "$8$" drawn in grid; polygon\_17 — a Polygon \[blue\] drawn in grid (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.4); star\_marks\_5 — a Math \[text\] that says "$10$" drawn in grid; polygon\_18 — a Polygon \[blue\] drawn in grid (vertices=((6.08, 2.08), (6.92, 2.08), (6.92, 2.92), (6.08, 2.92)), fill\_opacity=0.4); star\_marks\_6 — a Math \[text\] that says "$10$" drawn in grid; polygon\_19 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 2.08), (7.92, 2.08), (7.92, 2.92), (7.08, 2.92)), fill\_opacity=0.4); star\_marks\_7 — a Math \[text\] that says "$10$" drawn in grid; polygon\_20 — a Polygon \[blue\] drawn in grid (vertices=((7.08, 3.08), (7.92, 3.08), (7.92, 3.92), (7.08, 3.92)), fill\_opacity=0.4); star\_marks\_8 — a Math \[text\] that says "$10$" drawn in grid; polygon\_21 — a Polygon \[blue\] drawn in grid (vertices=((8.08, 3.08), (8.92, 3.08), (8.92, 3.92), (8.08, 3.92)), fill\_opacity=0.4); star\_marks\_9 — a Math \[text\] that says "$10$" drawn in grid; route — a Line \[green\] drawn in grid (start=(1.5, 3.5), end=(2.5, 3.5)); route\_2 — a Line \[green\] drawn in grid (start=(2.5, 3.5), end=(3.5, 3.5)); route\_3 — a Line \[green\] drawn in grid (start=(3.5, 3.5), end=(4.5, 3.5)); route\_4 — a Line \[green\] drawn in grid (start=(4.5, 3.5), end=(5.5, 3.5)); route\_5 — a Line \[green\] drawn in grid (start=(5.5, 3.5), end=(5.5, 2.5)); route\_6 — a Line \[green\] drawn in grid (start=(5.5, 2.5), end=(6.5, 2.5)); route\_7 — a Line \[green\] drawn in grid (start=(6.5, 2.5), end=(7.5, 2.5)); route\_8 — a Line \[green\] drawn in grid (start=(7.5, 2.5), end=(7.5, 3.5)); route\_9 — a Line \[green\] drawn in grid (start=(7.5, 3.5), end=(8.5, 3.5)); route\_10 — a Line \[green\] drawn in grid (start=(8.5, 3.5), end=(9.5, 3.5)); blind — a Figure (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), aspect=(11.0, 7.0)); head\_cmp — a Heading that says "The Same Route, Different Work"; blind\_lattice — a Gridlines \[gray\] drawn in blind (x\_range=(0.0, 11.0), y\_range=(0.0, 7.0), step=1.0); polygon\_38 — a Polygon \[gray\] drawn in blind (vertices=((4.08, 0.08), (4.92, 0.08), (4.92, 0.92), (4.08, 0.92)), fill\_opacity=0.85); polygon\_39 — a Polygon \[gray\] drawn in blind (vertices=((4.08, 1.08), (4.92, 1.08), (4.92, 1.92), (4.08, 1.92)), fill\_opacity=0.85); polygon\_40 — a Polygon \[gray\] drawn in blind (vertices=((3.08, 5.08), (3.92, 5.08), (3.92, 5.92), (3.08, 5.92)), fill\_opacity=0.85); polygon\_41 — a Polygon \[gray\] drawn in blind (vertices=((3.08, 6.08), (3.92, 6.08), (3.92, 6.92), (3.08, 6.92)), fill\_opacity=0.85); polygon\_42 — a Polygon \[gray\] drawn in blind (vertices=((6.08, 3.08), (6.92, 3.08), (6.92, 3.92), (6.08, 3.92)), fill\_opacity=0.85); polygon\_43 — a Polygon \[gray\] drawn in blind (vertices=((6.08, 4.08), (6.92, 4.08), (6.92, 4.92), (6.08, 4.92)), fill\_opacity=0.85); polygon\_44 — a Polygon \[gray\] drawn in blind (vertices=((6.08, 5.08), (6.92, 5.08), (6.92, 5.92), (6.08, 5.92)), fill\_opacity=0.85); polygon\_45 — a Polygon \[gray\] drawn in blind (vertices=((6.08, 6.08), (6.92, 6.08), (6.92, 6.92), (6.08, 6.92)), fill\_opacity=0.85); polygon\_46 — a Polygon \[gray\] drawn in blind (vertices=((8.08, 0.08), (8.92, 0.08), (8.92, 0.92), (8.08, 0.92)), fill\_opacity=0.85); polygon\_47 — a Polygon \[gray\] drawn in blind (vertices=((8.08, 1.08), (8.92, 1.08), (8.92, 1.92), (8.08, 1.92)), fill\_opacity=0.85); polygon\_48 — a Polygon \[green\] drawn in blind (vertices=((1.08, 3.08), (1.92, 3.08), (1.92, 3.92), (1.08, 3.92)), fill\_opacity=0.7); blind\_start\_mark — a Math \[text\] that says "$S$" drawn in blind; polygon\_49 — a Polygon \[red\] drawn in blind (vertices=((9.08, 3.08), (9.92, 3.08), (9.92, 3.92), (9.08, 3.92)), fill\_opacity=0.7); blind\_goal\_mark — a Math \[text\] that says "$G$" drawn in blind; polygon\_50 — a Polygon \[blue\] drawn in blind (vertices=((2.08, 3.08), (2.92, 3.08), (2.92, 3.92), (2.08, 3.92)), fill\_opacity=0.4); polygon\_51 — a Polygon \[blue\] drawn in blind (vertices=((0.08, 3.08), (0.92, 3.08), (0.92, 3.92), (0.08, 3.92)), fill\_opacity=0.4); polygon\_52 — a Polygon \[blue\] drawn in blind (vertices=((1.08, 4.08), (1.92, 4.08), (1.92, 4.92), (1.08, 4.92)), fill\_opacity=0.4); polygon\_53 — a Polygon \[blue\] drawn in blind (vertices=((1.08, 2.08), (1.92, 2.08), (1.92, 2.92), (1.08, 2.92)), fill\_opacity=0.4); polygon\_54 — a Polygon \[blue\] drawn in blind (vertices=((3.08, 3.08), (3.92, 3.08), (3.92, 3.92), (3.08, 3.92)), fill\_opacity=0.4); polygon\_55 — a Polygon \[blue\] drawn in blind (vertices=((2.08, 4.08), (2.92, 4.08), (2.92, 4.92), (2.08, 4.92)), fill\_opacity=0.4); polygon\_56 — a Polygon \[blue\] drawn in blind (vertices=((2.08, 2.08), (2.92, 2.08), (2.92, 2.92), (2.08, 2.92)), fill\_opacity=0.4); polygon\_57 — a Polygon \[blue\] drawn in blind (vertices=((0.08, 4.08), (0.92, 4.08), (0.92, 4.92), (0.08, 4.92)), fill\_opacity=0.4); polygon\_58 — a Polygon \[blue\] drawn in blind (vertices=((0.08, 2.08), (0.92, 2.08), (0.92, 2.92), (0.08, 2.92)), fill\_opacity=0.4); polygon\_59 — a Polygon \[blue\] drawn in blind (vertices=((1.08, 5.08), (1.92, 5.08), (1.92, 5.92), (1.08, 5.92)), fill\_opacity=0.4); polygon\_60 — a Polygon \[blue\] drawn in blind (vertices=((1.08, 1.08), (1.92, 1.08), (1.92, 1.92), (1.08, 1.92)), fill\_opacity=0.4); polygon\_61 — a Polygon \[blue\] drawn in blind (vertices=((4.08, 3.08), (4.92, 3.08), (4.92, 3.92), (4.08, 3.92)), fill\_opacity=0.4); polygon\_62 — a Polygon \[blue\] drawn in blind (vertices=((3.08, 4.08), (3.92, 4.08), (3.92, 4.92), (3.08, 4.92)), fill\_opacity=0.4); polygon\_63 — a Polygon \[blue\] drawn in blind (vertices=((3.08, 2.08), (3.92, 2.08), (3.92, 2.92), (3.08, 2.92)), fill\_opacity=0.4); polygon\_64 — a Polygon \[blue\] drawn in blind (vertices=((2.08, 5.08), (2.92, 5.08), (2.92, 5.92), (2.08, 5.92)), fill\_opacity=0.4); polygon\_65 — a Polygon \[blue\] drawn in blind (vertices=((2.08, 1.08), (2.92, 1.08), (2.92, 1.92), (2.08, 1.92)), fill\_opacity=0.4); polygon\_66 — a Polygon \[blue\] drawn in blind (vertices=((0.08, 5.08), (0.92, 5.08), (0.92, 5.92), (0.08, 5.92)), fill\_opacity=0.4); polygon\_67 — a Polygon \[blue\] drawn in blind (vertices=((0.08, 1.08), (0.92, 1.08), (0.92, 1.92), (0.08, 1.92)), fill\_opacity=0.4); polygon\_68 — a Polygon \[blue\] drawn in blind (vertices=((1.08, 6.08), (1.92, 6.08), (1.92, 6.92), (1.08, 6.92)), fill\_opacity=0.4); polygon\_69 — a Polygon \[blue\] drawn in blind (vertices=((1.08, 0.08), (1.92, 0.08), (1.92, 0.92), (1.08, 0.92)), fill\_opacity=0.4); polygon\_70 — a Polygon \[blue\] drawn in blind (vertices=((5.08, 3.08), (5.92, 3.08), (5.92, 3.92), (5.08, 3.92)), fill\_opacity=0.4); polygon\_71 — a Polygon \[blue\] drawn in blind (vertices=((4.08, 4.08), (4.92, 4.08), (4.92, 4.92), (4.08, 4.92)), fill\_opacity=0.4); polygon\_72 — a Polygon \[blue\] drawn in blind (vertices=((4.08, 2.08), (4.92, 2.08), (4.92, 2.92), (4.08, 2.92)), fill\_opacity=0.4); polygon\_73 — a Polygon \[blue\] drawn in blind (vertices=((3.08, 1.08), (3.92, 1.08), (3.92, 1.92), (3.08, 1.92)), fill\_opacity=0.4); polygon\_74 — a Polygon \[blue\] drawn in blind (vertices=((2.08, 6.08), (2.92, 6.08), (2.92, 6.92), (2.08, 6.92)), fill\_opacity=0.4); polygon\_75 — a Polygon \[blue\] drawn in blind (vertices=((2.08, 0.08), (2.92, 0.08), (2.92, 0.92), (2.08, 0.92)), fill\_opacity=0.4); polygon\_76 — a Polygon \[blue\] drawn in blind (vertices=((0.08, 6.08), (0.92, 6.08), (0.92, 6.92), (0.08, 6.92)), fill\_opacity=0.4); polygon\_77 — a Polygon \[blue\] drawn in blind (vertices=((0.08, 0.08), (0.92, 0.08), (0.92, 0.92), (0.08, 0.92)), fill\_opacity=0.4); polygon\_78 — a Polygon \[blue\] drawn in blind (vertices=((5.08, 4.08), (5.92, 4.08), (5.92, 4.92), (5.08, 4.92)), fill\_opacity=0.4); polygon\_79 — a Polygon \[blue\] drawn in blind (vertices=((5.08, 2.08), (5.92, 2.08), (5.92, 2.92), (5.08, 2.92)), fill\_opacity=0.4); polygon\_80 — a Polygon \[blue\] drawn in blind (vertices=((4.08, 5.08), (4.92, 5.08), (4.92, 5.92), (4.08, 5.92)), fill\_opacity=0.4); polygon\_81 — a Polygon \[blue\] drawn in blind (vertices=((3.08, 0.08), (3.92, 0.08), (3.92, 0.92), (3.08, 0.92)), fill\_opacity=0.4); polygon\_82 — a Polygon \[blue\] drawn in blind (vertices=((5.08, 5.08), (5.92, 5.08), (5.92, 5.92), (5.08, 5.92)), fill\_opacity=0.4); polygon\_83 — a Polygon \[blue\] drawn in blind (vertices=((6.08, 2.08), (6.92, 2.08), (6.92, 2.92), (6.08, 2.92)), fill\_opacity=0.4); polygon\_84 — a Polygon \[blue\] drawn in blind (vertices=((5.08, 1.08), (5.92, 1.08), (5.92, 1.92), (5.08, 1.92)), fill\_opacity=0.4); polygon\_85 — a Polygon \[blue\] drawn in blind (vertices=((4.08, 6.08), (4.92, 6.08), (4.92, 6.92), (4.08, 6.92)), fill\_opacity=0.4); polygon\_86 — a Polygon \[blue\] drawn in blind (vertices=((5.08, 6.08), (5.92, 6.08), (5.92, 6.92), (5.08, 6.92)), fill\_opacity=0.4); polygon\_87 — a Polygon \[blue\] drawn in blind (vertices=((7.08, 2.08), (7.92, 2.08), (7.92, 2.92), (7.08, 2.92)), fill\_opacity=0.4); polygon\_88 — a Polygon \[blue\] drawn in blind (vertices=((6.08, 1.08), (6.92, 1.08), (6.92, 1.92), (6.08, 1.92)), fill\_opacity=0.4); polygon\_89 — a Polygon \[blue\] drawn in blind (vertices=((5.08, 0.08), (5.92, 0.08), (5.92, 0.92), (5.08, 0.92)), fill\_opacity=0.4); polygon\_90 — a Polygon \[blue\] drawn in blind (vertices=((8.08, 2.08), (8.92, 2.08), (8.92, 2.92), (8.08, 2.92)), fill\_opacity=0.4); polygon\_91 — a Polygon \[blue\] drawn in blind (vertices=((7.08, 3.08), (7.92, 3.08), (7.92, 3.92), (7.08, 3.92)), fill\_opacity=0.4); polygon\_92 — a Polygon \[blue\] drawn in blind (vertices=((7.08, 1.08), (7.92, 1.08), (7.92, 1.92), (7.08, 1.92)), fill\_opacity=0.4); polygon\_93 — a Polygon \[blue\] drawn in blind (vertices=((6.08, 0.08), (6.92, 0.08), (6.92, 0.92), (6.08, 0.92)), fill\_opacity=0.4); polygon\_94 — a Polygon \[blue\] drawn in blind (vertices=((9.08, 2.08), (9.92, 2.08), (9.92, 2.92), (9.08, 2.92)), fill\_opacity=0.4); polygon\_95 — a Polygon \[blue\] drawn in blind (vertices=((8.08, 3.08), (8.92, 3.08), (8.92, 3.92), (8.08, 3.92)), fill\_opacity=0.4); polygon\_96 — a Polygon \[blue\] drawn in blind (vertices=((7.08, 4.08), (7.92, 4.08), (7.92, 4.92), (7.08, 4.92)), fill\_opacity=0.4); polygon\_97 — a Polygon \[blue\] drawn in blind (vertices=((7.08, 0.08), (7.92, 0.08), (7.92, 0.92), (7.08, 0.92)), fill\_opacity=0.4)

Actions:
- [09:26.797](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=566.7966041666666): blind\_label is shown on the screen, written out.
- [09:27.117](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=567.1170255564522): star\_label is shown on the screen, written out.
- [09:29.014](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=569.0136041666667): blind\_label is indicated — a transient flash.
- [09:32.509](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=572.5086041666666): star\_label is indicated — a transient flash.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): blind is hidden from the screen — left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): blind\_lattice is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_38 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_39 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_40 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_41 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_42 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_43 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_44 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_45 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_46 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_47 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_48 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): blind\_start\_mark is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_49 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): blind\_goal\_mark is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_50 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_51 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_52 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_53 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_54 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_55 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_56 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_57 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_58 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_59 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_60 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_61 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_62 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_63 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_64 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_65 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_66 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_67 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_68 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_69 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_70 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_71 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_72 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_73 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_74 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_75 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_76 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_77 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_78 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_79 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_80 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_81 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_82 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_83 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_84 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_85 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_86 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_87 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_88 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_89 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_90 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_91 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_92 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_93 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_94 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_95 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_96 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_97 is hidden from the screen — blind left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): blind\_label is hidden from the screen — left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): grid is hidden from the screen — left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): lattice is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_2 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_3 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_4 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_5 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_6 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_7 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_8 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_9 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_10 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_11 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): start\_mark is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_12 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): goal\_mark is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_13 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): star\_marks is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_14 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): star\_marks\_2 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_15 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): star\_marks\_3 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_16 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): star\_marks\_4 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_17 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): star\_marks\_5 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_18 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): star\_marks\_6 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_19 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): star\_marks\_7 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_20 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): star\_marks\_8 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): polygon\_21 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): star\_marks\_9 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): route is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): route\_2 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): route\_3 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): route\_4 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): route\_5 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): route\_6 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): route\_7 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): route\_8 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): route\_9 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): route\_10 is hidden from the screen — grid left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): head\_cmp is hidden from the screen — left the board.
- [09:38.54](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=578.5396041666667): star\_label is hidden from the screen — left the board.

##### [09:39.14](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=579.1396041666667)

Narration: Three points to take away. First, the two terms measure different things: g is a measured cost over ground the search has covered, h is an estimate over ground it has not, and f is the only quantity the algorithm ever compares.

Board: Empty.

Actions:
- [09:39.14](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=579.1396041666667): head\_close is shown on the screen, written out.
- [09:41.456](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=581.4556041666667): point\_one is shown on the screen, written out.

##### [09:55.582](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=595.5816041666667)

Narration: Second, the estimate must never exceed the true remaining cost. That is admissibility, and it is what keeps the returned route optimal. An estimate that overshoots can make the search settle for a route that is not shortest.

Board: point\_one — a Text \[text\] that says "1. $g$ is measured, $h$ is estimated, and $f$ is the only number compared."; head\_close — a Heading that says "What to Carry Away"

Actions:
- [09:55.93](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=595.9296041666666): point\_two is shown on the screen, written out.

##### [10:11.147](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=611.1466041666667)

Narration: Third, the quality of the estimate is the quality of the search. Set h to zero and f becomes g, and the algorithm is Dijkstra's again, expanding in every direction. Sharpen h towards the true remaining cost and the expanded region contracts towards the route itself.

Board: point\_one — a Text \[text\] that says "1. $g$ is measured, $h$ is estimated, and $f$ is the only number compared."; point\_two — a Text \[text\] that says "2. An admissible $h$ never overshoots, so the route stays optimal."; head\_close — a Heading that says "What to Carry Away"

Actions:
- [10:11.495](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=611.4946041666667): point\_three is shown on the screen, written out.

##### [10:30.834](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=630.8341041666667)

Narration: The equation is one addition. What it changes is the set of cells the algorithm never has to look at.

Board: point\_one — a Text \[text\] that says "1. $g$ is measured, $h$ is estimated, and $f$ is the only number compared."; point\_two — a Text \[text\] that says "2. An admissible $h$ never overshoots, so the route stays optimal."; point\_three — a Text \[text\] that says "3. $h = 0$ gives Dijkstra; a sharper $h$ narrows the expanded region."; head\_close — a Heading that says "What to Carry Away"

Actions:
- [10:37.897](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=637.8970833333334): head\_close is hidden from the screen — left the board.
- [10:37.897](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=637.8970833333334): point\_one is hidden from the screen — left the board.
- [10:37.897](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=637.8970833333334): point\_three is hidden from the screen — left the board.
- [10:37.897](https://academa.ai/@bobby/lectures/visualizing-a-search-pathfinding-through-heuristic-guidance?t=637.8970833333334): point\_two is hidden from the screen — left the board.
