Writings

Solving Andy's Afternoon Amble Puzzle

Kyle LukaszekSeptember 1, 2026

The puzzle

Jane Street’s August 2026 puzzle brings back Andy the ant. He’s moved off his old soccer ball and now lives on a truncated tetrahedron blown up into a sphere, which has four white hexagons and four black triangles. Andy is tiny and can’t see very well, so he doesn’t notice the curvature, and he stays off the black triangles because he suspects they’re bottomless pits.

Every afternoon he wakes up on a white hexagon, marks it as home with some pheromones, and goes for a random amble. Each step takes him to one of the three neighbouring white hexagons with equal probability, and he stops as soon as he first gets back home. He can recognize home by the pheromones, but he can’t tell which edge he came back across.

This afternoon the ball bounced through a kitchen with an infinite hexagonal tile floor. Every white tile on the floor is surrounded by alternating black and white tiles, and every black tile is surrounded by six white ones. Andy fell off, woke up on a white tile, didn’t notice that anything had changed, and went on his amble like usual. Throughout the walk he remembers the turns he’s taken. What is the probability pp that by the end of his amble, he’s worked out that he isn’t on the ball anymore?

My first thought

When I first read this, I figured Andy would notice almost straight away, since the two worlds look nothing alike once you draw which hexagons touch which. On the ball every hexagon touches the other three, so the graph is K4K_4, while on the floor every white tile has three white neighbours and the tiles go on forever, which gives an infinite honeycomb.

Andy can’t see either graph, though. Every tile he stands on, ball or floor, gives him the same three doors in the same order around him, and all he has to go on is the list of turns he took. What I actually needed to figure out was whether that list ever tells him which world he’s in.

Labelling the floor

On the ball, a list of turns always lands Andy on one definite hexagon, since every hexagon touches every other one. If we call his home 00 and the other three hexagons aa, bb, and cc, every list of turns spells out a walk on those four labels.

To compare the two worlds, I wanted to label the floor the same way, giving every white tile one of 00, aa, bb, or cc so that each tile has exactly one neighbour with each of the other three labels. With a labelling like that, a list of turns would land on the same label on the floor as it would on the ball.

Building one turned out to be easier than I expected, because the honeycomb’s edges only point in three directions. I gave each direction a tag (aa, bb, or cc) and defined a tile’s label as the result of combining the tags along any path from home, where a tag combined with itself cancels to 00 and two different tags combine to the third (so aa and bb make cc).

This only works if the label doesn’t depend on which path you take to a tile. Every hexagonal loop in the honeycomb uses each direction twice, so walking around a loop cancels back to 00 and any two paths to the same tile agree. From a tile labelled LL, the three neighbours are LL combined with aa, bb, and cc, which are exactly the three labels other than LL.

The kitchen floor labelled with 0, a, b, and c next to the truncated tetrahedron ball, with every door coloured by its tag Every door is coloured by its tag, which is also what you get by combining the labels on either side of it. The starred tile is home, and while the floor has the same doors and labels as the ball, it has lots of 0-tiles and only one of them is home.

With this labelling, Andy’s list of turns traces out the same walk on K4K_4 whether he’s on the ball or the floor, and nothing seems off until that walk reaches 00 and his turns tell him he should be home. On the ball he always is, but the floor has infinitely many 00-tiles and only one of them has his pheromones on it. If the first 00-tile he reaches is one of the others, he ends up somewhere his turns call home without any pheromones, so Andy stays fooled only if the first 00-tile he reaches is his real home.

The floor breaks into rings

Next I looked at what happens between Andy leaving home and reaching a 00-tile. Every tile that isn’t a 00 has exactly one 00 neighbour, so deleting all the 00-tiles takes one connection away from every other tile and leaves each of them with two. A graph where every vertex has two neighbours is a collection of separate loops, and on the floor those loops are six-tile rings around some of the pits.

