I decided to update my Brief History of Time book cover generator for the final. I liked the project and it seemed like there were some clear ways for it to move forward. I was interested in adding ways for the user to adjust the generated covers before evolving the next generation. I liked the idea of the user collaborating with the algorithm in the creative process.
The first step of the update was to refactor the code of the book cover. In the original version the genes overlapped quite a bit in their expression. One gene could be expressed in 3 or 4 circles. Adding a slider to change the color of the circle, for example, would also change the color of several other circles. I fixed this by adding many more genes and by updating the for loop used to generate the circles so that no genes are used more than once. (Though in class Shiffman suggested maybe using a node based approach instead of genes, so there’s that to look into.)
I also switched from drawing many covers on one canvas to drawing each cover as a p5.Renderer object. I would like to eventually add functionality for the user to download the cover they designed, and this would allow that.
After doing that I added sliders that controlled various aspects of the book cover. I started with the positioning of the title and author text and the color of the background. It would make sense to add lots of other tools as well, like moving the circles, changing their colors, and maybe ultimately an interface more like a drawing program. But, I wanted to try and get this working with the genetic algorithm.
I could not get the covers to generate correctly, but am still working on it. As I think about this project more I think that, in addition to adding all of the unrealized features mentioned in this post, it would be neat to try and generate the original design for the cover based on the text of the book. That way, you could feed in a text, have the program evolve the first generation and then go from there. There are all kinds of text analysis that could be used, like sentiment analysis, most common words, or story arc, and linked to different color schemes or design styles. That would be super cool!