<s>
A	O
behavior	B-Application
tree	I-Application
is	O
a	O
mathematical	O
model	O
of	O
plan	B-Application
execution	O
used	O
in	O
computer	B-General_Concept
science	I-General_Concept
,	O
robotics	O
,	O
control	O
systems	O
and	O
video	B-Application
games	I-Application
.	O
</s>
<s>
Behavior	B-Application
trees	I-Application
present	O
some	O
similarities	O
to	O
hierarchical	B-Architecture
state	I-Architecture
machines	I-Architecture
with	O
the	O
key	O
difference	O
that	O
the	O
main	O
building	O
block	O
of	O
a	O
behavior	O
is	O
a	O
task	O
rather	O
than	O
a	O
state	O
.	O
</s>
<s>
Its	O
ease	O
of	O
human	O
understanding	O
make	O
behavior	B-Application
trees	I-Application
less	O
error	O
prone	O
and	O
very	O
popular	O
in	O
the	O
game	O
developer	O
community	O
.	O
</s>
<s>
Behavior	B-Application
trees	I-Application
have	O
been	O
shown	O
to	O
generalize	O
several	O
other	O
control	O
architectures	O
.	O
</s>
<s>
In	O
the	O
initial	O
proposal	O
a	O
list	O
of	O
behaviors	O
could	O
work	O
as	O
alternative	O
one	O
another	O
,	O
later	O
the	O
approach	O
has	O
been	O
extended	O
and	O
generalized	O
in	O
a	O
tree-like	O
organization	O
of	O
behaviors	O
,	O
with	O
extensive	O
application	O
in	O
the	O
game	O
industry	O
as	O
a	O
powerful	O
tool	O
to	O
model	B-Algorithm
the	I-Algorithm
behavior	I-Algorithm
of	O
non-player	O
characters	O
(	O
NPCs	O
)	O
.	O
</s>
<s>
They	O
have	O
been	O
extensively	O
used	O
in	O
high-profile	O
video	B-Application
games	I-Application
such	O
as	O
Halo	O
,	O
Bioshock	B-Application
,	O
and	O
Spore	B-Application
.	O
</s>
<s>
Recent	O
works	O
propose	O
behavior	B-Application
trees	I-Application
as	O
a	O
multi-mission	O
control	O
framework	O
for	O
UAV	O
,	O
complex	O
robots	O
,	O
robotic	O
manipulation	O
,	O
and	O
multi-robot	O
systems	O
.	O
</s>
<s>
Behavior	B-Application
trees	I-Application
have	O
now	O
reached	O
the	O
maturity	O
to	O
be	O
treated	O
in	O
Game	B-Application
AI	I-Application
textbooks	O
,	O
as	O
well	O
as	O
generic	O
game	O
environments	O
such	O
as	O
Unity	O
(	O
game	O
engine	O
)	O
and	O
Unreal	B-Operating_System
Engine	I-Operating_System
(	O
see	O
links	O
below	O
)	O
.	O
</s>
<s>
Behavior	B-Application
trees	I-Application
became	O
popular	O
for	O
their	O
development	O
paradigm	O
:	O
being	O
able	O
to	O
create	O
a	O
complex	O
behavior	O
by	O
only	O
programming	O
the	O
NPC	O
's	O
actions	O
and	O
then	O
designing	O
a	O
tree	O
structure	O
(	O
usually	O
through	O
drag	O
and	O
drop	O
)	O
whose	O
leaf	O
nodes	O
are	O
actions	O
and	O
whose	O
inner	O
nodes	O
determine	O
the	O
NPC	O
's	O
decision	O
making	O
.	O
</s>
<s>
Behavior	B-Application
trees	I-Application
are	O
visually	O
intuitive	O
and	O
easy	O
to	O
design	O
,	O
test	O
,	O
and	O
debug	O
,	O
and	O
provide	O
more	O
modularity	O
,	O
scalability	O
,	O
and	O
reusability	O
than	O
other	O
behavior	O
creation	O
methods	O
.	O
</s>
<s>
Over	O
the	O
years	O
,	O
the	O
diverse	O
implementations	O
of	O
behavior	B-Application
trees	I-Application
kept	O
improving	O
both	O
in	O
efficiency	O
and	O
capabilities	O
to	O
satisfy	O
the	O
demands	O
of	O
the	O
industry	O
,	O
until	O
they	O
evolved	O
into	O
event-driven	O
behavior	B-Application
trees	I-Application
.	O
</s>
<s>
Event-driven	O
behavior	B-Application
trees	I-Application
solved	O
some	O
scalability	O
issues	O
of	O
classical	O
behavior	B-Application
trees	I-Application
by	O
changing	O
how	O
the	O
tree	O
internally	O
handles	O
its	O
execution	O
,	O
and	O
by	O
introducing	O
a	O
new	O
type	O
of	O
node	O
that	O
can	O
react	O
to	O
events	O
and	O
abort	O
running	O
nodes	O
.	O
</s>
<s>
Nowadays	O
,	O
the	O
concept	O
of	O
event-driven	O
behavior	B-Application
tree	I-Application
is	O
a	O
standard	O
and	O
used	O
in	O
most	O
of	O
the	O
implementations	O
,	O
even	O
though	O
they	O
are	O
still	O
called	O
"	O
behavior	B-Application
trees	I-Application
"	O
for	O
simplicity	O
.	O
</s>
<s>
A	O
behavior	B-Application
tree	I-Application
is	O
graphically	O
represented	O
as	O
a	O
directed	O
tree	O
in	O
which	O
the	O
nodes	O
are	O
classified	O
as	O
root	O
,	O
control	O
flow	O
nodes	O
,	O
or	O
execution	O
nodes	O
(	O
tasks	O
)	O
.	O
</s>
<s>
The	O
execution	O
of	O
a	O
behavior	B-Application
tree	I-Application
starts	O
from	O
the	O
root	O
which	O
sends	O
ticks	O
with	O
a	O
certain	O
frequency	O
to	O
its	O
child	O
.	O
</s>
<s>
When	O
the	O
execution	O
of	O
a	O
node	O
in	O
the	O
behavior	B-Application
tree	I-Application
is	O
allowed	O
,	O
it	O
returns	O
to	O
the	O
parent	O
a	O
status	O
running	O
if	O
its	O
execution	O
has	O
not	O
finished	O
yet	O
,	O
success	O
if	O
it	O
has	O
achieved	O
its	O
goal	O
,	O
or	O
failure	O
otherwise	O
.	O
</s>
<s>
In	O
order	O
to	O
apply	O
control	O
theory	O
tools	O
to	O
the	O
analysis	O
of	O
behavior	B-Application
trees	I-Application
,	O
they	O
can	O
be	O
defined	O
as	O
three-tuple	O
.	O
</s>
<s>
Note	O
:	O
A	O
task	O
is	O
a	O
degenerate	O
behavior	B-Application
tree	I-Application
with	O
no	O
parent	O
and	O
no	O
child	O
.	O
</s>
<s>
The	O
execution	O
of	O
a	O
behavior	B-Application
tree	I-Application
is	O
described	O
by	O
the	O
following	O
standard	O
ordinary	O
difference	O
equations	O
:	O
</s>
<s>
where	O
represent	O
the	O
discrete	O
time	O
,	O
and	O
is	O
the	O
state	O
space	O
of	O
the	O
system	O
modelled	O
by	O
the	O
behavior	B-Application
tree	I-Application
.	O
</s>
<s>
Two	O
behavior	B-Application
trees	I-Application
and	O
can	O
be	O
composed	O
into	O
a	O
more	O
complex	O
behavior	B-Application
tree	I-Application
using	O
a	O
Sequence	O
operator	O
.	O
</s>
