CS81 Lab2: Evolving neural network brains for robots

Due by noon next Wednesday

In this lab you will experiment with an evolutionary computation method called NEAT (Neuro Evolution of Augmenting Topologies) developed by Kenneth O. Stanley. NEAT operates on both the weights and the structure of the neural network, allowing connections and nodes to be added as potential mutations. We will be using a python package that implements NEAT.

Getting started

Evolving networks that solve XOR

In Lab 1 we used the back-propagation algorithm to learn the weights of a fixed architecture neural network. Now we can use NEAT to evolve both the weights and the architecture of a neural network. We will begin exploring NEAT by using XOR as a testbed.

Evolving networks that solve AND

We know that neural networks can more easily learn linearly separable functions. XOR is an example of a function that is not linearly separable, while AND is an example of a function that is linearly separable. Let's see if NEAT can more easily find solutions to the AND problem.

Evolving networks that control robots to forage for food

The NEAT paper we are discussing this week uses a very time consuming fitness test intended to create a co-evolutionary arms race. We will experiment with a simpler scenario in this lab. Rather than a robot duel, we will focus on a single robot foraging for food. We will place the robot in a world with 10 randomly located lights, representing food, and allow it to explore and eat as long as it has energy to move. We will test the robot with three different random placements of the food. The network has three input units representing the left and right light sensor values as well as an energy warning value. As its energy level gets low the warning value increases. The network has two output units representing the motor speeds of the left and right wheels of a simulated Pioneer robot. The fitness value is based on the total number of steps the robot survives in the three trials.

Modifying the foraging task

There are many different ways of implementing a food foraging task. Each of the choices made in the above program could affect the types of behavior that resulted. Here are just some of the issues that must be considered:

Look carefully at the files given for this task and list each of the choices that were made for each issue given above.

Then in the directory cs81/labs/2/ modifiedTask create your own version of the food foraging task that makes some different choices. In the text file experimentalLog keep a record of the options you tried (even if they failed). Be sure to explain each idea you explored, how you tested its effectiveness (list key parameter settings such as population size, maximum number of generations, etc.), and the results.

For example, you might decide that testing each network in random environments is too noisy, and that a better test would be to use a fixed environment similar to the one in the robot duel. Re-write the code to do this, run it, and report on what happens.


When you are done run handin81 to turn in your completed lab work.