Inspiration
Machine learning is usually taught as equations on a slide. We wanted first-year students to feel it: move a decision boundary with their hands, watch eggs get misrouted, and see why loss and gradient descent exist. And we wanted everyone to be able to do it, including students who are deaf or hard of hearing.
What it does
Professor Quack's egg factory has a broken sorting machine the night before a big shipment. You build a new one that learns from inspectors' labelled examples, over six lessons:
- Describe the eggs: each egg becomes a feature vector (mass, length, then width), a point in a 3D plot.
- Build the sorting rule: drag a plane through feature space, \( z = w \cdot x + b \), and watch the conveyor route eggs live.
- Measure mistakes: probabilities \( p = \sigma(z) \), confidence bands, and cross-entropy loss versus accuracy.
- Explore the loss landscape: a labelled 2D slice of parameter space (other parameters held fixed).
- Teach the machine: step through gradient descent; too small a learning rate crawls, too big a one overshoots.
- Test: evaluate on held-out eggs, then sort a 10,000-egg batch.
Professor Quack is a Gemini-powered tutor. He sees what you are actually doing (your parameters, mistakes and recent actions), asks a leading question before giving answers, highlights what he's talking about, and walks to that part of the room.
Accessibility
The whole experience works with sound off: persistent adjustable captions, captioned non-verbal sounds, text questions, shape and colour for every class, reduced-motion and less-chatter modes, pause, replay and history. Voice and push-to-talk are optional extras.
How we built it
- Unity 6 (URP) for one shared 3D world on desktop, browser (WebGL) and Meta Quest 3 via OpenXR.
- All maths is our own C# (standardised features, logistic regression, BCE + L2, gradient descent, plane geometry), checked against a Python reference and analytic vs numerical gradients. Every visual is generated from the same numbers.
- Node.js backend mediating Gemini: structured JSON replies (speech, emotion, gesture, highlight, whiteboard recap) validated against a schema, Gemini TTS for the voice with an amplitude envelope driving the beak, and Gemini transcription for push-to-talk. The API key stays server-side.
- The character body was AI-generated, then cleaned and rigged in Blender, with a code-driven face (eyes, brows, beak).
Challenges
- Keeping feature space and parameter space unmistakably distinct, and being honest that the loss landscape is a slice.
- Making a tutor responsive rather than chatty: coalescing reactions, cooldowns, and grounding every reply in game state.
- Generated 3D characters with multiple faces; rate limits on speech synthesis; VR comfort.
What we learned
How much clearer convexity, learning rates and generalisation become when you can stand inside them, and that accessibility has to be designed in from the start, not added at the end.
What's next
User testing with first-year students, more lessons (non-linear boundaries), and saved progress.
Availability
Play it on Windows, in PC VR, or in your browser at professorquack.courses.