CS 5970 Programming Assignment 2 — Genetic Programming
Due Monday, Sep 27, 2010
NOTE: The hardcopies of the parts of this assignment are due at
the beginning of the class period. This means that if you are
even a minute late, you lose 20%. If you are worried about
potentially being late, turn in your assignments ahead of
time. Do this by submitting them to me during office hours or by
sliding them under my office door. Electronic copies are due by 4:00
pm on the due date. Submit them through D2L before the time they are
due. Do not send assignments to me through email or leave them in my
departmental mail box.
1. Motivation
The required components of evolutionary computation are replicators,
replication, and a selection mechanism, and we require that the
replication be high fidelity. When we go to create a particular
evolutionary computation implementation, we need to decide on
particulars for each of the requirements as well as others. Some of
the questions we need to answer to create our implementations are:
- What will the replicators be? Bits? Floats? Strings?
Something else?
- How will they be organized? In an array? Multiple arrays? A
tree? Etc.
- Etc.
All of these decisions need to be made in the context of the
particular problem to which evolutionary computation will be applied
(for example, the replicators in combination must be able to represent
solutions to the problem in question). These decisions will also
effect the unfolding of the evolutionary process (e.g., how quickly it
converges to a solution).
2. Goals
The goals of this assignment are:
- to give you additional baseline experience with implementing a
evolutionary computation system,
- to give you experience with genetic programming in
particular,
- to familiarize you with some of the options facing evolutionary
computation implementors, and
- to give you experience with observing the evolutionary
process.
3. Assignment Overview
You will design, program, and run a simple genetic programming system in
which each individual is a tree of operators and operands to carry out
the following simple tasks:
- search for “food” (collecting which improves the individual’s fitness by one point) in the traditional “Sante Fe” ant-trail problem,
- search for food in a simple ant-trail problem that we will call
“line-trail” in which all of the food is in a single line running from the starting corner along one wall in an otherwise empty 50x50 arena,
- search for food and avoid “poison” (collecting which harms the individual’s fitness by one point) in a slightly more complex ant-trail problem that we will call “two-lines” which is the same as line-trail except that there is a line of poison next to the line of food and enclosing it against the wall of the arena, and
- search for food and avoid poison in a slightly yet more complex ant-trail problem that we will call “three-lines” which is the same as two-lines except that there is a third line, this one of food, running along the far wall and starting in the opposite corner from the original food line.
See the figures below for graphical representations of the three introduced trails.
|
|
|
Line-Trail |
Two-Lines |
Three-Lines |
You will also turn in written material regarding the design and
implementation choices you made regarding the GP and an analysis of the
results you will collected from your runs.
4. Assignment Details
Carry out the following steps. Underlined steps require a
written response, those in code
require you to write
software, and those in italics require you to collect data.
Written responses, code
, and data will be
turned in for grading
- Consider the choices one needs to make regarding the design
and implementation of any evolutionary computation system.
- List the choices that need to be made when designing an
evolutionary computation system that have already been made for you
in this assignment. You should be able to list at least
four.
- For each of these choices, list which option I chose for you
in making this assignment.
- List the choices you need to make regarding the design of your
GP. (Note, these do not include purely implementation choices such
as programming language.) You should be able to list at least
five.
- Choose an option that seems reasonable to you for each of
these design choices and explain why it seems reasonable to
you. If you do not have a good reason for your chosen option,
say so.
Implement your GP.
- Now that you have implemented your GP, you are likely to have
recognized more choices that you needed to make along the way.
List the choices you needed to make regarding the design of your
GP. Including the choices you listed previously, your list
should now contain at least ten choices.
- For each of
these design choices, list the option you chose, and explain why it
seems reasonable to you. If you do not have a good reason for
your chosen option, say so.
- Answer the following questions about data collection,
reporting, and conclusions so that you are ensured of collecting
the appropriate data. Attempt to justify your answers to these
questions.
As you do so, keep in mind that what you want is a data set that
allows you to understand the workings of your GP as an optimization
tool and you want to report the minimum amount that allows your
reader to thoroughly understand what you have learned. Note that you
may lack a justification for your answers to some of these questions
at this time. That is acceptable since this is your second assignment
in this course. However, you should keep all of these questions in
your mind as the course progresses and be able to give good,
justified answers to similar questions for later assignments.
- How many times will you run your GP? Once? Ten times? Twenty
times? 100 times?
- If you run your GP more than once, what will you change from
run to run? What will you keep the same?
- What data will you collect? Performance data such as success
or failure at reaching the global maximum or fitness at every time
step? (What constitutes a time step in your GP?) Population
statistics such as diversity of the population? (How would you
measure diversity?)
- What data will you report? Everything? Best performance?
Worst performance? Averages? If averages, what will be averaged
together? Average population fitness at a given time step during
a single run? Averages over multiple runs?
- How will you report this data? Text? Numbers? Graphs? What
form will these take?
- What conclusions will you be able to draw from your results?
- Run your GP on each of the ant trails.
- Report your results and conclusions regarding the application
of your GP to each ant trail.
- Compare the performance of your GP on each ant trail and report
your conclusions.
5. What to Turn In
- Write Up
- You will turn in both a hard copy and an electronic copy of your
write up. Your write-up should be a coherent document that covers
all of the underlined steps from the assignment above. Note
that selected data in a digested form (such as tables or graphs)
should be included in your writeup; however, your raw data should not
be included here.
- Code
- You will turn in both a hard copy and an electronic copy of your
code. You will turn in the source code you have written for this GP.
Your source code should be well
structured and well commented. It should conform to good coding
standards (e.g., no memory leaks).
- Data
- You will turn in just an electronic copy (no hard copy) of your
data. This may be in a single file or multiple files. You will also
need to include a brief writeup on how the data is organized.
6. Notes on this Assignment
You may write your program from scratch or may start from programs
for which the source code is freely available (such as on the web or
from friends or student organizations). If you do not start from
scratch, you must give a complete and accurate accounting of
where all of your code came from and indicate which parts are original
or changed, and which you got from which other source. Similarly, for
the written components of this assignment you may follow the format or
content of other written works but you must give a complete and
accurate accounting of who deserves credit for all parts of your
documents. Failure to give credit where credit is due is academic
fraud and will be dealt with accordingly. Please see the Provost's
web pages on academic integrity.