SMRTR AISep 29, 2025Hacker News

ML on Apple ][+

ML on Apple ][+

SMRTR summary

Machine learning meets nostalgia as one programmer tackles k-means clustering using APPLESOFT BASIC on an Apple II+. The recursive algorithm, which partitions data points into clusters, achieves 90% accuracy classifying Gaussian-distributed observations on hardware from the late 1970s.

K-means works through elegant simplicity: randomly place cluster centers, assign each data point to its nearest center using Euclidean distance, then recalculate centers based on those assignments. Repeat until convergence.

The implementation required creative workarounds for BASIC's limitations. Since expensive square root calculations weren't necessary for distance comparisons, the programmer used squared distances instead. Memory management became crucial, as redeclaring arrays triggers errors in APPLESOFT BASIC.

Visual elements enhance the demonstration. The program draws decision boundaries between clusters in real-time, showing the algorithm's iterative progress. A perpendicular bisector between cluster centroids creates the classification boundary, with special handling for vertical slopes and screen edge cases.

The project bridges decades of computing evolution. What Stanford's CS229 teaches as introductory unsupervised learning now runs on vintage hardware with 48KB of RAM. Despite the constraints, the fundamental mathematics remain unchanged, proving that core machine learning concepts transcend technological generations.

SMRTR provides this summary for quick context. The original article belongs to Hacker News.

Read the original article
SMRTR AI

Get the next batch of curated stories in your inbox.

This archive is built from SMRTR newsletter stories. Subscribe for hand-picked stories without the extra noise.

Related Stories

Browse AI
AIAug 27, 2026

SpaceKit AI

SpaceKit AI is a public research hub for Growformer, an ML system with a promote-freeze neural substrate, language model experiments, neural cellular automata, and reproducible...

AIAug 27, 2026

Small Models Have Arrived

Small AI models are now 10x cheaper than before, making high-volume consumer and business AI apps financially viable—tasks costing $1 now cost ~$0.10, enabling affordable,...

AIAug 27, 2026

Why I Am Right About AI

The piece satirizes tech-bro certainty about AI replacing writers, using absurd logic and fake statistics to parody real thought leaders—exposing how hollow and self-serving those...