1 / 59

Toward Real-Time Planning in Games

Toward Real-Time Planning in Games. Jeff Orkin Monolith Productions. F.E.A.R. Agenda. What Why How. Agenda. What do we mean by planning? Why use planning in games? How can we use planning in practice?. What do we mean by “planning?”. Typical Game AI. Goal-Oriented Planning.

Download Presentation

Toward Real-Time Planning in Games

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. Toward Real-Time Planning in Games Jeff Orkin Monolith Productions

  2. F.E.A.R.

  3. Agenda • What • Why • How

  4. Agenda • What do we mean by planning? • Why use planning in games? • How can we use planning in practice?

  5. What do we mean by “planning?”

  6. Typical Game AI

  7. Goal-Oriented Planning

  8. Regressive Planning

  9. Dynamic Planning

  10. P.Diddy

  11. P.D.D.L. • Planning Domain Definition Language • Goals • Desired state • Actions • Preconditions • Effects

  12. PDDL Goal: (define (problem get-paid) (:domain briefcase-world) (:init (place home) (place office) (object p) (object d) (object b) (at B home) (at P home) (at D home) (in P)) (:goal (and (at B office) (at D office) (at P home))))

  13. PDDL Action: (:action put-in :parameters (?x - physob ?l - location) :precondition (not (= ?x B)) :effect (when (and (at ?x ?l) (at B ?l)) (in ?x)) ) • Other actions: take-out, move

  14. PDDL • Modular • Goals • Actions • Decoupled Modules Related by symbols • World State • Preconditions • Effects • Applied PDDL’s structure to C++ toolkit in game code.

  15. Why use planning in games?

  16. Sharing Behavior between NPCs

  17. Sharing Behavior between Projects

  18. Sharing Behavior: Data Points • 7 Character types in FEAR • 62 Actions • 41 Actions shared between projects • 20 Actions shared between characters in FEAR • 35 Goals • 21 Goals shared between projects • 21 Goals shared between characters in FEAR

  19. Workflow • Division of Labor:

  20. Workflow • Division of Labor:

  21. Workflow • Division of Labor:

  22. The Best Day of My Professional Life

  23. Workflow

  24. Robust Behavior

  25. Robust Behavior

  26. Robust Behavior

  27. Robust Behavior

  28. Robust Behavior

  29. Robust Behavior

  30. Robust Behavior

  31. Robust Behavior

  32. Robust Behavior

  33. Maintenance

  34. Maintenance

  35. Maintenance

  36. Maintenance

  37. Maintenance

  38. How can we use planning in practice?

  39. How can we use planning in practice? • Symbols • Plan Formulation • Planning Frequency • Plan Granularity

  40. F.E.A.R. Demo

  41. Symbols • Key-Value pairs • Enumerated keys • kKey_WeaponLoaded • kKey_AtPosition • Values – union of types • bool • int • float • enum • etc…

  42. Symbols • Array of Key-Value pairs represents: • State of world • Goal satisfaction conditions • Action preconditions • Action effects

  43. Symbols

  44. Plan Formulation • A* search for sequence of actions • Action is neighbor if effect satisfies an existing precondition. • Actions hashed by effect. • Heuristic: minimize number of unsatisfied preconditions.

  45. Symbolic Representation Strategies

  46. Symbolic Representation Strategies • Agent-centric representation.

  47. Symbolic Representation Strategies • Agent-centric representation • Subsystem handles target selection. • Less symbols to evaluate during plan formulation.

  48. Symbolic Representation Strategies

  49. Symbolic Representation Strategies • Context preconditions.

More Related