Re-Learning ML on my Blackboard
You gotta work bitch
I learn best at a blackboard. Engineering Science at Oxford taught me that you don’t understand a concept until you’ve done it standing up, on a whiteboard, with someone watching who will eagerly tell you when (but not where) you fucked up.
Frequently I fear I’ve atrophied in a number of ways since I did ML in my undergraduate.
I decided to make my own course to properly learn modern machine learning, from SVMs up to RL for reasoning models - but I wanted it with the sensation of a tutorial.
So on Friday I opened Claude Code and asked for a course “starting simple (SVMs, kernel trick)”, where I could work from a web page and papers. I also wanted to use the chalkboard on my wall to draw and derive things, and to have a webcam watching so the AI could grade me.
One session later I have a course page, a camera rig, and a strict tutor watching my board.
The course
The course is one local HTML page: 31 modules in seven parts.
- Classical foundations: margins, kernels, generalisation, ensembles, latent variables.
- Deep learning: backprop, loss functions and activation functions (each gets its own module), convnets, optimisation, attention, generative models, RL foundations.
- Transformers and LLMs: the modern transformer in detail, pretraining at scale, efficient inference, long context.
- Post-training and reasoning: RLHF, DPO, GRPO and the R1-style RL for reasoning, agents and evaluation.
- Multimodal: ViT and CLIP, VLMs, diffusion and flow matching at scale.
- Research frontier: interpretability, deep-learning theory, and a capstone defended at the board.
- Ilya’s reading list: the ~30 papers Ilya Sutskever reportedly gave John Carmack. It was never officially published, so it’s the 27-item version that circulates.
There are 177 papers, a coding lab per module, and 114 blackboard drills.
A drill is a short prompt with a marking rubric.
Drill 1.1, for example:
In 2-D, draw two classes (× and ○) that are linearly separable. Draw the separating hyperplane, both margin lines, the normal vector , and circle the support vectors. Label the three lines with their equations and mark the margin width.
The rubric has five lines: perpendicular to the boundary and pointing to the + class; margins parallel, equidistant and labelled ; boundary labelled; support vectors on the margins with none inside; width labelled .
The hardware
- An Anker PowerConf C200 webcam on
/dev/video0. Its best mode is MJPEG at 2560×1440 @ 30fps. - A green chalkboard in an aluminium frame, portrait, on the wall across the room. It fills only about 600×900 px of the frame, at an angle (the right edge is nearer the camera).
- An IKEA KAJPLATS GU10 bulb (470 lm, colour and white spectrum) above the board, controlled through Home Assistant.
- A Linux desktop with an RTX 2060 SUPER. (yes I’m GPU poor
)
Finding the board
The camera is fixed, so the whole job is: find the four corners of the board once, then warp every snapshot into a flat, upright rectangle.
Since my webcam doesn’t move it’s trivial to just get your agent to measure it. 
Claude cropped 120 px windows around each corner, overlaid a 10 px grid, read the corners off them, and wrote them to board.json.
board.py calibrate --manual (click the four corners) is the fallback if the camera ever gets knocked.
Focus
With the corners fixed, the board was still blurry.
Autofocus had locked onto the nearest large object, which was my head. 

To resolve this I elected to turn autofocus off and sweep the focus while scoring each setting on the dewarped board only. To score a focus configuration I used Tenengrad (mean squared Sobel gradient) on the board at roughly native resolution. Annoyingly the lens/MJPEG pipeline takes a small amount of time to settle after a focus change - approximatley 20 frames, which I had to factor in with a settling time.
My focusing calibration uv run board.py focus searches coarse to fine:
- Coarse: every 20 units over the whole range.
- Fine: every 4 units over ±24 around the coarse peak.
- Exact: every 1 unit over ±5 around the fine peak, run twice and averaged, then a parabola through log-sharpness at the top three points. (Isn’t AI assistance insane?)

