Pathfinding & decisions · 6 / 10

Behavior Tree

条件と行動を木で組んで敵の判断を作る。

Compare in motion

敵の行動

Synchronized comparison
AReference
状況によらず巡回する

状況によらず巡回する

BBehavior Tree100%
複数の判断を木で組める

複数の判断を木で組める

Loading demo…

Scrub to pause and inspect. At 0%, B matches A; at 100%, B shows the effect. The scene repeats every 8 seconds.

Look for: 条件枝を評価 → 追跡へ切り替わる。

This model simplifies the technique to show its use case and effect. Operation counts describe the model; they are not performance measurements.

Read the storyboard

例: 敵の行動

  1. 1. Start

    標的を探している

  2. 2. Change

    条件枝を評価

  3. 3. Result

    追跡へ切り替わる

複数の判断を木で組める。時間変化を示す模式図です。実際の描画結果や処理速度を再現したものではありません。

How it works

  1. 1. Input

    条件と行動の木

  2. 2. Process

    枝を評価して実行

  3. 3. Result

    状況に応じた行動

A schematic of Behavior Tree. It shows the relationship between input, process, and result; exact values and rendering depend on the implementation.

Further reading

Red Blob Games — A* Introduction ↗

A general reference for this subcategory.