MATH 170 · Distance is a choice · Norms & Nearest Neighbors

Nearest neighbors playground kNN

You are the AI. A mystery point — the gold star — lands among labeled circles and squares. Your rule: let the k nearest labeled points vote. Every point on this plot can be dragged, the star included. Move things, change k, change the ruler — and watch the "obvious" answer wobble.

Circles = gold filled ○ · squares = open ink □ · the star is the unlabeled point. Every point drags — or focus one and use arrow keys. Edges connect the star to its k voters.
odd k avoids ties; try an even k on purpose
Try: leave everything where it is and slide k from 1 to 5. Then try k = 2 — now what?