Applying planning to interactive storytelling: Narrative control using state constraints
SHOP2: An HTN Planning System