CLang: The RoboCup Coach Language
The RoboCup Coach Language (CLang) was developed to enable online coaches
to change the behavior of simulated soccer players during games in the
Simulated League. Since a coach may work together with teams from
different research groups, it is important for the coach language to
have clear semantics that prevent misinterpretation from both the players
and the coach.
The CLang grammar that is used in our corpus is based on the one given in
the following document (Section 7.7):
Mao Chen, Klaus Dorer, Ehsan Foroughi, Fredrik Heintz, ZhanXiang Huang,
Spiros Kapetanakis, Kostas Kostiadis, Johan Kummeneje, Jan Murray,
Itsuki Noda, Oliver Obst, Pat Riley, Timo Steffens, Yi Wang and Xiang
Yin. RoboCup Soccer Server Users Manual, for Soccer Server Version
7.07 and later. February 11, 2003.
CLang was not designed for use with an NL interface. To make it easier
to use, we have modified CLang, guided by the following principles:
-
If a construct is too clumsy to describe using natural languages, then
a more common specialization of the construct is introduced. For
example, (arc POINT 0 RADIUS 0 360) becomes (circle POINT
RADIUS).
-
If there are simple concepts that can be easily described in natural
languages, but are impossible to express in CLang, then new constructs
that correspond to these concepts are introduced. For example,
(left REGION) is a new construct that refers to the left half
of REGION from our team's perspective.
-
New constructs may be introduced by symmetry. For example, the
player predicate is introduced alongside
player-except and player-range, so that players can
be referenced in a unified manner.
-
It must be easy to convert the new constructs back into CLang for use
in the RoboCup Soccer Server.
Here are the modifications that have been made:
-
All references to players are made using the following constructs:
-
(player TEAM UNUM_SET) - the players in the team
TEAM whose uniform number is in the set UNUM_SET.
-
(player-except TEAM UNUM_SET) - the players in the team
TEAM whose uniform number is not in the set
UNUM_SET.
-
(player-range TEAM UNUM1 UNUM2) -
the players in the team TEAM whose uniform number is
between UNUM1 and UNUM2
(inclusive).
All constructs that contain references to individual players are made
to accept player, player-except and
player-range as arguments. For example, (bowner our
{6}) becomes (bowner (player our {6})). (pass
{2}) becomes (pass (player our {2})).
-
(ppos TEAM UNUM_SET INT1 INT2 REGION)
becomes:
-
(ppos-any (player TEAM UNUM_SET) REGION) if
INT1 is 1 and INT2 is
greater than or equal to the size of UNUM_SET. (This
corresponds to the ppos-all predicate that appeared in
earlier versions of the CLang corpus. ppos-any is a more
appropriate name than ppos-all.)
-
(ppos-none TEAM REGION) if UNUM_SET is
{0} and both INT1 and
INT2 are zero.
-
(POINT1 + ((pt ball) * POINT2)) becomes
(pt-with-ball-attraction POINT1 POINT2).
-
(arc POINT 0 RADIUS ANGLE_BEGIN 360) becomes (circle POINT
RADIUS), regardless of the value of ANGLE_BEGIN.
-
New constructs are introduced for the following pre-defined regions:
-
Rectangles:
-
(field) - the entire field.
-
(half TEAM) - the TEAM's half of the field.
-
(penalty-area TEAM) - the TEAM's penalty
area.
-
(goal-area TEAM) - the TEAM's goal area.
-
(midfield) - the entire midfield.
-
(midfield TEAM) - the TEAM's half of the
midfield.
-
(near-goal-line TEAM) - the area near the
TEAM's goal line. (The very-near-goal-line
predicate, which appeared in previous versions of the CLang
corpus, becomes near-goal-line. There was previously
only one instance of very-near-goal-line in the
corpus, and the two predicates are semantically very similar.)
-
(from-goal-line TEAM X1 X2) -
X1 to X2 meters from
the TEAM's goal line.
-
(left REGION) - the left half of REGION from
our team's perspective.
-
(right REGION) - the right half of REGION
from our team's perspective.
-
(left-quarter REGION) - the left quarter of
REGION from our team's perspective.
-
(right-quarter REGION) - the right quarter of
REGION from our team's perspective.
-
(reg-exclude REGION1 REGION2) -
the region REGION1 minus
REGION2. (This construct is used only when
it results in a rectangular region.)
-
Points:
-
(front-of-goal TEAM) - the point directly in front of
the TEAM's goal.
-
(from-goal TEAM X) - the point X meters in
front of the TEAM's goal.
Code that translates the new CLang constructs into the original CLang
(and the pre-defined regions into exact xy-coordinates) is
available upon request.
Yuk Wah Wong
(ywwong@cs.utexas.edu)