Example 2: Binary Logic Unit

The following is an applet and its instructions written by Fred Corbett. It is from his website Web Applets for Interactive Tutorials on Artificial Neural Learning. It is demonstrates supervised learning using the perceptron learning algorithm. Using this applet, you can train the perceptron to act as a binary logic unit. It can compute or approximate most 2-input Boolean functions. However, a problem arises when trying to train the perceptron on the XOR (or XNOR) function. The applet provides a "work-around" for this problem by introducing an extra input.

Instructions:

To Train The Perceptron:

  1. Select the desired Boolean function in the truth table.
  2. Select the desired activation function by clicking the activation function image. You can also change some function parameters by holding down the <Shift> key and then clicking the image with your mouse.
  3. Adjust the training parameters as desired. Legal values are as follows:
  4. Click the Train button to begin a normal training session OR
  5. Click the Step button repeatedly to single-step through the training session.

During Training:

  1. To stop a training session (normal or single-step) in progress, click the Stop button.
  2. A few notes:

To Test The Perceptron:

  1. After training Click the Test button repeatedly to cycle through all four input vectors.
  2. Some notes:

To Solve the Exclusive-OR (XOR) Problem:

  1. Click the Show XOR Solution check box.
  2. Set the truth table to the XOR function
  3. Click the Train or Step button to start a training session.
  4. Once the training is complete, click the Test button to check the results.

Single Layer Single Neuron Perceptron Learning

Previous:- Perceptron Learning Algorithm

Next:- Example 3: Perceptron Learning in 2-d pattern space