;; Dribble of # started 2006-04-05 11:46:24 # [2]> (load "perceptron.lisp") ;; Loading file perceptron.lisp ... ;; Loaded file perceptron.lisp T [3]> (train-it) Iteration limit is 999 Learning constant is 0.5 Initial weights vector is (0 0 0) DOING ITERATION 1 Doing example (-1 0 0 0) Sum is 0. Output is 0, desired output is 0 Results equal, do nothing. Doing example (-1 0 1 1) Sum is 0. Output is 0, desired output is 1 The output should have been 1. Add half of the weights to the inputs. New weights is (-0.5 0 0.5) Doing example (-1 1 0 1) Sum is 0.5. Output is 1, desired output is 1 Results equal, do nothing. Doing example (-1 1 1 1) Sum is 1.0. Output is 1, desired output is 1 Results equal, do nothing. DOING ITERATION 2 Doing example (-1 0 0 0) Sum is 0.5. Output is 1, desired output is 0 The output should have been 0. Subtract half of the weights from the inputs. New weights is (0.0 0 0.5) Doing example (-1 0 1 1) Sum is 0.5. Output is 1, desired output is 1 Results equal, do nothing. Doing example (-1 1 0 1) Sum is 0.0. Output is 0, desired output is 1 The output should have been 1. Add half of the weights to the inputs. New weights is (-0.5 0.5 0.5) Y intercept is -1.0, X intercept is -1.0 Doing example (-1 1 1 1) Sum is 1.5. Output is 1, desired output is 1 Results equal, do nothing. DOING ITERATION 3 Doing example (-1 0 0 0) Sum is 0.5. Output is 1, desired output is 0 The output should have been 0. Subtract half of the weights from the inputs. New weights is (0.0 0.5 0.5) Y intercept is 0.0, X intercept is 0.0 Doing example (-1 0 1 1) Sum is 0.5. Output is 1, desired output is 1 Results equal, do nothing. Doing example (-1 1 0 1) Sum is 0.5. Output is 1, desired output is 1 Results equal, do nothing. Doing example (-1 1 1 1) Sum is 1.0. Output is 1, desired output is 1 Results equal, do nothing. DOING ITERATION 4 Doing example (-1 0 0 0) Sum is 0.0. Output is 0, desired output is 0 Results equal, do nothing. Doing example (-1 0 1 1) Sum is 0.5. Output is 1, desired output is 1 Results equal, do nothing. Doing example (-1 1 0 1) Sum is 0.5. Output is 1, desired output is 1 Results equal, do nothing. Doing example (-1 1 1 1) Sum is 1.0. Output is 1, desired output is 1 Results equal, do nothing. Converged after 3 iterations. NIL [4]> (dribble) ;; Dribble of # finished 2006-04-05 11:46:42