Every Lily Leap level has a route home: what the solver found
Before a Lily Leap level goes live, a program has to get the frog home. It finds every baby, dodges every car, rides every log and reaches the top row - on a single life and inside the clock. If it cannot, the level is not published. Here is what that program found, and what its routes say about how to play.
Why a crossing game needs a solver
The levels in Lily Leap are not drawn tile by tile. Each one is a short plan - one letter per row: road, water, rails, traps, safe ground, checkpoint - plus a few numbers: how fast things move, how busy the roads are, what share of the turtles dive, how many baby frogs to rescue and how many seconds a life gets. A generator fills in the rest: which vehicles drive in which lane, how long the logs are, where the obstacles and the babies sit.
That is a quick way to build twenty levels in five worlds, but it has an obvious risk. Nothing in a generator promises that a gap between two logs is ever short enough to jump, or that a baby is not sitting on a tile that a train passes every two seconds. A level can look fine and still be impossible. So we wrote a program to check.
How the solver works
Everything that moves in Lily Leap - every car, log, train, turtle and trap - is a function of the level's clock. Given the time, the game can say exactly where a log is, whether a turtle is under water or whether a spike trap is firing. Only cracked ice floes remember anything. That makes the whole level predictable, and a predictable level can be searched.
The solver does a breadth-first search over three things: the row the frog is on, its position across the row, and the time. Every 0.14 seconds - the length of one hop - it tries everything a player could do: wait, or hop up, down, left or right. A hop only succeeds if there is something to land on at the moment of landing, and hazards are checked at every frame of the hop, the same way the game checks them. A frog carried off the edge on a log is lost. A frog that stands on a floe for 1.3 seconds goes under.
The route goes to the nearest baby, then the next one, and finally home. It must do all of it within a single life's clock. Then a second tool replays those routes in the real game, in a real browser, to make sure the game agrees with the solver.
What it found
Here is the solver's report for all twenty levels: when it reaches home on a perfect run, against the clock each life gets.
| Level | Rows | Babies | Perfect run | Clock | Clock used |
|---|---|---|---|---|---|
| 1 First Hops | 14 | 1 | 2.4 s | 60 s | 4% |
| 2 Garden Path | 19 | 2 | 3.4 s | 70 s | 5% |
| 3 Lily Lane | 21 | 3 | 5.0 s | 75 s | 7% |
| 4 Turtle Bay | 27 | 4 | 12.0 s | 85 s | 14% |
| 5 Crosswalk | 22 | 3 | 5.5 s | 75 s | 7% |
| 6 Rush Hour | 27 | 4 | 5.7 s | 85 s | 7% |
| 7 Night Line | 28 | 4 | 10.8 s | 90 s | 12% |
| 8 Downtown | 36 | 5 | 6.9 s | 110 s | 6% |
| 9 Temple Steps | 21 | 3 | 3.8 s | 80 s | 5% |
| 10 Croc River | 20 | 4 | 7.3 s | 90 s | 8% |
| 11 Spike Hall | 24 | 4 | 5.5 s | 95 s | 6% |
| 12 Lost Idol | 38 | 5 | 17.9 s | 120 s | 15% |
| 13 Thin Ice | 19 | 3 | 4.5 s | 80 s | 6% |
| 14 Sled Run | 25 | 4 | 21.6 s | 95 s | 23% |
| 15 Icicle Cave | 28 | 4 | 6.4 s | 100 s | 6% |
| 16 Blizzard | 40 | 5 | 9.1 s | 125 s | 7% |
| 17 Hot Steps | 19 | 3 | 4.3 s | 85 s | 5% |
| 18 Mine Carts | 26 | 4 | 6.0 s | 100 s | 6% |
| 19 Fire Falls | 36 | 5 | 17.1 s | 120 s | 14% |
| 20 The Crater | 56 | 5 | 20.4 s | 150 s | 14% |
Two things stand out.
The clock is generous. On most levels a perfect run uses well under a tenth of it. Even the slowest, Sled Run, leaves three quarters of the clock unused. That is deliberate: the solver hops the instant a gap opens, and no human does that. The clock is there to stop you from standing still forever, not to rush you. If you find yourself panicking about time, you can almost always afford to stop and watch the traffic for a few seconds.
The babies on logs are what take time. The four slowest levels - Lost Idol, Sled Run, Fire Falls and The Crater - are exactly the four where one or two babies ride on a log instead of sitting on the ground. You cannot hop to a moving baby whenever you like; you have to wait until its log comes past a spot you can reach. On Sled Run the solver reaches the third baby after 6.6 seconds and the fourth only after 20.6 - fourteen seconds spent waiting for the right moment, by a program that never hesitates.
What the numbers mean for you
The solver is not a role model. It hops through gaps a fraction of a second wide, because it knows exactly where every car will be. You do not, so you need margin - and the table says you can afford it. A few habits follow:
- Wait on safe ground, not on the road. With most of the clock to spare, a few seconds on a grass row watching the traffic cost you nothing but a few points. A hop into a lane you have not read costs a life.
- Cross several lanes at once. Do not cross one lane and then think about the next. Wait for a moment when the gaps line up across the whole road, then hop straight through.
- Stay near the middle on logs. A log carrying you towards the edge of the screen is a clock of its own. Hop along it against the current to keep the most options for the next hop.
- Let the riding babies come to you. A baby on a log is only reachable when its log passes a spot you can get to. Rescue the babies on the ground first and pick up the rider when its log comes round, instead of chasing it across the river.
Stars and the clock
Stars in Lily Leap depend only on lives: three stars if you lose none, two if you lose one or two, one otherwise. Time matters for the score instead - every second left on the clock is worth 10 points, each life left 100 and getting home 500. A fast run is worth a few hundred points; a careful run that keeps all five lives is worth three stars. If you have to choose, choose the stars.
Checkpoints help more than they look. Once you step on a row with flags at both ends, a lost life brings you back there instead of to the start, and babies you have already rescued stay rescued. On the long levels - Downtown, Lost Idol, Blizzard, Fire Falls and The Crater are 36 rows or more - make sure you actually touch each checkpoint row on the way up.
When we change a level
The rule for us is simple: any change to a level, the generator or the rules is followed by a run of the solver, and every one of the twenty levels must come back “ok”. The table above is from the version you can play today. If you ever meet a Lily Leap level that feels impossible, it is not - but if you are sure it is, write to us, because that would mean the solver and the game disagree, and we would want to know.
← All guides