>xabsl
Behavior Documentation
>
Index
>Agents
>Symbols
>Basic Behaviors
>Options
>> midfielder
>>>
get_to_ball
>>>
pass
>>>
dribble
Option midfielder
Handles the ball.
State Machine
This browser can't display the SVG file
svg/option_midfielder.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
State get_to_ball
If that state is active,
>
The basic behavior
go_to
is executed. Parameters:
go_to.x
=
ball.x
() ;
go_to.y
=
ball.y
() ;
The decision tree:
This browser can't display the SVG file
svg/option_midfielder_state_get_to_ball.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
Pseudo code of the decision tree:
/** far from ball */
if
(
ball.distance
()
> 3
)
{
stay;
}
else
{
/** no teammate to the west */
if
(
most_westerly_teammate.x
()
> (
ball.x
()
+ 2)
)
{
goto
dribble
;
}
else
{
goto
pass
;
}
}
State pass
If that state is active,
>
The option
pass
is executed.
The decision tree:
This browser can't display the SVG file
svg/option_midfielder_state_pass.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
Pseudo code of the decision tree:
/** far from ball */
if
(
ball.distance
()
> 3
)
{
goto
get_to_ball
;
}
else
{
stay;
}
State dribble
If that state is active,
>
The option
dribble
is executed.
The decision tree:
This browser can't display the SVG file
svg/option_midfielder_state_dribble.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
Pseudo code of the decision tree:
/** far from ball */
if
(
ball.distance
()
> 3
)
{
goto
get_to_ball
;
}
else
{
stay;
}