Perceptron by hand

Apply the perceptron rule to the three points (0,0) (class 0), (1,0) (class 1), (0,1) (class 1), starting from w=(0,0), bias 0, with the order of presentation (0,0), (1,0), (0,1) repeated. Give the weights after each correction until convergence.

Write the state as (w_1,w_2;w_0). Start at (0,0;0). The convention is f(0)=1.

Present (0,0), class 0: net input 0, output 1\neq 0. Subtract (0,0) and set w_0\leftarrow -1, giving (0,0;-1).

Present (1,0), class 1: net input -1<0, output 0\neq 1. Add, giving (1,0;0).

Present (0,1), class 1: net input 0\ge 0, output 1, correct.

Second pass. (0,0): net input 0, output 1\neq 0, so w_0\leftarrow -1, giving (1,0;-1). (1,0): net input 0, output 1, correct. (0,1): net input -1<0, output 0\neq 1. Add, giving (1,1;0).

Third pass. (0,0): net input 0, output 1\neq 0, giving (1,1;-1). (1,0): net input 0, output 1, correct. (0,1): net input 0, correct.

Fourth pass. (0,0): net input -1, output 0, correct. (1,0) and (0,1) are correct. The rule has converged at (1,1;-1), the boundary x_1+x_2=1. A point on the boundary counts as class 1.