Now that mutation has been successfully implemented, it is time to start on crossover. This process will allow us to merge existing cells that score well, with other cells that score well. Hopefully this will produce better automata over time.
Progress on crossover has been made, and currently the program can easily do the following things:
- Swap dead & alive values
Since dead and alive are both essentially the same, swapping with these two maps was a breeze. Right now, dead and alive will swap four values with another dead and live map.
- Swap seeds
Seeds will swap 35% of the smallest seed map with each other. Previously, mutate did not touch the seeds of a cell. However, it was discovered implementing this that when mutate does not change the seeds a lot of duplicates begin to appear. Therefor, mutate was edited to randomize new seeds.
- Swap colors
Color also operates under this 50% of the smallest color map. This doesn’t mean half the colors will be swapped, the scenario where half the colors will be swapped only occurs when the smaller map is the one being returned. Larger maps will have a smaller percentage of themselves changed.
Unfortunately, when implemented I start running into a lot of NullPointer exceptions, this meant that somewhere, something was getting lost. Furthermore, a problem in merging seeds could clearly be seen, and extended into the logic of how they were merged.
As you can see here, seed merges are only affecting part of the graph, since we don’t exceed values from the smaller graph. Hopefully, by re-implementing this function to add seeds to the smaller graph instead of swap
It turned out to be a couple things:
- mergeSeeds and mergeColors had that potential to assign a “null” values to some of their maps. This was due to not checking whether certain maps of different sizes even could swap with each other. It was fixed by adding a max to each function.
- mergeSeeds old check to make sure to avoid nullpointers was out of wack, and made it so only a percentage of the graph was moved over.
Unfortunately, even the new implementation of mergeSeeds is wonky. Because of different sized graphs, you can clearly see where the function stops merging in some instances.
Here you can see where seed graphs with a different make-ups have gotten merged. Suddenly half the image has noticeably less or more seeds than the other half.
When implementing the error-free crossover this error continues to persist, and gives us cellular automata’s like the ones below.
Interestingly enough, this error doesn’t always persist in our automata’s, and sometimes produces normal looking automata’s like the one below.
However, the problem is so common that it affects a good portion of our automata’s. I should be able to fix this tomorrow in our Monday meeting though, so for now I will move on to making edits to the scoring metric and coming up with a new hypothesis.
Talking with the professor yielded some insight on how to truly parse through some of my confusing results.
It is safe to say from the results that my original hypothesis was incorrect.
The last part of the survey was designed in case this was the case, and looking at it I can extrapolate some information that might be helpful in helping me form a new hypothesis.
These two images were rated similarly, with the right being rated only slightly higher than the left.
This tells us that people enjoy:
- A variety of shapes
Similarly, our sample group answered that they preferred similar color schemes.
From here we can develop a new hypothesis.
Adjusting the rules according to my above hypothesis resulted in two interesting images that very well demonstrate the above concepts.
I ran the program to produce 50 images, out of these images one scored the highest according to the color scale, and the other scored the highest according to the shape scale.
Briefly I will touch on what analyzing the data from the first 10 images produced resulted in.
In my opinion, the computer is doing a good job at identifying potentially good automata’s, but maybe not a good job at correctly scoring the top few.
- Fix crossover
- Fix automata names
- Discuss printing option and look into funding request as team