Too much energy to return
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
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.
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.
#07: 472 s from take-off to landing; 80443 J including service and the unloaded return. 14557 J remain on landing.
Computed from this case · 3.17 ms · lab-1.0 · hilltop
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
Fits the complete-trip budget
Budget: 80.75 kJ. Totals include outbound flight, service and unloaded return.
Route elevation · actual waypoint heights
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
| Inspect | Candidate | Out (s / J) | Service (s / J) | Back (s / J) | Total (s / J) | Reserve check |
|---|---|---|---|---|---|---|
| 0 | 201 / 56539 | 45 / 4500 | 201 / 23708 | 447 / 84747 | over budget | |
| 1 | 222 / 53212 | 45 / 4500 | 201 / 23708 | 468 / 81420 | over budget | |
| 2 | 226 / 52235 | 45 / 4500 | 201 / 23708 | 472 / 80443 | fits |
Play the recorded flight, or drag the time slider.
Time and shared resources
NowThe 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.
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.
- you can tell "this candidate failed" from "no feasible route exists in the stated search range"
- your dominance rule keeps both labels at Q, and the fastest-only version reports no solution
- you can state the assumptions under which the dominance rule holds
Teaching team
- Kofi Marchetti — tutor