Skip to main content

Week 4 Tutorial: Keep the route home

Ridge or contour: complete the budget and dominance checks, show what single-label pruning loses, confirm by enumeration.

17 March 2027

You are hereW4 · #07 on the hilltop

Open Week 4 in the Lab →Try your own change on this week's case.

Two-hour tutorial: preparation, coding and checks

This week’s task

Model: #07 on the canonical map, one L drone, loaded outward/service/unloaded return and a 15% reserve. The small label example uses separate teaching units.

Before you start · 15 minutes

Read W4. Calculate 95−14.25=80.75 kJ usable energy. Predict whether the faster candidate can finish the complete trip.

Trace the example · 25 minutes

Try keeping only the fastest label. Restore the starting example and explain why the slower label must survive. Inspect both complete candidates and the elevation profile.

Implement and compare · 55 minutes

Complete dominates and withinBudget in strategies.mjs. Use the preset code as a contract, then test incomparable labels and the exact reserve boundary. Trace one retained prefix through service and return.

Use Open full Lab for editable inputs, strategy code, exports and the practice pack. The example on this page compares this week’s published cases; your local student runner must call the functions you complete.

Check and explain · 25 minutes

Export a baseline and changed record. Give full-trip seconds, energy and reserve; identify the lost feasible route. Do not call the order impossible because one rule pruned it.

What to keep: A1: resource labels, full-task checks and a failure explanation. Show the tutor your prediction, experiment and explanation for this week’s participation point; keep the record to develop your assignment.

Optional extension

Switch to H and repeat. Compare algorithms within a fixed drone type; comparing L with H changes the model.

W4 · Count the return energy.

Week 4 · This week’s decision

Which time–energy labels must survive until the return is checked?

Deliver #07 to the hilltop home and return to the kitchen. The fastest route uses too much battery.

Checks passed

#07: 472 s from take-off to landing; 80443 J including service and the unloaded return. 14557 J remain on landing.

Trip time (s)472
Trip energy (J)80443
Usable budget (J)80750

Computed from this case · 3.17 ms · lab-1.0 · hilltop

Starting case is ready.
Slop Hill · terrain & routes
0102030405060708091011121314151617181920KitchenSLOP HILL · 165 mNorth blockTOWER PASSAGESouth blockKitchen lowlandsNorth way roundSouth way roundElevation · low → hilltopN ↑ · metres east / north400 m

Colour bands show ground elevation. The marked passage runs between two towers; its rule allows one drone at a time. Height shown at 3× scale.

Keep both time and energy

Ridge · faster447 s84.7 kJ

Too much energy to return

Contour · gentler472 s80.4 kJ

Fits the complete-trip budget

Budget: 80.75 kJ. Totals include outbound flight, service and unloaded return.

Route elevation · actual waypoint heights0m50m100m150m0 m · take-off5041 m · return

Read these lines with the route legend above. Distance includes the complete outbound and return trip.

Explore the evidence, replay or open full Lab

Open full Lab ↗ for editable inputs, strategy code and saved comparisons.

The wrong rule discards the slower prefix that can return within the battery budget.

Read the example above

The wrong rule discards the slower prefix that can return within the battery budget.

One drone; complete trips · No shared charging in this model · Corridor reservations not active

Complete trips · outbound + service + unloaded return
InspectCandidateOut (s / J)Service (s / J)Back (s / J)Total (s / J)Reserve check
0201 / 5653945 / 4500201 / 23708447 / 84747over budget
1222 / 5321245 / 4500201 / 23708468 / 81420over budget
2226 / 5223545 / 4500201 / 23708472 / 80443fits
0 s

Play the recorded flight, or drag the time slider.

Time and shared resources

Now 0 s

The vertical line marks the current time; outlined intervals are active. Select an interval to jump to its start. Intervals include their start and exclude their end.

A

0 s 3138 s

Continue in the Lab →The same case, with every input open to change.

The spec

What you bring to the session. Written so a reader can tell whether it has been met without asking you.

Teaching team