Skip to content

A single-layer perceptron in x86 assembly to distinguish between circles and rectangles.

License

Notifications You must be signed in to change notification settings

barrettotte/perceptron-asm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

perceptron-asm

Implementation of a single-layer perceptron in x86 assembly.

I was inspired by the very simple perceptron algorithm described in Veritasium's video on analog computers. I also wanted another assembly challenge and I've never written any x86 floating point code before.

Results

This perceptron is a classifier to distinguish between circles and rectangles.

Model trained with 500 samples and 3000 training rounds resulted in 90% success rate.

See model.ppm for the raw image file.
I also generated a video of the training process docs/training.mp4

Perceptron Summary

A perceptron is a simple mathematical model attempting to mimic how a biological neuron works. A neuron fires or activates when the dot product of inputs and weights is larger than the specified bias.

Frank Rosenblatt built the first implementation of a perceptron as a specialized machine in 1958. Read more about the history of the perceptron here.

A single-layer perceptron is the simplest neural network you can make.

Run Locally

  • dependencies: apt install nasm ffmpeg imagemagick
  • build: make
  • build and run: make run
  • build assets: make assets

References

About

A single-layer perceptron in x86 assembly to distinguish between circles and rectangles.

Topics

Resources

License

Stars

Watchers

Forks