Simple perceptron (affectionally named Alfred) made from scratch in c++ with a gui input method
before everything else, make alignWeights.sh and resetWeights.sh executable.
chmod 744 alignWeights.sh resetWeights.sh
To compile the program use:
g++ -o main.cpp-out main.cpp drawing.cpp Perceptron.cpp -lsfml-graphics -lsfml-window -lsfml-system
./main.cpp-out
I dont care if you use windows.
If you want to see the weights open aligned_weights.txt, the weights are aligned as the program is used.
If the program got any input it will also create pixels_nice.txt
which is just a slightly formatted version of what it's getting as input.
After running the program a window of size 800x600 should appear. This is the input. Draw either a non filled circle or rectangle (as that's what it has been "trained" on).
draw under cursor
erase under cursor
erase entire window
update the input without actually inputting it (mostly for debugging)
input - after this switch to terminal to see the output
The accuracy is ~59.2% on account of my bad drawing skills and small data set