The floor with the 0-tiles removed, leaving six-tile rings around some of the pits, with Andy's ring highlighted With the 0-tiles gone, every remaining tile sits on a six-tile ring. Andy’s ring is in blue, with one exit leading home and the other five (dashed) leading to decoy 0-tiles.

After his first step Andy is on one of these rings, and he stays on it until he steps onto a 00-tile. If we number the ring v0v_0 to v5v_5 with v0v_0 next to home, then on every step he goes one way around the ring, the other way, or out to that tile’s 00 neighbour, each with probability 13\tfrac13. The exit from v0v_0 leads home, and the other five lead to decoys where his turns say he’s home but there are no pheromones.

Solving the ring

Let hih_i be the probability that Andy eventually leaves through his real home, starting from viv_i. Each hih_i is the average over his three options, and the only option with a fixed payoff is the exit from v0v_0, which is worth 11. Using the ring’s symmetry about v0v_0 to set h1=h5h_1 = h_5 and h2=h4h_2 = h_4 leaves four equations:

3h0=1+2h1,3h1=h0+h2,3h2=h1+h3,3h3=2h2.\begin{aligned} 3h_0 &= 1 + 2h_1, \\ 3h_1 &= h_0 + h_2, \\ 3h_2 &= h_1 + h_3, \\ 3h_3 &= 2h_2. \end{aligned}

I solved these from the far side of the ring. Since v3v_3 is directly opposite home and its exit is a decoy, h3=23h2h_3 = \tfrac23 h_2, and plugging that into the line above gives h2=37h1h_2 = \tfrac37 h_1 and then h1=718h0h_1 = \tfrac{7}{18} h_0. The first equation then only involves h0h_0:

3h0=1+79h0  ⟹  h0=9203h_0 = 1 + \tfrac79 h_0 \implies h_0 = \frac{9}{20}

Andy starts out on v0v_0, so he finds his real home with probability 920\tfrac{9}{20}, and the probability that he works out he’s been moved is

p=1−920=1120\boxed{p = 1 - \frac{9}{20} = \frac{11}{20}}

Andy's ring with each tile's chance of eventually leaving through home: 18/40, 7/40, 3/40, 2/40, 3/40, 7/40 Each ring tile’s chance of eventually leaving through home, in 40ths.

Why it isn’t 5/6

With six exits and only one of them real, it’s tempting to guess 56\tfrac56, which would be right if Andy left the ring through a random exit. He’s much more likely to leave through the exits close to where he started, though. Starting from v0v_0, he leaves through his real home 1840\tfrac{18}{40} of the time, through each of the next two exits 740\tfrac{7}{40} of the time, then 340\tfrac{3}{40} each, and through the one directly opposite only 240\tfrac{2}{40} of the time. A lot of his escapes happen within his first step or two, before he’s had a chance to wander, which is why the answer comes out at 1120\tfrac{11}{20} instead of 56\tfrac56.

These are the same numbers as in the figure above, which surprised me until I realized the walk around the ring is symmetric, so the chance of getting from v0v_0 out through viv_i‘s exit equals the chance of getting from viv_i out through v0v_0‘s.

A few other things I noticed

On the ball, Andy gets back home with probability 13\tfrac13 on every step after his first, so his amble lasts 1+Geom(13)1 + \text{Geom}(\tfrac13) steps. On the floor he leaves the ring with probability 13\tfrac13 on every step after his first, so the time until his turns say he’s home has the same distribution, and timing his ambles for a year wouldn’t help him notice anything. Reaching a 00-tile that doesn’t smell like home is the only way he can find out.

The honeycomb is bipartite, so any walk that ends at Andy’s real home takes an even number of steps, whereas on the ball he can get home in an odd number. If his turns say he’s home after an odd number of steps, he has to be on a decoy, and that happens with probability 25\tfrac25, which gives p≥25p \ge \tfrac25 without solving the ring at all. You still need the labelling to know which tiles count as home in the first place, though.

In topology terms, the floor is a covering space of the ball and the four labels form the Klein four-group, but I didn’t need any of that to get the answer. Everything I used came from every tile seeing each of the other three labels exactly once.