I made the Universe
a bona fide Entity in the program so it could also generate moves / events, and gave it the ability to generate different kinds of weather events sporadically: rain, snow, sunny weather, etc. I also gave animals the ability to have a preference of sunny or cold weather. Cats like sunny weather, whereas wolves prefer cold weather, for example. I also added the notion of unconditional ancillary events to a main event: if something makes an entity happy, for example, it will always want to express appreciation for that event and I shouldn’t have to shoehorn that into the move generation machinery. (I need to retool the “express gratitude” event for the dog-gives-the-duck-a-stick story to use this new formalism.)
It’s interesting to see how Harible (I should start calling him Chip for branding purposes I suppose) tries to maximize happiness depending on the initial entities of the universe.
Here’s the story that’s generated when the universe consists of a single house cat:
# evaluated: 6, score: 5, eval: 0
Best score: 5
The weather changed to sunny.
Cammie Cat expressed appreciation to the universe.
Cammie Cat went away.
…whereas this is the “ideal” story generated when the universe consists of a single wolf:
# evaluated: 6, score: 5, eval: 0
Best score: 5
The weather changed to snow.
Woody Wolf expressed appreciation to the universe.
Woody Wolf went away.
Fascinatingly enough, if I add both a wolf and house cat to the universe, we get this:
# evaluated: 19, score: 5, eval: 0
Best score: 5
Woody Wolf went away.
The weather changed to sunny.
Connie Cat expressed appreciation to the universe.
Why did the wolf go away first? Because Chip saw that if the wolf was present when the weather became sunny, the wolf would have been unhappy, so it maximized the story’s happiness by first making the wolf go away, then allowing the sun to come out!
Finally, if I increase the search depth from 2 to 3, we get this:
# evaluated: 29, score: 20, eval: 0
Best score: 20
Wally Wolf saw Connie Cat and wanted to chase Connie Cat.
Wally Wolf chased Connie Cat for awhile.
Wally Wolf and Connie Cat reconciled and became friends.
Chip found it a happier story that the two animals became friends because the search depth of 3 allowed him to find that possibility. (Also, I didn’t factor the cat’s fear of being chased into the happiness equation. 🙂 ).
Again, this doesn’t really feel like the way that real authors concoct a story, but I’m getting interesting and fascinating results, so I’m going to continue down this path.