CS81 Lab3: Evolving with NEAT

Due by noon next Friday

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

1. Evolving networks that solve XOR

In Lab 1 we used the back propagation algorithm to learn the weights of a fixed architecture neural network to solve XOR. Now we can use NEAT to evolve both the weights and the architecture of a neural network to solve XOR.


2. Evolving networks that control robots to forage for food

The NEAT paper we discussed this week involved 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.


3. 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 file evolveEnergy.py and list each of the choices that were made for each issue given above.

Then in the directory cs81/labs/3/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.

Submit

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