icosilune

Archive: October 14th, 2006

A step in the right direction

[Experiments,Research] (10.14.06, 1:51 am)

I have revised the GP code posted previously so that entities can now plant trees. It’s not a lot better than before, but it is still a step in the right direction. A tree will drop some quantity of food after it is planted, but it takes a significant number of turns for it to do so. Furthermore, they are expensive in terms of energy cost to plant. Thus, entities can balance between not planting and saving energy, and planting which will consume energy, but lead to better health in the long term.

After a few minutes of milling about, the entities should reach a stable pattern of planting trees and then looping around to consume the food that the trees drop. If you look at the entity code, you’ll see that Command.2 (the plant tree command) tends to wind up inside of a conditional. This is more or less the behavior I was hoping for, so hooray.

Now it’s just a question of what they can do next.