Assignment 2: Neural Network Exercises (1)
Assigned Tuesday, January 30th
Due Tuesday, February 6th, by 11:59pm - submit electronically.

In this assignment, you will simulate and train some very simple neural networks using the Fast Artificial Neural Network software package.


Part 1: Designing the logical AND function

The first task is to design a neural network that computes the logical AND function. This function takes two inputs and gives an output of 1 if both inputs are 1; otherwise, it gives an output of 0:

Input 1 Input 2 Output
0 0 0
0 1 0
1 0 0
1 1 1

To hand in: 

  1. State the weights you chose.
  2. Report the output for each input pattern, and show how the network works by illustrating the calculations that produced each output.

Part 2: Learning the logical AND function

Now try to make the network learn the AND function. Instead of defining the network by hand, you will set the system with random initial weights that will be adjusted during training. Although you probably don't know yet how exactly the program learns these weights, you will by the end of next week: the algorithm is called "back-propagation," and a short, non-mathematical description can be found here.

2a. Learning without hidden nodes


A few notes:

To hand in:

  1. Briefly describe the learning criterion you used.
  2. Turn in a record of the parameters that you tried as well as an impressionistic account of what happened. Include an example solution.
  3. For what range of settings does the network reliably learn the AND function?
  4. For what range of settings does the network learn about 75% of the time? (That is, for about 75% of your training runs with new, random initial weights.) (Hint: you may want to look for correlations between the randomly initialized weights you get and the resulting learning behavior.)

2b. Learning with hidden nodes

To hand in:

  1. Once again, turn in a record of the parameters that you tried, a general account of what happened, and an example solution.
  2. How much does this new network help?

Part 3: The logical SAME function

The second task is the logical SAME function:

Input 1 Input 2 Output
0 0 1
1 0 0
0 1 0
1 1 1

To hand in:

  1. Turn in records of the parameters that you tried, a general account of what happened, and an example solution.
  2. How do the results differ in this case? Explain why.