Duck Gets Dog a Stick: SUCCESS!

Happy New Year!

After toiling away at this for over a week, I’m declaring this a success! (See the previous post for the backstory behind this.) Here’s the generated story:

# evaluated: 7, score: 110, eval: 0

Best score: 110
Donica Duck moved the stick down from the tree to the ground.
Deruiter Dog took the stick from the ground.
Deruiter Dog expressed appreciation to Donica Duck.

I first had expressed the rules in Prolog and threw both my self-made Prolog interpreter as well as an open source Prolog interpreter at this, but it turned out to be too slow, so I did the move generation by hand. I also cannibalized a chess program I had previously written, generalizing the concepts of “board”, “move”, etc. so that the chess board is the story universe and a move is an event in this universe. The current evaluation function simply maximizes happiness but can later be made more sophisticated by introducing drama, misery, etc.

Although I’m ecstatic this worked, I’m not 100% sold on this approach because:

  • if the branching factor is too great, the maximum achievable search depth will be greatly restricted
  • this doesn’t intuitively feel like the way stories are created by humans

That said, a hybrid approach might be possible. And as long as my goal of creating an entirely new art form (computer-generated fiction that humans find engaging) is achieved, I don’t care by what mechanism that ends up happening.