Before beginning generalizing the rules of the game of life, I began by adjusting my edge cases again. My instructor gave ideas this week for cleaning up my code and making it more generalized.
With that in mind, I got to the root of my issue with the generalized game of life, and was able to produce some stunning cellular automata using different rules.
Cellular automata that uses a –/12 ruleset on a single placed pixel.
Cellular automata that uses a 234/123 ruleset on a single placed pixel.
I then began work on generalizing the colors of cellular automata. We still use a basic black/white idea of cells just with different color. Where cells can either be on/off. I would like to implement functionality where as cells die, they go through a series of colors before being set to the background color. This will help make each iteration more original and give more variation in different iterations.
Using a hashmap to denote colors I was able to adjust my code to iterate through it. Below is an example of such an iteration mid-way through the debugging process.
An interesting example of improper functionality.
Following the above mistake, it became apparent that I had forgotten to update a function to consider certain values in regard to color. A few simple tweaks helped push this program into the proper functionality, shown below.
A working example of color functionality using 1/12 ruleset.
As our program has progressed, I have found myself screenshotting the images to create example gifs of our programs functionality. Some might have said this was long overdue, but this was also the week that an export function was written for elements on the canvas.
In other news there is a short break happening next week, and as such there will not be a blog post next week, even if some work does get done.
The future holds this: