Learning the XOR function Success in 714 training rounds! Result Testset 0; expected output = (-1) output from neural network = (-0.98773992455601) Testset 1; expected output = (1) output from neural network = (0.99021770385316) Testset 2; expected output = (1) output from neural network = (0.99001320215928) Testset 3; expected output = (-1) output from neural network = (-0.9926610458998) Playing around... The following is to show how changing the momentum & learning rate, in combination with the number of rounds and the maximum allowable error, can lead to wildly differing results. To obtain the best results for your situation, play around with these numbers until you find the one that works best for you. The values displayed here are chosen randomly, so you can reload the page to see another set of values... Learning rate 0.25, momentum 0.6 @ (500 rounds, max sq. error 0.001) Round 1: No success... Round 2: No success... Learning rate 0.5, momentum 0.2 @ (100 rounds, max sq. error 0.1) Round 1: No success... Round 2: No success... Learning rate 0.5, momentum 0.6 @ (500 rounds, max sq. error 0.05) Success in 65 training rounds! Testset 0; expected output = (-1) output from neural network = (-0.99889683331258) Testset 1; expected output = (1) output from neural network = (0.96562943402269) Testset 2; expected output = (1) output from neural network = (0.96587166968088) Testset 3; expected output = (-1) output from neural network = (-0.99954589037428) Learning rate 0.1, momentum 0.4 @ (2000 rounds, max sq. error 0.05) Success in 235 training rounds! Testset 0; expected output = (-1) output from neural network = (-0.93815956996353) Testset 1; expected output = (1) output from neural network = (0.96480496687692) Testset 2; expected output = (1) output from neural network = (0.94610266906449) Testset 3; expected output = (-1) output from neural network = (-0.95959664213257) Learning rate 1, momentum 0.2 @ (2000 rounds, max sq. error 0.1) Round 1: No success... Round 2: No success... Learning rate 0.1, momentum 0.2 @ (500 rounds, max sq. error 0.01) Round 1: No success... Round 2: No success... Learning rate 0.75, momentum 1 @ (500 rounds, max sq. error 0.01) Round 1: No success... Round 2: No success... Learning rate 0.25, momentum 0.8 @ (1000 rounds, max sq. error 0.05) Round 1: No success... Round 2: No success... Learning rate 0.5, momentum 0.8 @ (2000 rounds, max sq. error 0.1) Round 1: No success... Round 2: No success... Learning rate 0.1, momentum 0.8 @ (1000 rounds, max sq. error 0.1) Success in 125 training rounds! Testset 0; expected output = (-1) output from neural network = (-0.8919028758211) Testset 1; expected output = (1) output from neural network = (0.88876417630289) Testset 2; expected output = (1) output from neural network = (0.90829888689582) Testset 3; expected output = (-1) output from neural network = (-0.92010510160138)