

Rule-Based Programming in Interactive Fiction (2009) - eudox
http://eblong.com/zarf/essays/rule-based-if/index.html

======
kmill
A while back I made a rule-based text adventure game engine in Python,
inspired by Nelson's Inform 7 and also this presentation. My rule system
didn't solve for specificity; it simply took the first rule which applied, so
hopefully you define the rules in the correct order.

Here's the obligatory Cloak of Darkness:
[https://github.com/kmill/textadv/blob/master/games/cloak.py](https://github.com/kmill/textadv/blob/master/games/cloak.py)

Decorators can go a long way for pretending Python has a metaprogramming
facility!

(I made the engine so that I could experiment with a continuation-like object
which saves the entire world state. Example at
[http://tep.mit.edu:8888/game/continuations](http://tep.mit.edu:8888/game/continuations)
)

