AI for Games and Animation: A Cognitive Modeling Approach