>xabsl
Behavior Documentation
>
Index
>Agents
>Symbols
>Basic Behaviors
>Options
>> lnw_decide_current_role
>>>
goalie
>>>
striker
>>>
offensive_supporter
>>>
defensive_supporter
Option lnw_decide_current_role
Decide which role the robot is currently playing
State Machine
This browser can't display the SVG file
svg/option_lnw_decide_current_role.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
State goalie
If that state is active,
>
This decimal output symbol is set:
strategy.estimated_time_to_reach_ball
=
-1
>
This enumerated output symbol is set:
strategy.role
=
strategy.role.goalie
>
The option
playing_goalie
is executed.
The decision tree:
This browser can't display the SVG file
svg/option_lnw_decide_current_role_state_goalie.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:
/** */
if
(
game.player_number
()
== 1
)
{
goto
goalie
;
}
else
{
/** */
if
(
strategy.estimated_time_to_reach_ball
<
strategy.min_teammate_time_to_reach_ball
()
)
{
goto
striker
;
}
else
{
/** */
if
(
(
strategy.max_supporter_position_on_field.x
()
<
robot_pose.x
()
)
&&
(
strategy.max_supporter_position_on_field.x
()
> -100000
)
)
{
goto
offensive_supporter
;
}
else
{
/** */
if
(
true
)
{
goto
defensive_supporter
;
}
else
{
stay;
}
}
}
}
State striker
If that state is active,
>
This enumerated output symbol is set:
leds.face1
=
leds.blink.llll
>
This enumerated output symbol is set:
leds.face2
=
leds.blink.llll
>
This enumerated output symbol is set:
leds.face3
=
leds.blink.llll
>
This enumerated output symbol is set:
leds.face4
=
leds.blink.llll
>
This enumerated output symbol is set:
leds.face5
=
leds.blink.llll
>
This enumerated output symbol is set:
leds.face6
=
leds.blink.llll
>
This enumerated output symbol is set:
leds.face7
=
leds.blink.llll
>
This enumerated output symbol is set:
leds.face8
=
leds.blink.llll
>
This enumerated output symbol is set:
leds.face9
=
leds.blink.llll
>
This enumerated output symbol is set:
leds.face10
=
leds.blink.llll
>
This enumerated output symbol is set:
leds.face11
=
leds.blink.llll
>
This enumerated output symbol is set:
leds.face12
=
leds.blink.llll
>
This enumerated output symbol is set:
leds.face13
=
leds.blink.llll
>
This enumerated output symbol is set:
leds.face14
=
leds.blink.llll
>
The option
estimate_time_to_reach_ball
is executed. Parameters:
estimate_time_to_reach_ball.player_is_striker
=
true ;
>
This enumerated output symbol is set:
strategy.role
=
strategy.role.striker
>
The option
lnw_playing_striker
is executed.
The decision tree:
This browser can't display the SVG file
svg/option_lnw_decide_current_role_state_striker.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:
/** */
if
(
game.player_number
()
== 1
)
{
goto
goalie
;
}
else
{
/** */
if
(
strategy.estimated_time_to_reach_ball
<
strategy.min_teammate_time_to_reach_ball
()
)
{
goto
striker
;
}
else
{
/** */
if
(
(
strategy.max_supporter_position_on_field.x
()
<
robot_pose.x
()
)
&&
(
strategy.max_supporter_position_on_field.x
()
> -100000
)
)
{
goto
offensive_supporter
;
}
else
{
/** */
if
(
true
)
{
goto
defensive_supporter
;
}
else
{
stay;
}
}
}
}
State offensive_supporter
If that state is active,
>
This enumerated output symbol is set:
head.control_mode
=
head.control_mode.search_for_ball
>
The option
estimate_time_to_reach_ball
is executed. Parameters:
estimate_time_to_reach_ball.player_is_striker
=
false ;
>
This enumerated output symbol is set:
strategy.role
=
strategy.role.offensive_supporter
>
The option
lnw_playing_supporter
is executed.
The decision tree:
This browser can't display the SVG file
svg/option_lnw_decide_current_role_state_offensive_supporter.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:
/** */
if
(
game.player_number
()
== 1
)
{
goto
goalie
;
}
else
{
/** */
if
(
strategy.estimated_time_to_reach_ball
<
strategy.min_teammate_time_to_reach_ball
()
)
{
goto
striker
;
}
else
{
/** */
if
(
(
strategy.max_supporter_position_on_field.x
()
<
robot_pose.x
()
)
&&
(
strategy.max_supporter_position_on_field.x
()
> -100000
)
)
{
goto
offensive_supporter
;
}
else
{
/** */
if
(
true
)
{
goto
defensive_supporter
;
}
else
{
stay;
}
}
}
}
State defensive_supporter
If that state is active,
>
The option
estimate_time_to_reach_ball
is executed. Parameters:
estimate_time_to_reach_ball.player_is_striker
=
false ;
>
This enumerated output symbol is set:
strategy.role
=
strategy.role.defensive_supporter
>
The option
lnw_playing_supporter
is executed.
The decision tree:
This browser can't display the SVG file
svg/option_lnw_decide_current_role_state_defensive_supporter.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:
/** */
if
(
game.player_number
()
== 1
)
{
goto
goalie
;
}
else
{
/** */
if
(
strategy.estimated_time_to_reach_ball
<
strategy.min_teammate_time_to_reach_ball
()
)
{
goto
striker
;
}
else
{
/** */
if
(
(
strategy.max_supporter_position_on_field.x
()
<
robot_pose.x
()
)
&&
(
strategy.max_supporter_position_on_field.x
()
> -100000
)
)
{
goto
offensive_supporter
;
}
else
{
/** */
if
(
true
)
{
goto
defensive_supporter
;
}
else
{
stay;
}
}
}
}