Ehm. Something like a... state transition engine?
Simple finite state machine, capable of shortest path transitions