Click the flag to start the training. Once both the weights equal 1 then it has reached 100% accuracy (although it doesn't seem to work with really large numbers). p.s. The perceptron is learning how to add numbers. p.p.s. The bias is shown in the image but isn't calculated. Some Things I learned: 1. Sometimes biases aren't helpful. 2. One layer perceptrons can't do much. 3. Instead of training for more generations, increase the sample size for faster and more accurate learning. 4. Wikipedia makes everything over complicated.
Code made by @Matrix_coder but most of the math was taken from https://en.wikipedia.org/wiki/Perceptron.