This is an implementation of the single-layered, two-dimentional perceptron with training visualization using p5js.
Code is based on "Ch 11: Perceptron Learning" in George Luger's "Artificial Intelligence" and inspired by coursework from NYU 2017 ITP "Intelligence and Learning" course and Daniel Shiffman @shiffman.
This is a classification problem. The goal of which, is for the perceptron to adjust it's discrimination function (green line) to fit the training data (bichromatic circles). "Learned" training data are drawn more opaque than those to which the perceptron has yet to be exposed. Data outlined in white are correctly classified by the discriminant function.
More information is available at Wikipedia's Simple Perceptron Example.