Artificial Minds - Spring 2009

Homework 11

Due by class time Thursday, May 7

Reading

Written Questions

  1. We would like to train the perceptron network below on the patterns A, B, C, and D shown in the table (some of which have non-binary inputs). The threshold of the perceptron is fixed at 0. The output of the perceptron is 1 if the total incoming activation is strictly greater than the threshold, and the output is 0 if it is less than or equal to the threshold.

         pattern      target
    A:  1  -1  0.5      1
    B:  1   0    1      1
    C:  1   1  0.5      0
    D:  1   2    1      1
    

    Recall that according to the perceptron training rule, the amount to change each connection weight is given by:

        weight change  =  learning rate × input × error

    where input represents the input on that connection, and error is the difference between the desired output and the perceptron's actual output.

    1. Apply the perceptron training rule, using the initial weights shown in the table below (weight1, weight2, weight3) and assuming that the learning rate is 0.2. Continue filling in each line of the table until the error for all patterns reaches 0 and learning has converged.

      pattern weight1 weight2 weight3 target output error weight1 change weight2 change weight3 change
      A-0.20.10.41     
      B   1     
      C   0     
      D   1     
      A   1     
      B   1     
      C   0     
      D   1     
      A   1     
      B   1     
      C   0     
      D   1     

    2. Suppose that we add a fifth pattern E: 1, 1, 1.5 to the dataset, with a target of 0. Would it be possible to re-train the perceptron network to classify all five patterns correctly? Why or why not?

    3. Suppose instead that E is the pattern 1, 2, -0.5, with a target of 0. Would it be possible to train the perceptron network to classify all five patterns correctly in this case? Why or why not?

  2. After graduation you find a job working in the computer industry and are assigned the task of creating a security system based on camera images. Each room in the building has very limited access (with at most 10 different individuals allowed in). For each room you have a database of images representing the individuals who have access. Your system needs to take an image from a security camera and determine if the person can enter the room. Describe how you would apply a neural network to accomplish this task. Be specific about the network's architecture, including the exact form of the network's input and output patterns. How would you represent the camera images? How would you train the system?

  3. Consider a genetic algorithm with the population of chromosomes shown below, and a fitness function that counts the number of 0's in a chromosome.

    A: 1010010101
    B: 0011111011
    C: 0110101101
    D: 1111110111
    E: 1100000001
    F: 0101010101
    
    1. Show the fitness values that would be assigned to each of the above chromosomes. What is the average fitness of the population?

    2. For each chromosome, calculate the probability of its being chosen for reproduction, assuming that fitness-proportionate selection is used to select chromosomes. Express each probability as a percentage in the range 0%-100%.

    3. Suppose that the next generation contains the chromosomes 0011111111 and 1000000001. Explain exactly how these particular chromosomes could have been produced from the previous population using only the crossover operator.

    4. Without the mutation operator, would it be possible for the highest-fit chromosome 0000000000 to ever be produced from the above population? Why or why not?

  4. Consider the following individuals produced in Karl Sims' experiments on evolving virtual creatures with genetic algorithms:

    For each creature, show the genotype (i.e. the directed graph structure) that would be used to represent the creature's body. You don't need to specify the detailed parameter values, just draw the nodes and links of the genotype structure.

  5. In a genetic algorithm, decisions such as whether to select a chromosome for reproduction, which point to cross over two chromosomes, whether to mutate a bit in a chromosome, etc. are made probabilistically rather than deterministically. What is the advantage of this?

Turning in your homework

Write out your answers to the above questions clearly and legibly on paper, and turn them in to me in class on Thursday. If I have to struggle to read your answers, you'll lose points on the assignment, so please take the time to write neatly. If you have questions about anything, don't hesitate to ask!