I experimented around some more with the daisy world simulation and have it at the point where I can visually see that even after forcing a modification to the worlds temperature, the daisy growth causes the world temp to stabilize.
I’ve worked with python graphing libraries in the past and thought those would be a good path to visualize how the world evolves. There are 3 values I cared about:
- World temperature
- Percentage of white daisies
- Percentage of black daisies
These values are already calculated at each tick of the simulation, so I just needed to dump them into a CVS file and then use a python script to visualize them. Claude and Gemini made this process fairly quick, no need to dig into API definitions or look at youtube tutorials to refresh my memory. Some quick conversations with the LLMs and I had updated Godot script to create a local csv file and append the 3 values into the file at each tick.
This was followed by another conversation to write a standalone python script that would read in the csv file and use matplotlib to render it. I made some minor adjustments to the script to get the axis labeled correctly and made some color selections, but overall the whole process took less than 30 minutes.
You can see from the graph that the world starts off empty with an ambient temperature of 15c. Daisy growth starts off quickly and since the lower temperature favors black daisies we see more of them. The temperature quickly reaches the ideal 25c and then oscillates at that point.
I then manually increased the temperature to 40c and since we were significantly off of the ideal daisy temperature, there was a mass die off of the plants. The temperature then starts to recover, while the overall higher temperature favors the white daisies. We again reach the ideal temperature of 25c and see some slight oscillations around that point.
At the 2/3rd mark I did one more modification to the world by reducing the temperature to 15c, and the simulation behaved as expected, with a quick die off followed by a preference for black daisies until homeostasis was achieved.