One of my goals of this project is to have a story be spit out in the same way a theorem is proved or a the next move of a chess game is computed by searching lots of possibilities. There’s also an element of probability that needs to come in to play too, of course. (If everything were 100% deterministic, you’d get the same story each time.)
Here are a couple of resources I found that might help in modeling all of this. I’m not sure whether they’re too low-level for what I’m trying to accomplish, though: