>xabsl
Behavior Documentation
>
Index
>Agents
>Symbols
>Basic Behaviors
>Options
>> decide_current_role
>>>
supporter
>>>
immediate_striker
>>>
striker
>>>
striker_after_kick
>>>
striker_conflict
>>>
goalie
Option decide_current_role
Decide which role the robot is currently playing
State Machine
This browser can't display the SVG file
svg/option_decide_current_role.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
State 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.offensive_supporter
>
This boolean output symbol is set:
strategy.ball_is_grabbed
=
false
>
This boolean output symbol is set:
strategy.ball_was_kicked
=
false
>
The option
supporter
is executed.
>
This enumerated output symbol is set:
leds.face1
=
leds.blink.oooo
>
This enumerated output symbol is set:
leds.face2
=
leds.blink.oooo
>
This enumerated output symbol is set:
leds.face3
=
leds.blink.oooo
>
This enumerated output symbol is set:
leds.face4
=
leds.blink.oooo
>
This enumerated output symbol is set:
leds.face5
=
leds.blink.oooo
>
This enumerated output symbol is set:
leds.face6
=
leds.blink.oooo
The decision tree:
This browser can't display the SVG file
svg/option_decide_current_role_state_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
()
+ 1000)
)
{
goto
supporter
;
}
else
{
/** */
if
(
strategy.estimated_time_to_reach_ball
< (
strategy.min_teammate_time_to_reach_ball
()
- 2500)
)
{
goto
immediate_striker
;
}
else
{
goto
striker
;
}
}
}
State immediate_striker
If that state is active,
>
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
playing_striker
is executed.
>
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
The decision tree:
This browser can't display the SVG file
svg/option_decide_current_role_state_immediate_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
()
+ 1000)
)
{
goto
supporter
;
}
else
{
/** */
if
(
state_time
> 800
)
{
goto
supporter
;
}
else
{
goto
striker
;
}
}
}
State striker
This state has a capacity of 1. Only 1 of the cooperating agents that are executing this option can enter it at the same time.
If that state is active,
>
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
>
This boolean output symbol is set:
strategy.striker_conflict
=
conflict
>
The option
playing_striker
is executed.
>
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
The decision tree:
This browser can't display the SVG file
svg/option_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
()
+ 1000)
)
{
goto
supporter
;
}
else
{
/** */
if
(
strategy.ball_was_kicked
)
{
goto
striker_after_kick
;
}
else
{
/** */
if
(
(
conflict
)
&&
(
strategy.estimated_time_to_reach_ball
>=
strategy.min_teammate_time_to_reach_ball
()
)
)
{
goto
striker_conflict
;
}
else
{
stay;
}
}
}
}
State striker_after_kick
If that state is active,
>
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
playing_striker
is executed.
>
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
The decision tree:
This browser can't display the SVG file
svg/option_decide_current_role_state_striker_after_kick.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
()
+ 1000)
)
{
goto
supporter
;
}
else
{
/** */
if
(
state_time
< 1500
)
{
stay;
}
else
{
/** */
if
(
state_time
< 2000
)
{
goto
striker
;
}
else
{
goto
supporter
;
}
}
}
}
State striker_conflict
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.offensive_supporter
>
The option
supporter
is executed.
>
This boolean output symbol is set:
strategy.ball_is_grabbed
=
false
>
This boolean output symbol is set:
strategy.ball_was_kicked
=
false
>
This enumerated output symbol is set:
leds.face1
=
leds.blink.oooo
>
This enumerated output symbol is set:
leds.face2
=
leds.blink.oooo
>
This enumerated output symbol is set:
leds.face3
=
leds.blink.oooo
>
This enumerated output symbol is set:
leds.face4
=
leds.blink.oooo
>
This enumerated output symbol is set:
leds.face5
=
leds.blink.oooo
>
This enumerated output symbol is set:
leds.face6
=
leds.blink.oooo
The decision tree:
This browser can't display the SVG file
svg/option_decide_current_role_state_striker_conflict.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
()
+ 1000)
)
{
goto
supporter
;
}
else
{
goto
supporter
;
}
}
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_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
()
+ 1000)
)
{
goto
supporter
;
}
else
{
goto
striker
;
}
}