def _score_at(cap, corners, f, settle=20, n_avg=3):
set_focus(f)
for _ in range(settle): # lens move + MJPEG pipeline lag
cap.read()
frames = [cap.read()[1].astype(np.float32) for _ in range(n_avg)]
return sharpness(np.mean(frames, axis=0).astype(np.uint8), corners)
c, _ = sweep("coarse", range(300, 651, 20))
f, _ = sweep("fine", range(c - 24, c + 25, 4))
e, sc = sweep("exact", range(f - 5, f + 6), repeats=2)
It takes about 40 seconds and landed on 452.
The top of the curve is flat to about 2% between 449 and 455, which is roughly as finely as this camera can tell focus apart.
The result is saved in board.json, and every capture sets it before grabbing frames to ensure the sharpest possible capture.
Light and noise
I’m Gen Z (surprisingly) so I like my office moodily lit.
This annoying fact means the camera turns its gain up, and the MJPEG encoder turns the resulting noise into blocks.
Chalk is also somewhat faint, and blocks look a lot like chalk.
To try and combat sensor noise, every snapshot averages 12 frames.
We can do better and make more light get to the sensor though..!
As I’m a bit of a nutter and I love having a smart home I can make the capture proceedure temporarily turn on the spotlight above the blackboard to get more light into the sensor.
snap reads my spotlight’s state from the Home Assistant REST API, sets it to a known colour (pastel magenta for the photo Claude grades from, then 6500 K white for the one I see; see the light test below), waits a second, grabs with extra warm-up frames so auto-exposure settles, and then puts the light back exactly as it was.
prev = light_state()
light_on(brightness=200, color_temp_kelvin=6500)
time.sleep(1.0)
try:
img = grab(warmup=45) # extra frames so auto-exposure settles after the light change
finally:
light_restore(prev) # off, colour temperature or hue: whatever it was before
From photo to something gradeable
The capture pipeline is short:
- average the frames;
- perspective-warp the four corners (
cv2.getPerspectiveTransform) to an upright board 1600 px tall; enhance(): greyscale, subtract a 61 px median blur (this removes uneven lighting and chalk-dust smear), normalise, CLAHE, then a soft threshold between the 70th and 99.7th percentiles, inverted so chalk becomes dark ink on white.
It saves the dewarped colour image, the cleaned one, and latest* copies for Claude to read.

Claude reads both of these outputs.
The cleaned image is better for strokes; the colour one catches faint chalk the threshold throws away. (At least, I think it is? Claude thinks it is? I’m not sure if this is true). 
The grading loop
Once I’ve made a pathetic effort at a task
I say “grade 1.1” in Claude Code.
Claude runs board.py snap 1.1, reads the images, zooms into crops where it’s unsure, scores each rubric line (half marks allowed), and writes something like:
{"drill": "1.1", "score": 5, "outOf": 5, "gradedAt": "2026-11-21T00:35:22Z",
"snap": "snaps/20261121-003522_1.1.jpg", "feedback": "Full marks. ..."}
The feedback is a few sentences with LaTeX, which the page renders. At 80% or above the board photo is attached, and the page shows the photo from my best attempt.

The whole protocol (how to snap, what to ignore on the board, how strict to be, the JSON shape, when not to grade) is in the project’s CLAUDE.md.
That makes the tutor stateless: any future session can pick up and grade.
Super-resolution
The board only fills about 600×900 pixels of the camera frame, so small subscripts are a few pixels tall. I asked Claude to see whether super-resolution could help, on my RTX 2060. I guided it to be particularly careful around inventing or erasing marks - which would be detrimental to any accurate scoring.
The answer was “it’s probably not worth it”
:
- Multi-frame super-resolution needs sub-pixel shifts between frames, and a webcam bolted to a wall doesn’t wobble. Across 60 frames the median shift was 0.02 px (largest 0.04), so shift-and-add on a 2× grid came out identical to plain averaging. The MJPEG blocks sit in the same place every frame, so averaging can’t remove them either.
- More frames barely help: board noise goes from 0.88 grey levels at 12 frames to 0.71 at 60. As far as I understand - MJPEG had already smoothed most of it.
- Learned upscalers (Real-ESRGAN, SwinIR) took 2–17 s a frame and produced the crispest-looking chalk of the lot. The sting in the tail is that they turn uncertain strokes into confident ones. They also thin strokes and add dark outlines. Nothing outright vanished on this board, but “maybe wrong” is exactly what I don’t want a grader to see.

