Robby the Robot

Jonathon Sumner
Physics Department
Dawson College
April 24, 2019
April 25, 2019

Meeting 13

The objective of this lab is to design an optimal strategy for a room-cleaning robot using a genetic algorithm.

Code

There are two pieces of code today.

  1. GAStudents.java is where you will implement the genetic operators. I have already taken care of the other pieces (encoding the problem, randomly generating an initial population, evaluating the fitness of a given strategy, and a roulette wheel for selecting parents). I encourage you to browse through the code before getting started to get an overall picture of how things work.
  2. DrawStudents.java allows us to test our optimal strategy under various conditions that will give us some insight into how the optimal strategy works. You do not need it until you have submitted your best GA strategy online and are satisfied with its score.
GAStudents.java
DrawStudents.java

In the lab

Implementing the genetic operators

Task 1.
Task 2.

Evolving a solution

Task 3.

As homework

Understanding Robby

The optimal solution (~95%?) evolved by the genetic algorithm is sneaky good. It may take many runs to evolve a solution that gets those last few percentage points, but it is worth it because something truly interesting will happen. The goal here is to understand the magic in this optimal solution.

Once your optimal GA solution scores in the mid 90s, submit it to the web app and prepare a short report answering the following questions. Be sure to include your optimal solution in your report!

Task 4. No cans nearby
Task 5. Many cans nearby
Task 6. Randomness
Task 7. Specificity

Open challenge

Task 8. (Optional)