340 likes | 490 Views
Cognitive and Behavioral Model Ensembles for Autonomous Virtual Characters. Jeffrey S. Whiting Brigham Young University Thesis Defense May 2007. Background – Computer Animation. Complex / Less Understood. Simple / Better Understood. Background – Computer Animation.
E N D
Cognitive and Behavioral Model Ensembles for Autonomous Virtual Characters Jeffrey S. Whiting Brigham Young University Thesis Defense May 2007
Complex / Less Understood Simple / Better Understood Background – Computer Animation Computer graphics (CG) modeling hierarchy John Funge, Xiaoyuan Tu, and Demetri Terzopoulos. “Cognitive Modeling: Knowledge, Reasoning and Planning for Intelligent Characters.”
Related Work Behavioral Modeling • Reynolds, C., 1987.Flocks, Herds, and Schools: A Distributed Behavioral Model. • Tu, X., and Terzopoulos, D. 1994. Artificial fishes: physics, locomotion, perception, behavior. • Blumberg, B., and Galyean, T. 1995. Multi-level direction of autonomous creatures for real-time virtual environments. Cognitive Modeling • Funge, J., Tu, X., and Terzopoulos, D. 1999. Cognitive Modeling: Knowledge, Reasoning and Planning for Intelligent Characters. Behavioral Animation
Challenges in Cognitive and Behavioral Modeling • Creating cognitive and behavioral models • Time intensive • Complex process • There is no one solution • Must be done by an expert programmer • Models cannot be reused • Solve specific problems in specific environments
Related Work Characters That Can Learn • Blumberg, B. et. al 2002 Integrated Learning For Interactive Synthetic Characters • Dinerstein, J., Egbert, P. K., De Garis, H., And Dinerstein, N. 2004. Fast Multi-Level Adaptation for Interactive Autonomous Characters. Teaching a Puppy
Related Work Machine Learning Techniques and Autonomous Virtual Characters • Dinerstein, J., Ventura, D., And Egbert, P. K. 2004. Fast And Learnable Behavioral And Cognitive Modeling For Virtual Character Animation • Faloutsos, P., Van De Panne, M., And Terzopoulos, D. 2001. Composable Controllers For Physics-based Character Animation • Dinerstein, J., Ventura, D., and Egbert, P. K., 2005. Fast and Robust Incremental Action Prediction for Interactive Agents. Approximating the Models Predicting Future Actions
Related Work – Machine Learning Machine Learning Ensembles • Individual classifiers are combined to improve accuracy • Uncorrelated errors can be reduced or eliminated • Popular methods include • Boosting • Bagging • Gating Networks • Bayesian averaging
Related Work What’s Missing • Recent work has focused on allowing the character to learn. • Little effort directed into how to combine multiple cognitive and behavioral models together.
Thesis Statement Goals • Combine Cognitive and Behavioral Models • Leverage strengths of each model • Increase overall performance • Make it simple to give feedback Thesis Statement • Adding ensemble controllers to the current CG modeling hierarchy allows for the use of multiple cognitive and behavioral models in combination to create new behaviors and animations, and to increase overall performance.
Ensemble Controller (a1,w1) C1 L1 (a2,w2) C2 L2 Ensemble Controller E a (an,wn) Vote Cn Ln E({a1,w1}, {a2,w2}, ...{ai,wi}, S) -> a
Ensemble Controller Function performNextAction() a <= C.getNextAction(S) executeAction(a) end Function performNextAction() a <= E.getNextAction(S) executeAction(a) end • Cognitive models are black boxes • No restrictions placed on the model
Ensemble Controller Function E::getNextAction() for (i in 1..n) ai<= Ci.getNextAction() λi <= Li.getContextSensitiveRating(S) endfor #weighted voting for (i in 1..n) wi<= calculateContextSenstiveWeight(i,a,λ,S,t) endfor a <= selectAction(a,w) end
Context Sensitive Weights • The context sensitive rating λ(s). • Learned from animator • Action similarity metric δ(ai.aj) • Allows similar actions to boost each other • Temporal boost τ(t). • Reduces temporal aliasing—rapidly switching between models
Action Selection • The top action is chosen • max(w) • Maximize performance • The action is probabilistically chosen • Uniform distribution based on w • Prevents the agent from being deterministic • The actions are blended • a <= • A new action is created based on suggested actions
Learning the Context Sensitive Rating Learned through feedback given by the animator • Easily rate using a basic slider Machine Learning Algorithms • K-NN • Regression Tree State Representation • Challenging • Not known how it will be used
Putting it All Together • The system must be trained • Provide the feedback to learn the context sensitive weights The feedback process
Putting it All Together - Example • Use flocking case study • Goal: Flock in V formation while avoiding obstacles • Two behavioral models • B1:A “boid” model which avoids obstacles and flocks towards other virtual birds • B2: A V-formation model that dynamically forms flocks in the shape of a V
Putting it All Together – Round 1 • Scenario 1: Bird on a collision course with an obstacle B1 Rated high B2 Rated neutral • Scenario 2: Bird following other birds B1 Rated neutral B2 Rated high
Putting it All Together – Additional Feedback • Scenario 1: Bird on a collision course with an obstacle Gets back into formation too soon and hits the obstacle (B1 was rated high, B2 was rated neutral) • Scenario 2: Bird following other birds Worked great (B1 was rated neutral, B2 was rated high)
Evaluation • Feasibility Study • Single agent CTF • Case Studies • Multi-agent CTF • Flocking • Crowd simulation using a combat situation
Feasibility Study • Capture the Flag • Discrete 16x16 world • 4 models: {B1: Left, B2: Right, B3: Up, B4: Down}. • The success of the agent is entirely dependant upon a transfer of knowledge Video 1Video 2Video 3 Video 4Video 5
Case Study: CTF • Behavioral Models • A* • Potential Fields • Arc Defense Video 1Video 2
Case Study: Flocking • Use existing models • Boids • V flocking model • Scripted stunt model • Blending of actions • Unique group behavior Video 1Video 2Video 3
Case Study: Flocking - Results Video 4Video 5
Case Study: Crowd simulation using a combat situation • Layering of model ensembles • Commander & Character • Charge Commander & End-Around Commander Video 1
Case Study: Crowd simulation using a combat situation – Results Charge Commander End-Around Commander
Conclusion & Future Work • Framework was a success • Leveraged multiple models. • Short creation time • Future work • Different voting / weighting schemes • Replace ensemble controller with a high order machine learning algorithm • How to further improve animator control
Q&A • Questions? Thesis Statement • Adding ensemble controllers to the current CG modeling hierarchy allows for the use of multiple cognitive and behavioral models in combination to create new behaviors and animations, and to increase overall performance.