Choosing the light
Since the optics are the limit, the other free knob is the light. The board is green (ish) and the chalk is white, so in principle a coloured light that the board absorbs and the chalk reflects should raise the contrast between them. Before testing that, it’s worth seeing how green the board really is to the camera. Under white light, here’s the board’s brightness as a fraction of the chalk’s in each of the camera’s three colour channels:
The board gives up the most in red, which is what you’d expect from something green, but not by much. To the camera it’s a dull grey-green, not a saturated one, so physics promises a modest gain from red-rich light at best. And a coloured LED is much dimmer than white, so the camera turns its gain up and the noise with it. That’s a trade-off only a measurement can settle.
I had the bulb cycle through 15 settings (three whites, nine colours, two pastels, room light only) and photographed the same handwriting under each.
A blind reading test
I asked for a test that measures the thing I actually care about: can a model read it? Each photo was cropped to the same six lines of my derivation, given a random file name so the colour couldn’t be guessed from it, and handed to independent Claude Haiku subagents, one image each, with instructions to transcribe exactly what’s there and mark anything unreadable. Transcripts were scored against the true text: character error rate, plus whether the marks that matter for grading (superscript T, hats, subscript 0s, minus signs, ‖w‖) survived.
At full size it was a ceiling: 12 of the 17 photos were transcribed perfectly, so at my normal handwriting size any decent light is fine. Shrinking the crops to 30% (about what smaller writing or a further camera would give) pulled the lights apart.

The commonest error tells me something about my handwriting rather than the light: at small sizes my “d” looks like a “t” to haiku.
The physics vaguely held up: the three best lights all contain red, and green, cyan and yellow - the colours the board reflects best - all sat in the bottom half.
But saturated magenta and pink contain red too and didn’t do well, so I wouldn’t push that story further than “vaguely”.
Purple and pastel magenta are a tie on five reads each, and I photographed each light once, so I wouldn’t stake much on the ordering at the top.
6500 K white scored a poor 3.1%, level with red: four of the five reads lost the faint “+ b” at the end of the first line, which is exactly the kind of mark a grade can hinge on.
4000 K white came to a much worse 10%, more than ten times purple’s.
The useful result is that the original snap light I tried was among the worst settings in the test - so we picked up a nice improvement for free! 
With purple and pastel magenta tied, I broke the tie by eye: pastel magenta looked clearest to me too.
snap now takes two shots: a pastel-magenta one that Claude grades from, and a 6500 K white one that goes on the course page, because a magenta photo of my work isn’t much fun to look at.
Each shot takes about five seconds, mostly letting auto-exposure settle on the new colour.
But only the magenta shot is for Claude, so on a snap the magenta shot is taken, the command returns, and a detached background process takes the white one and restores the light while Claude is already reading.
Notes
I got this done in a couple hours one evening. This sort of work with agents is genuinely fantastic - stuff that can enrich my life rather than dominate it.
Testing out ideas such as super-resolution and varying light colours on a hunch was ‘free’ to try out and yielded useful results. I use this pattern a lot at work - I develop a thing but have lots of “spikes” going on at the same time to try and spider out for interesting ‘out there’ gains.
Next up is Module 2: duality and the kernel trick.
It’s shocking how much I’ve forgotten, but surprising how much I am able to recall when pressed. 
Time to waste some more Hagoromo chalk 