I’m trying to create a Python implementation of Dawkins’ biomorphs as described in his book, The Blind Watchmaker.
It works like this: A parent organism is displayed, as well as its offspring which are just mutated versions of the parent. Then the user clicks on a descendant it wants to breed, and all the offspring will “evolve” based on cumulative selection.
What I’m unsure of is how to get started in Python. I’ve already created genetic algorithm and l-system programs that are supposed to be used. The l-system program evolves trees given certain parameters (which is my goal in this biomorph implementation), and the genetic algorithm program evolves the genotypes that are created in the l-system program.
- What library would be good to use (turtle, pygame, etc)?
I am familiar with turtle, but the documentation says, “To use multiple turtles an a screen one has to use the object-oriented interface.” I’m not sure what that means. The reason I thought of using multiple turtles on a screen is to have the the parent and its descendants displayed on one screen, as they are in online apps. Then the user can click on the organism it wants to breed by using mouse events. Is this a good idea, or is there better way to do it?
Thanks in advance.
Depending on graphical requirements, I would say that for a lightweight app you could get away with PyQt or PyGame. For more demanding real-time graphical requirements you could use something like PyOgre or PyOpenGL.
You may need to also research graph-layout/data-visualisation algorithms or libraries (e.g. dot) depending on your UI goals.