Based on the terminology shown in the image
(specifically "BTTask_BlueprintBase," "Blackboard,"
"Selector," and "Sequence"), this is a diagram related to Unreal
Engine's (UE4/UE5) AI Behavior Tree system.
While the image provides a good overview of some
core flow control and setup nodes, it is missing several critical components
required to build a fully functional AI.
Here is the key data missing from this image:
1. Decorators (Conditionals)
The image lists Composites (Selector,
Sequence) and Tasks, but it completely lacks Decorators. These
are essential for the logic "If" statements of the tree.
- Missing
Terms:
Blackboard Based Condition, Cooldown, Loop, TimeLimit, Force Success, Does
Path Exist.
- Why
it matters:
Without Decorators, a behavior tree cannot make decisions or abort actions
based on changing data.
2. Services
Behavior Trees in Unreal use three main node
types: Tasks, Decorators, and Services. Services are missing entirely.
- Missing
Terms:
BTService_BlueprintBase, Default Focus, Run EQS.
- Why
it matters:
Services allow the AI to check conditions (like scanning for a player) at
set intervals while a task is running, without stopping the movement or
action.
3. The "Simple Parallel" Composite
The image lists Selector and Sequence,
which are two of the three main composite nodes.
- Missing
Term:
Simple Parallel.
- Why
it matters:
This node is necessary if you want the AI to do two things at once (e.g.,
walking while shooting or walking while looking at the player).
4. Standard Built-in Tasks
The image lists the base class for creating
custom tasks (BTTask_BlueprintBase), but misses the standard tasks that come
pre-packaged with the engine.
- Missing
Terms:
Move To, Wait, Rotate to Face BB Entry, Play Sound, Run Behavior Dynamic.
5. Architectural Context
While the image has Run Behavior Tree, it misses
the container and the executor.
- Missing
Terms:
AIController (the class that actually runs the logic), Blackboard Data
Asset (the actual file where variables are stored), and Pawn/Character
(the physical body the AI controls).
Summary of Missing Hierarchy
To make this a complete "cheat sheet"
for Unreal Behavior Trees, it would need to add:
- Decorators
(Logic/conditionals)
- Services (Periodic updates)
- Simple
Parallel
(Concurrent actions)
Here is the comprehensive summary for an Unreal
Engine AI system. This combines the specific Blueprint nodes found in your
image with the critical "missing links" required to make the AI
actually function.
This structure represents the full hierarchy of a
standard Behavior Tree (BT) in UE5.
1. The Root & Data (The Brain)
Every Behavior Tree needs a brain to store
memory.
- Seen
in Image:
Get Blackboard Value as Actor, Set Blackboard Value as Vector.
- The
Missing Link:
The Blackboard Asset. You cannot just use the "Get/Set"
nodes; you must create a separate Blackboard Data Asset that lists
every variable (Key) your AI needs to know (e.g., TargetActor, DestinationVector,
IsScared).
- Context: The Run Behavior
Tree node (seen in your image) must be assigned to an AI Controller
to kickstart this whole process.
2. Composites (The Flow Control)
These nodes determine how the tree moves
through its branches.
- Seen
in Image:
- Selector: The "OR"
gate. It tries children from left to right until one succeeds.
(Used for: "Fight OR Flight OR Patrol").
- Sequence: The
"AND" gate. It runs children from left to right until one fails.
(Used for: "Walk to door AND Open door AND Walk through").
- The
Missing Link:
Simple Parallel. This allows an AI to do two things at once.
- Example: Creating a
"Strafing" behavior where the AI runs a MoveTo task while
simultaneously running a Rotate towards Player task.
3. Tasks (The Actions / Leaves)
These are the actual commands the AI executes.
- Seen
in Image:
- Custom
Tasks:
BTTask_BlueprintBase, Event Receive Execute AI, Finish Execute. This
implies you are writing your own custom logic (like "Cast
Spell" or "Reload Weapon").
- The
Missing Link:
Standard Built-In Tasks. You rarely need to code everything from
scratch. Unreal comes with:
- Move
To (Navigation system movement).
- Wait
(Simple delays).
- Play
Sound.
4. Decorators (The Conditionals)
- Status: Completely
Missing from Image.
- Function: These are the
"If" statements attached to Composites or Tasks. They decide if
a branch can run or if it should be aborted.
- Key
Nodes Needed:
- Blackboard
Based Condition: "Only do this IF Health is < 50%."
- Cooldown: "Don't do
this node again for 5 seconds."
- Loop: "Repeat this
child node X times."
5. Services (The Background Checks)
- Status: Completely
Missing from Image.
- Function: These run on a
"tick" (timer) while a task is executing. They are used
to update the Blackboard without stopping movement.
- Key
Node Needed:
BTService_BlueprintBase.
- Example: While the AI is
running the Move To task, a Service runs every 0.5 seconds to
check "Is the player still visible?" and updates the Blackboard
variable CanSeePlayer.
Summary Table
|
Category |
Node from Image |
Missing Essential Node |
Purpose |
|
Logic |
Selector, Sequence |
Simple Parallel |
Controls execution flow. |
|
Action |
BTTask_BlueprintBase |
Move To, Wait |
Performs the actual behavior. |
|
Checks |
(None) |
Blackboard Decorator |
"If" statements (e.g., "Is Ammo
> 0?"). |
|
Updates |
(None) |
BTService |
Updates data while moving/acting. |
|
Data |
Get/Set BB Value |
Blackboard Asset |
The memory storage file. |
Would you like me to explain how to set up a Service
to update the AI's target location dynamically?
Based on the content of the image—which provides
a conceptual summary of Unreal Engine Behavior Trees—here is the key data
missing to have a complete understanding of the system:
1. Services (The "Background" Workers)
The image details Tasks (actions), Composites
(flow control), and Decorators (conditionals), but it completely omits Services.
- What
is missing:
The concept of BTService nodes.
- Why
it's critical:
Services are attached to composite nodes and execute on a timer (tick) while
the child tasks are running. They are essential for updating the
Blackboard dynamically (e.g., constantly checking "Is the player
still visible?" while the AI is moving) without interrupting the
action.
2. The "Simple Parallel" Composite
The image correctly identifies Selector
(Fallback) and Sequence (Step-by-step) nodes, but misses the third main
composite type: Simple Parallel.
- What
is missing:
The node that allows an AI to perform two actions simultaneously.
- Why
it's critical:
Without this, your AI can only do one thing at a time. Simple Parallel is
required for behaviors like "walking while shooting" or
"moving while looking at a target."
3. Execution Results (Success vs. Failure)
The image mentions that custom tasks must
"Finish Execute," but it misses the result of that finish.
- What
is missing:
The explanation that Finish Execute must return either Success or Failure.
- Why
it's critical:
The Selector and Sequence nodes mentioned in the top-right
box rely entirely on these return values to function.
- A
Selector keeps going only if children return Failure.
- A
Sequence keeps going only if children return Success.
4. Built-in Task Library
The image focuses heavily on Custom Tasks,
implying you have to build everything yourself.
- What
is missing:
Mention of the standard, pre-built library of tasks.
- Why
it's critical:
Beginners often waste time coding custom movement logic when UE5 already
provides optimized nodes like Move To, Wait, Rotate to Face BB Entry, and Play
Sound.
Summary of the Missing "Third Pillar"
If you view Behavior Trees as a three-part
structure, this image provides two of them (Logic and Actions) but misses the
Maintenance layer:
- Logic: Composites &
Decorators (Present)
- Actions: Tasks (Present)
- Maintenance: Services (Missing)
Here is the comprehensive summary for Unreal
Engine Behavior Trees, merging the points from your "Log Summary"
image with the critical missing components required for a functional AI system.
1. The Data (The Brain)
- The
Blackboard:
As noted in the image, the Behavior Tree is just the logic processor; it
is useless without a Blackboard Asset. This asset acts as the AI's
memory, storing persistent variables (Enemy locations, Health, State) that
are shared between different tasks.
2. Flow Control (Composites)
These nodes determine the path the AI takes
through the tree.
- Selector
(The "Fallback"): Used to choose one successful
behavior from a list of options. It runs children from left to right and
stops as soon as one Succeeds. (e.g., Fight OR Run OR
Patrol).
- Sequence
(The "Checklist"): Used for strict step-by-step actions. It
runs children from left to right and stops as soon as one Fails.
(e.g., Walk to Door AND Open Door AND Enter).
- [MISSING]
Simple Parallel:
The third essential composite. It allows the AI to execute two branches
simultaneously. This is critical for multitasking, such as an AI that
needs to Shoot while Moving, or Look at Player while Waiting.
3. Logic & Maintenance (Decorators vs.
Services)
- Decorators
(The "Conditionals"): As shown in the image, these are the
"If" statements (e.g., "Is Health > 50%?"). They
attach to nodes and can abort active behaviors instantly if
conditions change.
- [MISSING]
Services (The "Background Workers"): These attach to
composite nodes and execute on a timer (tick) while the child tasks
are running. Unlike decorators which block or abort logic, Services are
used to update data without stopping movement (e.g., a Service that
updates the TargetLocation variable every 0.5 seconds while the AI is
chasing the player).
4. Execution (Tasks)
- Custom
Tasks:
As the image warns, if you write a custom Task in Blueprints, you must
use the Finish Execute node at the end. Without it, the tree assumes the
task is still running and will hang indefinitely.
- [MISSING]
Return Values (Success vs. Failure): The Finish Execute node doesn't just
end the task; it must report Success or Failure. This report
is what tells the parent Selector or Sequence whether to continue to the
next node or restart.
- [MISSING]
Built-in Tasks:
You do not need to build everything from scratch. Unreal includes
optimized standard tasks like Move To (Navigation), Wait (Delay), and Rotate
to Face BB Entry that should be used whenever possible to save development
time.
Summary Table
|
Component |
Function |
Key Rule |
|
Blackboard |
Memory Storage |
Must be assigned to the Tree before running. |
|
Selector |
Decision Making |
Stops at the first Success. |
|
Sequence |
Step-by-Step |
Stops at the first Failure. |
|
Simple Parallel |
Multitasking |
Runs a main task and a background tree
together. |
|
Decorator |
Conditional Logic |
Can Abort lower priority tasks if
conditions change. |
|
Service |
Data Updates |
Runs on a timer during task execution. |
|
Task |
Action |
Must report Success/Fail to trigger the
next step. |
Next Step: Would you like to see a specific example of how
a Service is used to update the Blackboard during a Chase sequence?
No comments:
Post a Comment