>xabsl
Behavior Documentation
>
Index
>Agents
>Symbols
>Basic Behaviors
>Options
>> prepare_send_pass
>>>
search_ball
>>>
go_home
>>>
bring_home
>>>
turn_to_receiver
>>>
finished
Option prepare_send_pass
State Machine
This browser can't display the SVG file
svg/option_prepare_send_pass.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
State search_ball
If that state is active,
>
This enumerated output symbol is set:
head.control_mode
=
head.control_mode.search_for_ball
>
This decimal output symbol is set:
head.mouth
=
0
>
This enumerated output symbol is set:
motion.type
=
motion.type.walk
>
This enumerated output symbol is set:
motion.walk_type
=
motion.walk_type.normal
>
This decimal output symbol is set:
motion.walk_speed.x
=
0
>
This decimal output symbol is set:
motion.walk_speed.y
=
0
>
This decimal output symbol is set:
motion.walk_speed.rot
=
60
The decision tree:
This browser can't display the SVG file
svg/option_prepare_send_pass_state_search_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:
/** */
if
(
ball.time_since_last_seen
()
< 300
)
{
goto
bring_home
;
}
else
{
/** */
if
(
state_time
> 3000
)
{
goto
go_home
;
}
else
{
stay;
}
}
State go_home
If that state is active,
>
This enumerated output symbol is set:
head.control_mode
=
head.control_mode.search_for_ball
>
The option
go_to_point_smart
is executed. Parameters:
go_to_point_smart.x
=
passing_challenge.position.x
(
game.player_number
()
) ;
go_to_point_smart.y
=
passing_challenge.position.y
(
game.player_number
()
) ;
go_to_point_smart.angle
=
ball.angle
() ;
The decision tree:
This browser can't display the SVG file
svg/option_prepare_send_pass_state_go_home.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
(
ball.time_since_last_seen
()
< 300
)
{
goto
bring_home
;
}
else
{
/** */
if
(
action_done
)
{
goto
search_ball
;
}
else
{
stay;
}
}
State bring_home
If that state is active,
>
The option
grab_and_dribble
is executed. Parameters:
grab_and_dribble.angle
=
selfloc.angle_to
(
passing_challenge.position.x
(
game.player_number
()
) ,
passing_challenge.position.y
(
game.player_number
()
)
) ;
grab_and_dribble.dribble_forward
=
true ;
grab_and_dribble.time_limit
=
(
selfloc.distance_to
(
passing_challenge.position.x
(
game.player_number
()
) ,
passing_challenge.position.y
(
game.player_number
()
)
)
< 500
? 0 : -1 ) ;
grab_and_dribble.forward_kick
=
false ;
grab_and_dribble.always_stop
=
true ;
grab_and_dribble.regrab
=
true ;
The decision tree:
This browser can't display the SVG file
svg/option_prepare_send_pass_state_bring_home.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
(
strategy.ball_is_grabbed
)
{
/** */
if
(
selfloc.distance_to
(
passing_challenge.position.x
(
game.player_number
()
) ,
passing_challenge.position.y
(
game.player_number
()
)
)
< 300
)
{
goto
turn_to_receiver
;
}
else
{
stay;
}
}
else
{
/** */
if
(
ball.time_since_last_seen
()
> 2500
)
{
goto
search_ball
;
}
else
{
stay;
}
}
State turn_to_receiver
If that state is active,
>
The option
turn_to_pass_partner
is executed. Parameters:
turn_to_pass_partner.angle
=
selfloc.angle_to
(
passing_challenge.position.x
(
passing_challenge.mate_number
()
) ,
passing_challenge.position.y
(
passing_challenge.mate_number
()
)
) ;
The decision tree:
This browser can't display the SVG file
svg/option_prepare_send_pass_state_turn_to_receiver.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
(
action_done
)
{
goto
finished
;
}
else
{
stay;
}
State finished
This state is a target state.
If that state is active,
>
This enumerated output symbol is set:
head.control_mode
=
head.control_mode.grab_ball
>
This boolean output symbol is set:
strategy.ball_is_grabbed
=
true
>
This enumerated output symbol is set:
motion.type
=
motion.type.walk
>
This enumerated output symbol is set:
motion.walk_type
=
motion.walk_type.walk_with_ball
>
This decimal output symbol is set:
motion.walk_speed.x
=
0
>
This decimal output symbol is set:
motion.walk_speed.y
=
0
>
This decimal output symbol is set:
motion.walk_speed.rot
=
0
The decision tree:
This browser can't display the SVG file
svg/option_prepare_send_pass_state_finished.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:
stay;