Place a request
Draw two book points and a requested length/adventure point.
Ask: “Which book is closest using both directions?”
Listen for: “We need to consider both differences.”
Brightlab
Year 5 · Similarity
Who decides what a good match looks like?
Go to the investigation ↓An annotated recommendation map with weights, a ranking comparison and an omitted-needs check.
What makes a book similar enough to recommend?
Our fictional books have two features: length and adventure level. A request is a point on the same map. Weighted distance squares the differences, multiplies them by chosen weights and adds them. Changing a weight stretches one direction of the map and can reorder recommendations. The nearest point is best only according to those features and weights; it says nothing about an unrepresented quality such as accessibility.
Before this lesson: Measure distance on a feature map. Useful earlier investigations: Meet the almost-like creatures.
Our fictional books have two features: length and adventure level. A request is a point on the same map. Weighted distance squares the differences, multiplies them by chosen weights and adds them. Changing a weight stretches one direction of the map and can reorder recommendations. The nearest point is best only according to those features and weights; it says nothing about an unrepresented quality such as accessibility.
Measure distance on a feature map. Useful earlier investigations: Meet the almost-like creatures.
Print the six fictional book records. Work through one squared-distance calculation with equal weights. Clarify that adventure scores are supplied invented metadata, not reader judgements collected from students.
ACARA V9 AI curriculum connection ↗ · Technologies ↗
A complete teaching sequence · 65 minutes
Draw two book points and a requested length/adventure point.
Ask: “Which book is closest using both directions?”
Listen for: “We need to consider both differences.”
Predict the leading book when the length weight increases with request fixed.
Ask: “Which difference now costs more?”
Listen for: “Being far from the requested length.”
Move the request, inspect linked distance segments and then freeze it while changing one weight. Record three rank lists.
Ask: “Did the books change when the ranking changed?”
Listen for: “No, the rule for comparing them changed.”
Read the edge-case reader who needs large print. No map feature represents it.
Ask: “Can the smallest distance guarantee a suitable book?”
Listen for: “No, it ignores print accessibility.”
Choose weights for a stated fictional request, then add a human-check field for an omitted need. Justify one trade-off numerically.
Ask: “What can your score claim, and what must someone still check?”
Listen for: “It matches the two features; someone must check accessibility.”
Submit a fixed-query comparison and limitations note.
Ask: “Would another reasonable person choose different weights?”
Listen for: “Yes, if their priorities differ.”
Closest means objectively best.
The nearest book can fail an unrepresented accessibility requirement.
Choose a transparent weighting and a separate human check for an omitted need; reproduce the ranking from distances.
Ask the learner to calculate the two feature contributions for the leading book. Check they distinguish the score’s claim from overall suitability.
| Criterion | Beginning | Secure | Extending |
|---|---|---|---|
| Distance reasoning | Uses visual proximity only | Explains weighted contributions | Reproduces a rank change numerically |
| Value critique | Treats rank as objective quality | Names an omitted need | Designs and tests a complementary check |
Use integer coordinates and squared-distance sums without square roots. Offer a printed coordinate table.
Compare Euclidean and Manhattan distance for the same points and identify a ranking disagreement.
No reading histories or student preference profiles are collected. All books and requests are fictional.
Shared device? Turn remembering off. A project file lets you continue on another device.
Your browser is the laboratory
Increase the length weight while the request and all book records remain fixed. Predict which rank changes first.
Fictional book coordinates: Sand Atlas (2,3), Reef Run (4,9), Night Walk (6,6), Cloud Notes (8,2), Long Crossing (9,8), Pocket Trail (1,7). Request starts (5,6). Both feature weights start at 1.
The experiment opens after your prediction.
There is no penalty for being surprised.
Apple Silicon · PyTorch MPS
Compute weighted distances for a large synthetic catalogue on MPS/CUDA. Move the query and inspect recommendation stability over six feature-weight settings; repeat on CPU for comparison.
Students extend the experiment in teams, documenting parameters, outputs and limitations.
The bundle contains lesson-specific working code, a configuration file, a reactive notebook, a deterministic CPU check and hardware setup instructions. Acceleration is reported only after a tensor operation and result read-back succeed.
Download Mac Studio investigation ↓unzip y5-distance-mac-pathway.zip -d y5-distance-mac cd y5-distance-mac bash setup-mac.sh source .venv/bin/activate python experiment.py --device mps --output results marimo edit notebook.py
CPU and available-device execution status is recorded in the downloaded README and validation report. DGX Spark execution requires that hardware; static validation alone does not establish GPU compatibility or performance. The browser lesson remains fully available without this extension.
NVIDIA DGX Spark · PyTorch CUDA
Compute weighted distances for a large synthetic catalogue on MPS/CUDA. Move the query and inspect recommendation stability over six feature-weight settings; repeat on CPU for comparison.
Students extend the experiment in teams, documenting parameters, outputs and limitations.
The bundle contains lesson-specific working code, a configuration file, a reactive notebook, a deterministic CPU check and hardware setup instructions. Acceleration is reported only after a tensor operation and result read-back succeed.
Download DGX Spark investigation ↓unzip y5-distance-dgx-pathway.zip -d y5-distance-dgx cd y5-distance-dgx bash run-dgx.sh # Open the localhost notebook URL printed by the container.
CPU and available-device execution status is recorded in the downloaded README and validation report. DGX Spark execution requires that hardware; static validation alone does not establish GPU compatibility or performance. The browser lesson remains fully available without this extension.
An annotated recommendation map with weights, a ranking comparison and an omitted-needs check.
Download the editable handout →