Machine Learning Algorithm Runs On A Breadboard 6502

When it comes to machine learning algorithms, one’s thoughts do not naturally flow to the 6502, the processor that powered some of the machines in the first wave of the PC revolution. And one definitely does not think of gesture recognition running on a homebrew breadboard version of a 6502 machine, and yet that’s exactly what [Nick Bild] has accomplished.

Before anyone gets too worked up in the comments, we realize that [Nick]’s Vectron breadboard computer is getting a lot of help from other, more modern machines. He’s got a pair of Raspberry Pi 3s in the mix, one to capture and downscale images from a Pi cam, and one that interfaces to an Atari 2600 emulator and sends keypresses to control games based on the gestures seen by the camera. But the logic to convert gesture to control signals is all Vectron, and uses a k-nearest neighbor algorithm executed in 6502 assembly. Fifty gesture images are stored in ROM and act as references for the four known gesture classes: up, down, left, and right. When a match between the camera image and a gesture class is found, the corresponding keypress is sent to the game. The video below shows that the whole thing is pretty responsive.

In our original article on [Nick]’s Vectron breadboard computer, [Tom Nardi] said that “You won’t be playing Prince of Persia on it.” That may be true, but a machine learning system running on the Vectron is not too shabby either.

7 thoughts on “Machine Learning Algorithm Runs On A Breadboard 6502

          1. You could execute it on a Turing machine with a long enough tape – mind you, the tape would probably need to move faster than c to get any great throughput.

            Hardware assist doesn’t bother me, it isn’t as though it is just interfacing to the hardware that is on an AI accelerator stick. I always like to see a 6502 in a project, it takes me back 35 years when I wrangled overlaid ROMs (27513 anyone?) in embedded systems (though the HD64180 did put paid to even the 16 MHz 6502 variants, a 512K address space with hardware memory mapping, as well as lots of other on chip goodies, just wiped the floor with them).

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.