Evolutionary Art with Multiple Expression Programming By Quentin

Download Report

Transcript Evolutionary Art with Multiple Expression Programming By Quentin

Evolutionary Art with
Multiple Expression
Programming
By Quentin Freeman
System Overview
• Goal
– To visualize images in real time as they evolve while
allowing the user total control over the genetic
algorithm.
• Why
– Allow images to be generated using a good set of
functions to reduce the amount of “static” images
contain.
– Most Evolutionary art programs use really basic
functions which introduce a lot of static and take
thousands of generations to find “good” images.
Chromosome Data Structure
• Each chromosome is represented by an array of
genes.
– Each gene contains 2 pointers, a function, and a
parameter value.
– Pointers index any gene that came before the current. It
can also point to the X and Y pixel coordinate values.
– Functions are a value from 0 to 1-MAX number of
functions.
– Parameter is a value from 0 – 255, these are used as
extra input values into the function.
– There is a special gene at the end of the chromosome
which is the pointers for the RGB values.
Chromosome Data Structure
• Example of a chromosome with 3 genes.
Chromosome Data Structure
• Advantages
– Pointers allow a chromosome which have the
exact same function and parameters to be
mapped many different ways.
– The number and exact definition of functions is
left out of the data structure for maximum
flexability. For example, its easy to swap
function sets.
Complex vs Basic functions
20 generations of searching
•
Basic
Complex
Example of mutation
• Starting image

Resulting image
Example of crossover
• Parent 1
+
Parent 2
=
Child
Program Flow
Design Process
• Data structures and Algorithms went
through several revisions.
– Original chromosome Data structure used
strings instead of integers.
• Had to redesign because of speed issues
– At one point function calculations were using
doubles
• Had to restrict to integers for speed
Conclusion
• Successfully created a real time Evolutionary Art
program.
– The animator for images had to be dropped cause of
time constraints.
• Primary loss of time was the result of 1-2 bugs that took a
tremendous amount of time to fix.
• What I learned
– Optimizing code that gets run 100,000 times for each
image.
– Learned more about using and manipulating java GUI
Any Questions?