00:00

Understanding Behavior Trees: Backward Chaining in AI

Behavior Trees (BTs) in AI use Backward Chaining to solve planning problems by working from the goal backwards. This method involves achieving goals step by step, such as opening a door to leave a room. Backward chaining involves pre- and post-conditions of actions and can be recursively combined to achieve complex objectives efficiently. The approach involves replacing conditions with BTs that achieve them, enhancing the AI's problem-solving abilities.

verduch
Download Presentation

Understanding Behavior Trees: Backward Chaining in AI

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. Backward Chained Behavior Trees An Introduction to Behavior Trees in AI (part 2) by Petter Ögren

  2. What is Backward Chaining? • Solving an AI Planning Problem by working backwards from the goal • Example: – Goal: Leave the room – To leave I need to pass through the door – To pass the door I need to open the door – To open the door I need to grasp the handle – To grasp the handle I need to extend my arm – Plan: > Extend arm > Grasp handle > Open door > Pass through the door BTs can do this reactively… How does a BT work? 2

  3. How does a Behavior Tree (BT) work? •Sequence •Stops at the first child that returns failure or running (read “and”) •Fallback •Stops at the first child that returns success or running (read “or”) •Tick (going down) •Success (up) •Running (up) •Failure (up) ? Eat Eat Apple  Sandwich Open Banana Eat Banana What about Backchaining? First we need a BT that achieves a single goal…

  4. A BT that achieves a single goal (using feedback) ? Post-condition of Actions Door is open    Has Thin Door Person Nearby Open door with key Ask Person to open door Brake door open Has Key Crowbar These can be combined recursively… Pre-conditions of Actions

  5. Backward chaining: starting with 2 goal conditions  Not Not Hungry Freezing ? ? Not Freezing Not Hungry     Has Warm Jacket Has Apple Has Banana ? ? ? ? Door Open Wear Jacket Go Inside Eat Apple Eat Banana Find BTs that achieve each

  6. Replace condition (with Sequence parent) with new subtree  Not Hungry Not Freezing ? ? Not Freezing Not Hungry     Has Warm Jacket Has Apple Has Banana ? ? ? ? Door Open Wear Jacket Go Inside Eat Apple Eat Banana Iterate this…

  7. Replace conditions…  ? ? Not Freezing Not Hungry     Has Warm Jacket Has Apple Has Banana ? ? ? Door Open ? Wear Jacket Go Inside Eat Apple Eat Banana Door is open    Person Nearby Ask Person to open door ? Open door with key Thin Door Has Brake door open Crowbar Has Key  Door mat is removed And so on… Search Garden Search under door mat

  8. Execution example  ? ? Not Freezing Not Hungry     Has Warm Jacket Has Apple Has Banana ? ? ? ? Wear Jacket Go Inside Eat Apple Eat Banana Door is open    Person Nearby Ask Person to open door ? Open door with key Thin Door Has Brake door open Crowbar Has Key  Door mat is removed Search Garden Search under door mat

  9. Execution example  ? ? Not Freezing Not Hungry     Has Warm Jacket Has Apple Has Banana ? ? ? ? Wear Jacket Go Inside Eat Apple Eat Banana Door is open    Person Nearby Ask Person to open door ? Open door with key Thin Door Has Brake door open Crowbar Has Key  Door mat is removed Search Garden Search under door mat

  10. When does this fail?  ? ? Burglar cannot see camera Camera sees burglar Turn light off Turn light on Conflict: Action brakes already satisfied Objective  ? ? Burglar cannot see camera Camera sees burglar Turn light off Hide Camera Turn light on Solution: Avoid braking already achieved goals (if possible)

  11. Key idea: Replace conditions with BT that achieve them!  Not Not Hungry Freezing ? ? Not Freezing Not Hungry     Has Warm Jacket Has Apple Has Banana ? ? ? ? Door Open Wear Jacket Go Inside Eat Apple Eat Banana

  12. Thank you for watching… 12

More Related