1 / 96

alexjc@AiGameDev

alexjc@AiGameDev.com. costs. sales. Scripting could actually be fun?. Innovative gameplay!. Nice theory!. Challenges. Bigger environments Greater numbers of entities More accurate physics Advanced animation. Bummer. Now what?. Requirements. Wish List. I want full control.

ogden
Download Presentation

alexjc@AiGameDev

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. alexjc@AiGameDev.com

  2. costs sales

  3. Scripting could actually be fun? Innovative gameplay!

  4. Nice theory!

  5. Challenges • Bigger environments • Greater numbers of entities • More accurate physics • Advanced animation

  6. Bummer.

  7. Now what?

  8. Requirements

  9. Wish List I want full control... • Perfect designer supervision • AI behaves autonomously too ...but not all the time!

  10. Wish List The AI should be goal directed • Purposeful behaviors • Responds to events ...yet react to sudden changes!

  11. Hierarchical Logic

  12. HFSM Scripting C++ Lua Planners HTN

  13. Scripting: The Good • Any computation possible • Widespread experience I've done this for years!

  14. Scripting: The Bad • Difficult to introspect, analyze • Not accessible to many designers What's planning?

  15. HFSM: The Good • Simple and intuitive • Full low-level reactive control It's actually usable!

  16. HFSM: The Bad • Generally labor intensive • Not easy to build goal directed It takes a lot of work...

  17. Planning: The Good • Uses search for automation • Goal directed by default! AI can solve many logic problems.

  18. Planning: The Bad • Integration of procedural code • Ignores control & execution It's disconnected from the real world?

  19. HFSM Scripting C++ Lua Planners HTN

  20. intuitive reactive Behavior Trees integrated flexible autonomous purposeful

  21. Bang for Buck! • Decision making over time • Control & monitoring execution

  22. Managing Complexity in the Halo 2 AI System Damian Isla GDC 2005

  23. Three Approaches to Behavior Tree AI Lauren McHugh GDC 2007

  24. Managing Intermixing Behavior Hierarchies Michael Mateas, Andrew Stern GDC 2004

  25. Top Secret Classified Never

  26. A Guard Dog's AI Woof

  27. Behavior Trees

  28. Example patrol investigate attack lookaround move bite recursive decomposition

  29. Leaves • interface between AI and engine

  30. Conditions • actor state, meta-checks • collision, entity queries

  31. Actions • animation, sound • using objects, game logic

  32. It's All About Tasks • Latent computation • Succeed or Fail Task Condition Condition Action

  33. Building Complexity branches manage the leaves done using composite tasks

  34. Sequences bail out keep going

  35. Selectors terminate keep trying

  36. A Powerful Model • programming language basics • statements and conditionals • essence of HTN planners • and-or tree nodes

  37. The Backbone of the Tree With the right actions and conditions, I can build all my logic like this.

  38. Dynamic Behavior as Search

  39. Behavior Language • Standard & high-level composite tasks • Rather than custom low-level logic So I implement concepts once, and reuse them everywhere?

  40. In Practice

  41. Improving Your HFSM Does this help me with my state machine?

  42. Improving Your HFSM • make it easy to build sequences • no need to (re)wire transitions • easier to build purposeful behaviors

  43. Design Principles That gives me some guidelines to follow for editing all those transitions!

  44. Improving Your Scripts How does that help me with my scripts?

  45. Improving Your Scripts • provide better dynamic error handling • by making it easy to build selectors

  46. Software Patterns It'll help me think about my scripts on a higher-level.

  47. Side Note: Efficiency A behavior tree is no less efficient than a well-written script. It can be faster if you build your AI engine as a behavior tree.

More Related