Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

BasicPlayer Class Reference

#include <BasicPlayer.h>

Inheritance diagram for BasicPlayer:

Inheritance graph
[legend]
Collaboration diagram for BasicPlayer:

Collaboration graph
[legend]
List of all members.

Protected Methods

SoccerCommand alignNeckWithBody ()
SoccerCommand turnBodyToPoint (VecPosition pos, int iPos=1)
SoccerCommand turnBackToPoint (VecPosition pos, int iPos=1)
SoccerCommand turnNeckToPoint (VecPosition pos, SoccerCommand com)
SoccerCommand searchBall ()
SoccerCommand dashToPoint (VecPosition pos, int iCycles=1)
SoccerCommand freezeBall ()
SoccerCommand kickBallCloseToBody (AngDeg ang, double dKickRatio=0.16)
SoccerCommand accelerateBallToVelocity (VecPosition vel)
SoccerCommand catchBall ()
SoccerCommand communicate (char *str)
SoccerCommand teleportToPos (VecPosition pos)
SoccerCommand listenTo (ObjectT obj)
SoccerCommand tackle ()
SoccerCommand turnBodyToObject (ObjectT o)
SoccerCommand turnNeckToObject (ObjectT o, SoccerCommand com)
SoccerCommand directTowards (VecPosition posTo, AngDeg angWhenToTurn, VecPosition *pos=NULL, VecPosition *vel=NULL, AngDeg *angBody=NULL)
SoccerCommand moveToPos (VecPosition posTo, AngDeg angWhenToTurn, double dDistDashBack=0.0, bool bMoveBack=false, int iCycles=1)
SoccerCommand collideWithBall ()
SoccerCommand interceptClose ()
SoccerCommand interceptCloseGoalie ()
SoccerCommand kickTo (VecPosition posTarget, double dEndSpeed)
SoccerCommand turnWithBallTo (AngDeg ang, AngDeg angKickThr, double dFreezeThr)
SoccerCommand moveToPosAlongLine (VecPosition pos, AngDeg ang, double dDistThr, int iSign, AngDeg angThr, AngDeg angCorr)
SoccerCommand intercept (bool isGoalie)
SoccerCommand dribble (AngDeg ang, DribbleT d)
SoccerCommand directPass (VecPosition pos, PassT passType)
SoccerCommand leadingPass (ObjectT o, double dDist, DirectionT dir=DIR_NORTH)
SoccerCommand throughPass (ObjectT o, VecPosition posEnd, AngDeg *angMax=NULL)
SoccerCommand outplayOpponent (ObjectT o, VecPosition pos, VecPosition *posTo=NULL)
SoccerCommand clearBall (ClearBallT type, SideT s=SIDE_ILLEGAL, AngDeg *angMax=NULL)
SoccerCommand mark (ObjectT o, double dDist, MarkT mark)
SoccerCommand defendGoalLine (double dDist)
SoccerCommand interceptScoringAttempt ()
SoccerCommand holdBall ()
VecPosition getThroughPassShootingPoint (ObjectT objTeam, VecPosition posEnd, AngDeg *angMax)
VecPosition getInterceptionPointBall (int *iCyclesBall, bool isGoalie)
VecPosition getActiveInterceptionPointBall (int *iCyclesBall, bool isGoalie)
VecPosition getDribblePoint (DribbleT dribble, double *dDist)
VecPosition getShootPositionOnLine (VecPosition p1, VecPosition p2, AngDeg *angLargest=NULL)
double getEndSpeedForPass (ObjectT o, VecPosition posPass)
VecPosition getMarkingPosition (ObjectT o, double dDist, MarkT mark)

Protected Attributes

ActHandlerACT
WorldModelWM
ServerSettingsSS
PlayerSettingsPS

Detailed Description

This class defines the skills that can be used by an agent. No functionality is available that chooses when to execute which skill, this is done in the Player class. The WorldModel is used to determine the way in which the skills are performed.

Definition at line 59 of file BasicPlayer.h.


Member Function Documentation

SoccerCommand BasicPlayer::accelerateBallToVelocity VecPosition    velDes [protected]
 

This skill enables an agent to accelerate the ball in such a way that it gets a certain velocity after the kick. It receives the desired velocity 'vecDes' as its only argument and returns a kick command that causes the ball to be accelerated to this velocity. If the power that must be supplied to the kick command to get the desired result does not exceed the maximum kick power then the desired velocity can be realized with a single kick. The kick direction should then be equal to the direction of the acceleration vector relative to the agent's global body angle. However, if the desired velocity is too great or if the current ball velocity is too high then the required acceleration cannot be realized with a single kick. In this case, the ball is kicked in such a way that the acceleration vector has the maximum possible length and a direction that aligns the resulting ball movement with 'vecDes'. This means that after the kick the ball will move in the same direction as 'vecDes' but at a lower speed. To this end the acceleration vector has to compensate for the current ball velocity in the `wrong' direction (y-component).

Parameters:
velDes  desired ball velocity
Returns:
SoccerCommand that accelerates the ball to 'vecDes'

Definition at line 377 of file BasicPlayer.cpp.

References AngDeg, asinDeg(), CMD_KICK, WorldModel::getActualKickPowerRate(), WorldModel::getAgentGlobalBodyAngle(), ServerSettings::getBallAccelMax(), VecPosition::getDirection(), WorldModel::getGlobalVelocity(), WorldModel::getKickPowerForSpeed(), VecPosition::getMagnitude(), ServerSettings::getMaxPower(), VecPosition::getY(), VecPosition::normalizeAngle(), OBJECT_BALL, VecPosition::rotate(), SS, and WM.

Referenced by freezeBall(), and kickTo().

SoccerCommand BasicPlayer::alignNeckWithBody   [protected]
 

This skill enables an agent to align his neck with his body. It returns a turn neck command that takes the angle of the agent's body relative to his neck as its only argument.

Returns:
SoccerCommand turn_neck command that aligns neck with body

Definition at line 57 of file BasicPlayer.cpp.

References CMD_TURNNECK, WorldModel::getAgentBodyAngleRelToNeck(), and WM.

Referenced by Player::deMeer5(), and Player::deMeer5_goalie().

SoccerCommand BasicPlayer::catchBall   [protected]
 

This skill enables an agent to catch the ball and can only be executed when the agent is a goalkeeper. It returns a catch command that takes the angle of the ball relative to the body of the agent as its only argument. The correct value for this argument is computed by determining the global direction between the current ball position and the agent's current position and by making this direction relative to the agent's global body angle.

Returns:
SoccerCommand to catch the ball

Definition at line 412 of file BasicPlayer.cpp.

References CMD_CATCH, WorldModel::getRelativeAngle(), OBJECT_BALL, and WM.

Referenced by Player::deMeer5_goalie(), and Player::performPenalty().

SoccerCommand BasicPlayer::clearBall ClearBallT    type,
SideT    s = SIDE_ILLEGAL,
AngDeg   angMax = NULL
[protected]
 

This skill enables an agent to clear the ball to a certain area on the field. It is useful, for example, when a defender cannot dribble or pass the ball to a teammate in a dangerous situation. Using this skill he can then kick the ball up the field away from the defensive zone. It is important to realize that this skill is only called when the agent has no alternative options in the current situation. Clearing the ball amounts to kicking it with maximum power into the widest angle between opponents in a certain area. The shooting direction is determined using the function which returns the direction of the bisector of this widest angle. The area on the field from which this angle is selected depends on the type of clear which is supplied as an argument to this skill. We distinguish three types of clearing:

  • CLEAR BALL DEFENSIVE: clearing the ball away from the defensive zone into a triangular area which is defined by the current ball position and the center line on the field.
  • CLEAR BALL OFFENSIVE: clearing the ball towards the offensive zone into a triangular area which is defined by the current ball position and the line segment that coincides with the front line of the opponent's penalty area and extends to the left and right side lines.
  • CLEAR BALL GOAL: clearing the ball into a triangular area in front of the opponent's goal which is defined by the current ball position and the line segment that runs from the center of the opponent's goal to the center of the front line of the penalty area.
Parameters:
type  type of the clear ball skill
s  if specified indicates the part of the field the clearBall should be directed to.
angMax  if specified (and not NULL) will be filled with the angle between the opponents in the direction in which will be shot
Returns:
SoccerCommand kick command to clear the ball

Definition at line 1886 of file BasicPlayer.cpp.

References AngDeg, CLEAR_BALL_DEFENSIVE, CLEAR_BALL_GOAL, CLEAR_BALL_OFFENSIVE, CLEAR_BALL_OFFENSIVE_SIDE, ClearBallT, CMD_ILLEGAL, WorldModel::getBallPos(), ServerSettings::getBallSpeedMax(), PlayerSettings::getClearBallDist(), PlayerSettings::getClearBallOppMaxDist(), WorldModel::getDirectionOfWidestAngle(), VecPosition::getDistanceTo(), Line::getIntersection(), VecPosition::getX(), VecPosition::getY(), kickTo(), Line::makeLineFromPositionAndAngle(), Line::makeLineFromTwoPoints(), max(), PENALTY_X, PITCH_LENGTH, PITCH_WIDTH, PS, VecPosition::setVecPosition(), VecPosition::setY(), SIDE_LEFT, SIDE_RIGHT, SideT, SS, and WM.

SoccerCommand BasicPlayer::collideWithBall   [protected]
 

This method returns a command that can be used to collide with the ball on purpose. When this is not possible. CMD_ILLEGAL is returned. Colliding with the ball may be useful when the player is turned with his back to the opponent goal and is intercepting a moving ball, by colliding both the ball and the player will loose all their velocity. Now the player can turn at once to the desired direction. Otherwise he first has to freeze the ball, freeze his own speed and then turn around.

Definition at line 615 of file BasicPlayer.cpp.

References CMD_ILLEGAL, dashToPoint(), SoccerCommand::dPower, WorldModel::getAgentGlobalPosition(), ServerSettings::getBallSize(), WorldModel::getBallSpeed(), VecPosition::getDistanceTo(), ServerSettings::getPlayerSize(), ServerSettings::getPlayerSpeedMax(), WorldModel::getRelativeDistance(), OBJECT_BALL, POLAR, WorldModel::predictAgentPosAfterCommand(), WorldModel::predictPosAfterNrCycles(), SS, turnBodyToPoint(), and WM.

Referenced by interceptClose(), and turnWithBallTo().

SoccerCommand BasicPlayer::communicate char *    str [protected]
 

This skill enables an agent to communicate with other players on the field. It receives a string message as its only argument and returns a say command that causes the message to be broadcast to all players within a certain distance from the speaker.

Returns:
SoccerCommand to say the specified string 'str'

Definition at line 424 of file BasicPlayer.cpp.

References CMD_SAY.

SoccerCommand BasicPlayer::dashToPoint VecPosition    pos,
int    iCycles = 1
[protected]
 

This method can be called to create a SoccerCommand that dashes to a point. This skill enables an agent to dash to a given point. It receives a global position 'pos' as its only argument and returns a dash command that causes the agent to come as close to this point as possible. Since the agent can only move forwards or backwards, the closest point to the target position that he can reach by dashing is the orthogonal projection of 'pos' onto the line that extends into the direction of his body (forwards and backwards). The power that must be supplied to the dash command is computed using the 'getPowerForDash' method which takes the position of 'pos' relative to the agent as input and 'iCycles' which denotes in how many cycles we want to reach that point.

Parameters:
pos  global position to which the agent wants to dash
iCycles  desired number of cycles to reach point 'pos'
Returns:
SoccerCommand dash command to move closer to 'pos'

Definition at line 223 of file BasicPlayer.cpp.

References CMD_DASH, WorldModel::getAgentEffort(), WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalPosition(), WorldModel::getAgentGlobalVelocity(), WorldModel::getPowerForDash(), and WM.

Referenced by collideWithBall(), directTowards(), interceptClose(), interceptCloseGoalie(), moveToPos(), and moveToPosAlongLine().

SoccerCommand BasicPlayer::defendGoalLine double    dDist [protected]
 

This skill enables an agent (usually the goalkeeper) to defend his own goal line. To this end the agent moves to a position along a line l which runs parallel to the goal line at a small distance 'dDist' (supplied as an argument) from the goal. The guard point to which the agent moves depends on the predicted position of the ball in the next cycle and is chosen in anticipation of a future shot on goal. This means that the guard point is selected in such a way that it will be most difficult for the opponent team to pass the goalkeeper. To find this point we need to look at the angle that the ball makes with respect to the left and right goal posts and we need to determine which point on l covers this angle in the most optimal way, i.e. leaves an equal gap to the left and to the right of the goalkeeper. Let m be the line that goes through the center point of the goal line and through the predicted ball position in the next cycle. Since this line m bisects the above-mentioned angle, the optimal guard point on l can be computed by determining the intersection between l and m. Note that in our current implementation the goalkeeper always stays in front of the goal mouth to avoid leaving an open goal when the ball is passed to an opponent in the center of the penalty area. The computed guard point is therefore adjusted if it lies too far to the side . After computing the guard point the goalkeeper needs to move to this point while keeping sight of the ball. If the distance between the current goalkeeper position and the line l is larger than DefendGoalLineMaxDist (which has a value of 3.0 in our current implementation) the moveToPos skill is used to move directly towards the guard point. This can happen, for example, when the goalkeeper has moved forward from his line to intercept the ball and now has to move back to his line again. Note that the fourth argument supplied to the moveToPos skill equals true in this case to indicate that the goalkeeper wants to turn his back to the guard point in order to keep the ball in sight while moving. However, if the distance between the guard point and l is less than DefendGoalLineMaxDist then the moveToPosAlongLine skill is used to move along l to the guard point. This skill receives an argument `sign' representing a prediction of the agent's movement in the coming cycles. This value is used to adjust the agent's body direction when necessary. In this case it can be expected that the goalkeeper will move along l in the same direction as the ball and `sign' is therefore determined by looking at the ball velocity in cycle t.

Parameters:
dDist  distance before goal the goalkeeper will move along
Returns:
SoccerCommand to defend the goal line.

Definition at line 2088 of file BasicPlayer.cpp.

References AngDeg, WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalPosition(), WorldModel::getBallPos(), WorldModel::getConfidence(), VecPosition::getDistanceTo(), WorldModel::getGlobalVelocity(), ServerSettings::getGoalWidth(), Line::getIntersection(), WorldModel::getPosOwnGoal(), VecPosition::getX(), VecPosition::getY(), WorldModel::isInOwnPenaltyArea(), Line::makeLineFromPositionAndAngle(), Line::makeLineFromTwoPoints(), moveToPos(), moveToPosAlongLine(), OBJECT_BALL, VecPosition::setY(), sign(), SS, WorldModel::strLastSeeMessage, and WM.

SoccerCommand BasicPlayer::directPass VecPosition    pos,
PassT    passType
[protected]
 

This skill enables an agent to pass the ball directly to another player. It receives two arguments, 'pos' and 'passType', which respectively denote the position (of usually a teammate) to which the agent wants to pass the ball and the kind of pass (either normal or fast) that should be given. This skill uses the kickTo skill to pass the ball to the specified position with a certain desired end speed depending on the type of pass.

Parameters:
pos  position of object to which a direct pass should be given
passType  kind of pass (either PASS_NORMAL or PASS_FAST )
Returns:
SoccerCommand to perform a direct pass to object 'o'

Definition at line 1603 of file BasicPlayer.cpp.

References CMD_ILLEGAL, PlayerSettings::getFastPassEndSpeed(), PlayerSettings::getPassEndSpeed(), kickTo(), PASS_FAST, PASS_NORMAL, PassT, and PS.

SoccerCommand BasicPlayer::directTowards VecPosition    posTurnTo,
AngDeg    angWhenToTurn,
VecPosition   pos = NULL,
VecPosition   vel = NULL,
AngDeg   angBody = NULL
[protected]
 

Definition at line 492 of file BasicPlayer.cpp.

References AngDeg, CMD_ILLEGAL, dashToPoint(), WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalPosition(), WorldModel::getAgentGlobalVelocity(), WorldModel::getAngleForTurn(), VecPosition::getMagnitude(), VecPosition::normalizeAngle(), WorldModel::predictFinalAgentPos(), WorldModel::predictStateAfterTurn(), turnBodyToPoint(), and WM.

Referenced by moveToPos().

SoccerCommand BasicPlayer::dribble AngDeg    ang,
DribbleT    dribbleT
[protected]
 

This skill enables an agent to dribble with the ball, i.e. to move with the ball while keeping it within a certain distance. This amounts to repeatedly kicking the ball at a certain speed into a desired direction and then intercepting it again. Two arguments, the angle 'ang' and type 'dribbleT', are supplied to this skill which respectively denote the global direction towards which the agent wants to dribble and the kind of dribble that must be performed. We distinguish three kinds of dribbling:

  • DRIBBLE FAST: a fast dribble action in which the agent kicks the ball relatively far ahead of him.
  • DRIBBLE SLOW: a slower dribble action in which the agent keeps the ball closer than on a fast dribble.
  • DRIBBLE WITH BALL: a safe dribble action in which the agent keeps the ball very close to his body.
It is important to realize that this skill is only called when the ball is located within the agent's kickable range. This means that it is only responsible for the kicking part of the overall dribbling behavior, i.e. it only causes the ball to be kicked a certain distance ahead into the desired direction 'ang'. If the absolute angle between 'ang' and the agent's body direction is larger than DribbleTurnAngle (which currently has a value of 30 degrees) then the agent uses the turnWithBallTo skill to turn with the ball towards the global angle 'ang'. Otherwise, he uses the kickTo skill to kick the ball into the desired direction towards a point that lies a certain distance ahead depending on the type of dribble. After the kick, the ball will move out of the agent's kickable range and as a result the agent will try to intercept it using the intercept skill. The dribbling skill can then be called again once the agent has succeeded in intercepting the ball. This sequence of kicking and intercepting will repeat itself until the agent decides to perform another skill. Note that during the dribble the power of a kick depends on the distance that the ball should travel and on the speed that it should have when it reaches the target point. In our current implementation this speed equals 0.5 (=DribbleKickEndSpeed) for any type of dribble. Experiments have shown that lower end speed values cause the agent to intercept the ball before it reaches the target point which slows the dribble down significantly.
Parameters:
ang  global direction in which should be dribbled
dribbleT  type of dribble that should be performed
Returns:
SoccerCommand to dribble in direction 'ang'

Definition at line 1542 of file BasicPlayer.cpp.

References AngDeg, SoccerCommand::dPower, DRIBBLE_FAST, DRIBBLE_SLOW, DRIBBLE_WITHBALL, DribbleT, WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalPosition(), PlayerSettings::getDribbleAngThr(), PlayerSettings::getTurnWithBallAngThr(), PlayerSettings::getTurnWithBallFreezeThr(), VecPosition::getX(), VecPosition::getY(), intercept(), WorldModel::isCollisionAfterCommand(), kickTo(), VecPosition::normalizeAngle(), PITCH_LENGTH, PITCH_WIDTH, POLAR, PS, VecPosition::setX(), VecPosition::setY(), sign(), turnWithBallTo(), and WM.

SoccerCommand BasicPlayer::freezeBall   [protected]
 

This skill enables an agent to freeze a moving ball, i.e. it returns a kick command that stops the ball dead at its current position. Since ball movement in the soccer server is implemented as a vector addition, the ball will stop in the next cycle when it is kicked in such a way that the resulting acceleration vector has the same length and opposite direction to the current ball velocity. The desired speed that should be given to the ball on the kick thus equals the current ball speed. Furthermore, the direction of the kick should equal the direction of the current ball velocity plus 180 degrees. Note that this direction must be made relative to the agent's global body angle before it can be passed as an argument to the kick command.

Returns:
SoccerCommand to freeze the ball.

Definition at line 246 of file BasicPlayer.cpp.

References accelerateBallToVelocity(), CMD_KICK, WorldModel::getAgentGlobalBodyAngle(), WorldModel::getBallDirection(), WorldModel::getBallPos(), WorldModel::getBallSpeed(), WorldModel::getCurrentCycle(), VecPosition::getDistanceTo(), WorldModel::getKickPowerForSpeed(), ServerSettings::getMaximalKickDist(), ServerSettings::getMaxPower(), min(), VecPosition::normalizeAngle(), POLAR, WorldModel::predictAgentPos(), WorldModel::predictBallInfoAfterCommand(), SS, and WM.

Referenced by kickBallCloseToBody(), kickTo(), and turnWithBallTo().

VecPosition BasicPlayer::getActiveInterceptionPointBall int *    iCyclesBall,
bool    isGoalie
[protected]
 

This method intercepts the ball at the first possible position.

Parameters:
iCyclesBall  is the nr of cyles after the ball is intercepted
isGoalie  bool to indicate that a goalie has to intercept the ball
Returns:
intercept position

Definition at line 2475 of file BasicPlayer.cpp.

References AngDeg, WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalNeckAngle(), WorldModel::getAgentGlobalPosition(), WorldModel::getAgentGlobalVelocity(), WorldModel::getAgentObjectType(), WorldModel::getAgentSpeed(), WorldModel::getAgentStamina(), WorldModel::getAngleForTurn(), ServerSettings::getCatchableAreaL(), VecPosition::getDirection(), VecPosition::getDistanceTo(), VecPosition::getMagnitude(), ServerSettings::getMaximalKickDist(), ServerSettings::getMaxPower(), ServerSettings::getPlayerDecay(), PlayerSettings::getPlayerWhenToIntercept(), PlayerSettings::getPlayerWhenToTurnAngle(), Geometry::getSumInfGeomSeries(), WorldModel::isInOwnPenaltyArea(), WorldModel::logCircle(), VecPosition::normalizeAngle(), OBJECT_BALL, POLAR, WorldModel::predictPosAfterNrCycles(), WorldModel::predictStateAfterDash(), WorldModel::predictStateAfterTurn(), PS, SS, and WM.

Referenced by getInterceptionPointBall().

VecPosition BasicPlayer::getDribblePoint DribbleT    dribble,
double *    dDist
[protected]
 

Definition at line 2552 of file BasicPlayer.cpp.

References AngDeg, DRIBBLE_FAST, DRIBBLE_SLOW, DRIBBLE_WITHBALL, DribbleT, WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalPosition(), WorldModel::getOuterPositionInField(), VecPosition::getX(), VecPosition::getY(), PITCH_LENGTH, PITCH_WIDTH, POLAR, and WM.

double BasicPlayer::getEndSpeedForPass ObjectT    o,
VecPosition    posPass
[protected]
 

This method returns the end speed for a pass. This end speed is determined using two parameters, 'o' and 'posPass' which respectively denote the object to which is passed and the position to which is passed. First it is determined how many server cycles 'o' needs to travel to position 'posPass'. Then the starting speed of the ball is determined when it wants to travel to 'posPass' in the same number of cycles. This starting speed is adjusted if the corresponding end speed of the ball in the passing point lies outside the range [MinPassEndSpeed .. MaxPassEndSpeed].

Parameters:
o  object to which the ball will be passed
posPass  desired passing point where o can intercept the ball
Returns:
end speed to give to the ball such that player can intercept the ball the best.

Definition at line 2633 of file BasicPlayer.cpp.

References WorldModel::getBallPos(), ServerSettings::getBallSpeedMax(), VecPosition::getDistanceTo(), WorldModel::getEndSpeedFromFirstSpeed(), WorldModel::getFirstSpeedFromDist(), PlayerSettings::getPassEndSpeed(), ObjectT, WorldModel::predictNrCyclesToPoint(), PS, SS, and WM.

Referenced by throughPass().

VecPosition BasicPlayer::getInterceptionPointBall int *    iMinCyclesBall,
bool    isGoalie
[protected]
 

This method uses an iterative scheme to compute the optimal interception point of the ball. A loop is executed in which the prediction methods are used to predict the position of the ball a number of cycles, say i, into the future and to predict the number of cycles, say n, that the agent will need to reach this position. This is repeated for increasing values of i until n < i in which case it is assumed thay the agent should be able to reach the predicted ball position before the ball does. This point is chosen as the interception point and the moveToPos skill is used to move towards this point.

Parameters:
iCyclesToBall  will be filled with the nr of cycles it will take the ball to reach the returned position.
isGoalie  indicates whether the current player is a goalkeeper or not
Returns:
position to intercept the ball.

Definition at line 2319 of file BasicPlayer.cpp.

References AngDeg, getActiveInterceptionPointBall(), WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalNeckAngle(), WorldModel::getAgentGlobalPosition(), WorldModel::getAgentGlobalVelocity(), WorldModel::getAgentObjectType(), WorldModel::getAgentSpeed(), WorldModel::getAgentStamina(), WorldModel::getAngleForTurn(), ServerSettings::getCatchableAreaL(), WorldModel::getCurrentTime(), VecPosition::getDirection(), VecPosition::getDistanceTo(), WorldModel::getFastestInSetTo(), VecPosition::getMagnitude(), ServerSettings::getMaximalKickDist(), ServerSettings::getMaxPower(), ServerSettings::getPlayerDecay(), ServerSettings::getPlayerSpeedMax(), PlayerSettings::getPlayerWhenToIntercept(), PlayerSettings::getPlayerWhenToTurnAngle(), Geometry::getSumInfGeomSeries(), VecPosition::getX(), VecPosition::getY(), WorldModel::isBeforeGoal(), WorldModel::isInField(), VecPosition::normalizeAngle(), OBJECT_BALL, OBJECT_ILLEGAL, OBJECT_SET_OPPONENTS, ObjectT, PITCH_LENGTH, POLAR, WorldModel::predictPosAfterNrCycles(), WorldModel::predictStateAfterDash(), WorldModel::predictStateAfterTurn(), PS, SS, Time::updateTime(), and WM.

Referenced by Player::deMeer5_goalie().

VecPosition BasicPlayer::getMarkingPosition ObjectT    o,
double    dDist,
MarkT    mark
[protected]
 

This method returns a global position on the field which denotes the position to mark object 'o'. It receives three arguments: an object o (usually an opponent) that the agent wants to mark, a distance 'dDist' representing the desired distance between o and the marking position and a type indicator that denotes the type of marking that is required. We distinguish three types of marking:

  • MARK BALL: marking the opponent by standing at a distance 'dDist' away from him on the line between him and the ball. This type of marking will make it diĀ±cult for the opponent to receive a pass.
  • MARK GOAL: marking the opponent by standing at a distance 'dDist' away from him on the line between him and the center point of the goal he attacks. This type of marking will make it difficult for the opponent to score a goal.
  • MARK BISECTOR: marking the opponent by standing at a distance 'dDist' away from him on the bisector of the ball-opponent-goal angle. This type of marking enables the agent to intercept both a direct and a leading pass to the opponent.
Parameters:
o  object that has to be marked
dDist  distance marking position is located from object position
mark  marking technique that should be used
Returns:
position that is the marking position.

Definition at line 2677 of file BasicPlayer.cpp.

References WorldModel::getGlobalPosition(), WorldModel::getMarkingPosition(), VecPosition::getX(), mark(), MarkT, ObjectT, PITCH_LENGTH, and WM.

Referenced by mark().

VecPosition BasicPlayer::getShootPositionOnLine VecPosition    p1,
VecPosition    p2,
AngDeg   angLargest = NULL
[protected]
 

This method returns the point on a line segment with which the ball has the largest angle with the surrounding opponents. It uses the method getDirectionOfWidestAngle. The line is determined by the two position p1 and p2. The returned position lies on this line and makes the largest angle with the opponents. The actual angle between the opponents is returned by 'angLargest'.

Parameters:
p1  first position of line segment
p2  second position of line segment
angLargest  will be filled with the largest angle with the opponents
Returns:
VecPosition position on line that has the largest angle with the opponents

Definition at line 2602 of file BasicPlayer.cpp.

References AngDeg, WorldModel::getBallPos(), PlayerSettings::getClearBallOppMaxDist(), WorldModel::getDirectionOfWidestAngle(), VecPosition::getDistanceTo(), Line::getIntersection(), Line::makeLineFromPositionAndAngle(), Line::makeLineFromTwoPoints(), max(), min(), PS, and WM.

Referenced by getThroughPassShootingPoint().

VecPosition BasicPlayer::getThroughPassShootingPoint ObjectT    objTeam,
VecPosition    posEnd,
AngDeg   angMax
[protected]
 

This method returns the shooting point for a through pass to objTeam. This point lies on the line l that is created of the estimated position of the teammate after 3 cycles and 'posEnd'. Between these two points the maximal angle with respect to the opponents is calculated and the widest angle is calculated (this value is stored in angMax afterwards). The intersection between this widest angle and the line l is returned as the shooting point.

Parameters:
objTeam  teammate to give a throughpass to
posEnd  end point to which throughpasses are considered
angMax  will be filled with the maximal angle between the opponents
Returns:
position to give a through pass to.

Definition at line 2297 of file BasicPlayer.cpp.

References AngDeg, WorldModel::getGlobalPosition(), getShootPositionOnLine(), ObjectT, and WM.

Referenced by throughPass().

SoccerCommand BasicPlayer::holdBall   [protected]
 

This method returns a command to hold the ball close to your body. When no opponents are close the ball is kicked in front of the body of the agent. Otherwise it is kiced to that spot in the kickable distance which is hardest for the opponent to tackle.

Definition at line 2245 of file BasicPlayer.cpp.

References AngDeg, WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalPosition(), WorldModel::getBallPos(), WorldModel::getClosestInSetTo(), VecPosition::getDistanceTo(), WorldModel::getGlobalBodyAngle(), WorldModel::getGlobalPosition(), ServerSettings::getMaximalKickDist(), WorldModel::getPosOpponentGoal(), kickBallCloseToBody(), VecPosition::normalizeAngle(), OBJECT_BALL, OBJECT_ILLEGAL, OBJECT_SET_OPPONENTS, ObjectT, POLAR, WorldModel::predictAgentPosAfterCommand(), WorldModel::predictPosAfterNrCycles(), sign(), SS, turnBodyToPoint(), and WM.

SoccerCommand BasicPlayer::intercept bool    isGoalie [protected]
 

When the ball-interception skill is called, it is first determined whether it is possible for the agent to intercept the ball within two cycles using the intermediate player skill closeIntercept (for the goalkeeper closeIntereptGoalie). If it turns out that the ball cannot be intercepted within two cycles then the agent uses an iterative scheme to compute the optimal interception point. This is done using the method 'getInterceptionPointBall'.

Parameters:
isGoalie  indicates whether the current player is a goalkeeper or not
Returns:
SoccerCommand to intercept the ball.

Definition at line 1482 of file BasicPlayer.cpp.

References CMD_ILLEGAL, SoccerCommand::commandType, WorldModel::getAgentGlobalPosition(), WorldModel::getAgentObjectType(), interceptClose(), interceptCloseGoalie(), POLAR, WorldModel::predictCommandToInterceptBall(), turnBodyToPoint(), and WM.

Referenced by Player::deMeer5(), Player::deMeer5_goalie(), dribble(), interceptScoringAttempt(), and Player::performPenalty().

SoccerCommand BasicPlayer::interceptClose   [protected]
 

This skill enables an agent to intercept a ball which is close to him. The objective is to move in such a way that the ball will come within the kickable distance from the agent in one or two cycles. To this end the prediction methods from the world model are used to predict the ball position in the next cycle and two cycles into the future. It is then determined whether it is possible to move the agent within kickable distance from one of these positions using all logical combinations of turn and dash commands. If it is not possible to intercept the ball within two cycles then this skill returns an illegal command to indicate that it cannot be performed. First it is determined whether the agent can intercept the ball in one cycle. To this end the position of the ball in the next cycle is predicted and a calculation is performed to decide whether a single dash can move the agent within the kickable distance from this position. In order to be able to kick the ball efficiently after intercepting it, it is important that the agent moves to a good position relative to the ball (i.e. the ball must be in front of him). At the same time the agent must make sure that he does not collide with the ball when trying to intercept it. Let l be a line that runs forwards and backwards from the predicted position of the agent in the next cycle into the direction of his body. This line thus denotes the possible movement direction of the agent. Note that we have to use the agent's predicted position in the next cycle since his current velocity must be taken into account. In addition, let c be a circle which is centered on the predicted ball position and which has a radius equal to the sum of the radius of the agent, the radius of the ball and a small buffer (kickable margin/6). It is now determined whether the agent can intercept the ball in the next cycle by looking at the number of intersection points between l and c. If l and c have exactly one point in common then this point is the desired interception point for the next cycle. However, if the number of intersection points equals two then the desired point is the one for which the absolute angle of the ball relative to that point is the smallest. This amounts to the intersection point which is closest to the agent when the ball lies in front of him and to the furthest one when the ball is behind his back. As a result, the desired interception point will always be such that the agent has the ball in front of him in the next cycle. Then a dash command is generated that will bring the agent as close as possible to the desired point. Next, the position of the agent after executing this command is predicted and if it turns out that this predicted position lies within the kickable distance from the ball then the dash is performed. However, if the predicted position is not close enough to the ball or if l and c have no points in common then it is assumed that the ball cannot be intercepted with a single dash. In these cases, two alternatives are explored to see if the ball can be intercepted in two cycles. The first alternative is to determine whether the agent can intercept the ball by performing a turn followed by a dash. To this end the global position of the ball is predicted two cycles into the future and a turn command is generated that will turn the agent towards this point. The agent's position after executing this command is then predicted after which a dash command is generated that will bring the agent as close as possible to the predicted ball position in two cycles. If it turns out that the predicted position of the agent after the dash lies within kickable distance from the ball then the first command (i.e. the turn) in the sequence of two is performed. Otherwise, a second alternative is tried to determine whether the agent can intercept the ball by performing two dash commands. To this end two dash commands are generated to get closer to the predicted ball position after two cycles. If the predicted position of the agent after these two dashes lies within kickable distance from the ball then the first dash is performed. Otherwise, an illegal command is returned to indicate that the skill cannot be performed. The close interception procedure is heavily based on a similar method introduced in CMU'99 by Peter Stone.

Returns:
command to intercept ball in two cycles, CMD_ILLEGAL otherwise

Definition at line 710 of file BasicPlayer.cpp.

References AngDeg, CMD_DASH, CMD_ILLEGAL, collideWithBall(), SoccerCommand::commandType, dashToPoint(), FEATURE_INTERCEPT_CLOSE, FeatureT, WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalPosition(), WorldModel::getAgentGlobalVelocity(), WorldModel::getAgentObjectType(), WorldModel::getAgentStamina(), WorldModel::getAngleForTurn(), ServerSettings::getBallDecay(), ServerSettings::getBallSize(), ServerSettings::getBallSpeedMax(), Line::getCircleIntersectionPoints(), WorldModel::getClosestInSetTo(), Feature::getCommand(), VecPosition::getDistanceTo(), Stamina::getEffort(), WorldModel::getFeature(), ServerSettings::getKickableMargin(), VecPosition::getMagnitude(), ServerSettings::getMaximalKickDist(), PlayerSettings::getPlayerConfThr(), ServerSettings::getPlayerSize(), ServerSettings::getPlayerSpeedMax(), WorldModel::getPosOpponentGoal(), WorldModel::getPowerForDash(), WorldModel::getRelativeDistance(), WorldModel::getTimeLastHearMessage(), WorldModel::getTimeLastSeeMessage(), WorldModel::getTimeLastSenseMessage(), VecPosition::getX(), WorldModel::isFeatureRelevant(), SoccerCommand::isIllegal(), WorldModel::logCircle(), Line::makeLineFromPositionAndAngle(), VecPosition::normalizeAngle(), OBJECT_BALL, OBJECT_ILLEGAL, OBJECT_SET_OPPONENTS, ObjectT, PENALTY_X, POLAR, WorldModel::predictAgentPos(), WorldModel::predictAgentStateAfterCommand(), WorldModel::predictPosAfterNrCycles(), WorldModel::predictStateAfterTurn(), PS, WorldModel::setFeature(), SS, turnBodyToPoint(), and WM.

Referenced by intercept().

SoccerCommand BasicPlayer::interceptCloseGoalie   [protected]
 

This skill enables a goalkeeper to intercept a ball which is close to him. The objective is to move in such a way that the ball will come within the catchable distance from the agent in one or two cycles. To this end the prediction methods from the world model are used to predict the ball position in the next cycle and two cycles into the future. It is then determined whether it is possible to move the agent within the catchable area from one of these positions using all logical combinations of turn and dash commands. If it is not possible to intercept the ball within two cycles then this skill returns an illegal command to indicate that it cannot be performed. First it is determined whether the goalkeeper can intercept the ball in one cycle. To this end the position of the ball in the next cycle is predicted and a calculation is performed to decide whether a single dash can move the agent within catchable distance from this position. If it turns out that this is the case, the corresponding dash is performed. However, if the predicted position is not close enough to the ball then it is assumed that the ball cannot be intercepted with a single dash. In these cases, two alternatives are explored to see if the ball can be intercepted in two cycles. The first alternative is to determine whether the agent can intercept the ball by performing two dash commands. To this end two dash commands are generated. If the predicted position of the agent after these two dashes lies within catchable distance from the ball then the first dash is performed. Otherwise, a second alternative is tried to determine whether the agent can intercept the ball by performing a turn followed by a dash. To this end the global position of the ball is predicted two cycles into the future and a turn command is generated that will turn the agent towards this point. The agent's position after executing this command is then predicted after which a dash command is generated that will bring the agent as close as possible to the predicted ball position. If it turns out that the predicted position of the agent after the dash lies within catchable distance from the ball then the first command (i.e. the turn) in the sequence of two is performed. Otherwise, an illegal command is returned to indicate that the skill cannot be performed. The close interception procedure is heavily based on the method used by CMU'99 by Peter Stone.

Returns:
command to intercept ball in two cycles, CMD_ILLEGAL otherwise

Definition at line 1008 of file BasicPlayer.cpp.

References AngDeg, CMD_DASH, CMD_ILLEGAL, dashToPoint(), WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalVelocity(), WorldModel::getAgentObjectType(), WorldModel::getAgentStamina(), ServerSettings::getBallDecay(), ServerSettings::getBallSpeedMax(), ServerSettings::getCatchableAreaL(), VecPosition::getDistanceTo(), Stamina::getEffort(), ServerSettings::getPlayerSpeedMax(), PlayerSettings::getPlayerWhenToTurnAngle(), Line::getPointOnLineClosestTo(), WorldModel::getPowerForDash(), WorldModel::getRelativeDistance(), Line::makeLineFromPositionAndAngle(), VecPosition::normalizeAngle(), OBJECT_BALL, WorldModel::predictAgentPos(), WorldModel::predictAgentStateAfterCommand(), WorldModel::predictPosAfterNrCycles(), WorldModel::predictStateAfterDash(), PS, SS, turnBodyToPoint(), and WM.

Referenced by intercept(), and interceptScoringAttempt().

SoccerCommand BasicPlayer::interceptScoringAttempt   [protected]
 

This method returns a command to intercept a ball that is currently heading towards the goal. The current trajectory of the ball is determined and the goalkeeper positions himself on a point on this trajectory just before the goal.

Returns:
SoccerCommand to intercept a ball heading towards the goal.

Definition at line 2163 of file BasicPlayer.cpp.

References WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalPosition(), WorldModel::getBallDirection(), WorldModel::getBallPos(), VecPosition::getDistanceTo(), ServerSettings::getGoalWidth(), Line::getIntersection(), WorldModel::getSide(), WorldModel::getSidePenalty(), VecPosition::getX(), VecPosition::getY(), intercept(), interceptCloseGoalie(), SoccerCommand::isIllegal(), WorldModel::isPenaltyThem(), WorldModel::isPenaltyUs(), Line::makeLineFromPositionAndAngle(), moveToPos(), OBJECT_BALL, PITCH_LENGTH, VecPosition::setVecPosition(), sign(), SS, turnBodyToObject(), and WM.

SoccerCommand BasicPlayer::kickBallCloseToBody AngDeg    ang,
double    dKickRatio = 0.16
[protected]
 

This skill enables an agent to kick the ball close to his body. It receives an angle 'ang' as its only argument and returns a kick command that causes the ball to move to a point at a relative angle of 'ang' degrees and at a close distance (kickable margin/6 to be precise) from the agent's body. To this end the ball has to be kicked from its current position to the desired point relative to the predicted position of the agent in the next cycle. In general, this skill will be used when the agent wants to kick the ball to a certain position on the field which cannot be reached with a single kick. Since the efficiency of a kick is highest when the ball is positioned just in front of the agent's body, calling this skill with 'ang = 0' will have the effect that the agent can kick the ball with more power after it is executed. Note that this skill will only be executed if it is possible to actually reach the desired ball position with a single kick. If the required power does exceed the maximum then the ball is frozen at its current position using the freezeBall skill. In general, it will then always be possible to shoot the motionless ball to the desired point in the next cycle.

Parameters:
ang  ' relative angle to body to which the ball should be kicked
relative  ratio to which the ball is kicked
Returns:
SoccerCommand to kick the ball close to the body

Definition at line 298 of file BasicPlayer.cpp.

References AngDeg, CMD_KICK, freezeBall(), WorldModel::getAgentGlobalBodyAngle(), WorldModel::getBallPos(), ServerSettings::getBallSize(), WorldModel::getBallSpeed(), VecPosition::getDirection(), VecPosition::getDistanceTo(), WorldModel::getGlobalVelocity(), Line::getIntersection(), ServerSettings::getKickableMargin(), WorldModel::getKickPowerForSpeed(), VecPosition::getMagnitude(), ServerSettings::getMaxPower(), ServerSettings::getPlayerSize(), WorldModel::getRelativeAngle(), VecPosition::getX(), VecPosition::getY(), WorldModel::isDeadBallUs(), Line::makeLineFromPositionAndAngle(), VecPosition::normalizeAngle(), OBJECT_BALL, PITCH_LENGTH, PITCH_WIDTH, POLAR, WorldModel::predictAgentPos(), sign(), SS, turnBodyToObject(), and WM.

Referenced by holdBall(), kickTo(), and turnWithBallTo().

SoccerCommand BasicPlayer::kickTo VecPosition    posTarget,
double    dEndSpeed
[protected]
 

This skill enables an agent to kick the ball from its current position to a given position 'posTarget' in such a way that it has a remaining speed equal to 'dEndSpeed' when it reaches this position. However, it is possible that the ball cannot reach this velocity with a single kick either because the needed magnitude of the generated velocity vector exceeds the maximum speed of the ball or due to the fact that the current ball speed in combination with the position of the ball relative to the agent make it impossible to achieve the required acceleration. If the magnitude of needed velocity vector is larger than ball speed max it is certain that even in the optimal situation (i.e. if the ball lies directly in front of the agent and has zero velocity) the agent will not be able to kick the ball to the target position at the desired speed. In this case the expected ball movement is computed after executing a kick with maximum power into the direction of 'posTarget'. If the magnitude of the resulting movement vector is larger than a given percentage ('getPlayerWhenToKick' defined in the PlayerSettings) of the maximum ball speed then this kick is actually performed despite the fact that it cannot produce the wanted effect. Otherwise, the agent shoots the ball close to his body and directly in front of him using the kickBallCloseToBody skill. In this way he will be able to kick the ball with more power in the next cycle. However, if the magnitude of the desired velocity vector is smaller than ball speed max it is possible to reach the target point at the desired speed in the optimal situation. If the power that must be supplied to the kick command to achieve this acceleration is less than or equal to the maximum power the accelerateBallToVelocity skill is used to perform the desired kick. Otherwise, the agent uses the kickBallCloseToBody skill to put the ball in a better kicking position for the next cycle.

Parameters:
posTarget  target position where the ball should be shot to
endSpeed  desired speed ball should have in target position
Returns:
SoccerCommand that produces kick

Definition at line 1120 of file BasicPlayer.cpp.

References accelerateBallToVelocity(), AngDeg, asinDeg(), freezeBall(), WorldModel::getActualKickPowerRate(), WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalNeckAngle(), WorldModel::getAgentGlobalPosition(), ServerSettings::getBallAccelMax(), WorldModel::getBallPos(), ServerSettings::getBallSize(), ServerSettings::getBallSpeedMax(), WorldModel::getClosestInSetTo(), VecPosition::getDirection(), VecPosition::getDistanceTo(), WorldModel::getGlobalPosition(), WorldModel::getGlobalVelocity(), ServerSettings::getKickableMargin(), WorldModel::getKickPowerForSpeed(), ServerSettings::getKickPowerRate(), WorldModel::getKickSpeedToTravel(), VecPosition::getMagnitude(), ServerSettings::getMaximalKickDist(), ServerSettings::getMaxPower(), ServerSettings::getPlayerSize(), PlayerSettings::getPlayerWhenToKick(), Line::getPointOnLineClosestTo(), WorldModel::getRelativeAngle(), WorldModel::getRelativeDistance(), VecPosition::getX(), VecPosition::getY(), kickBallCloseToBody(), Line::makeLineFromTwoPoints(), OBJECT_BALL, OBJECT_SET_OPPONENTS, ObjectT, POLAR, WorldModel::predictAgentPos(), WorldModel::predictBallInfoAfterCommand(), PS, VecPosition::rotate(), VecPosition::setVecPosition(), SS, and WM.

Referenced by clearBall(), Player::deMeer5(), Player::deMeer5_goalie(), directPass(), dribble(), Player::executeStringCommand(), leadingPass(), outplayOpponent(), Player::performPenalty(), and throughPass().

SoccerCommand BasicPlayer::leadingPass ObjectT    o,
double    dDist,
DirectionT    dir = DIR_NORTH
[protected]
 

This skill enables an agent to give a leading pass to another player. A leading pass is a pass into open space that `leads' the receiver, i.e. instead of passing the ball di:rectly to another player it is kicked just ahead of him. In this way the receiver is able to intercept the ball while moving in a forward direction and this will speed up the attack. This skill receives two arguments, an object o (usually a teammate) and dist, which respectively denote the intended receiver of the leading pass and the `leading distance' ahead of the receiver. It uses the kickTo skill to pass the ball to a point that lies dist in front of the current position of o. Here `in front of' means in positive x-direction, i.e. at a global angle of 0 degrees. Note that the desired end speed for a leading pass is always equal to PassEndSpeed (currently 1.4) since the leading aspect of the pass might cause the receiver to miss the ball when its speed is higher.

Parameters:
o  object to which a leading pass should be given
dDist  distance in front of o to which is passed
Returns:
SoccerCommand to perform a leading pass to object 'o'

Definition at line 1629 of file BasicPlayer.cpp.

References DIR_CENTER, DIR_ILLEGAL, DirectionT, SoccerTypes::getAngleFromDirection(), WorldModel::getGlobalPosition(), PlayerSettings::getPassEndSpeed(), kickTo(), ObjectT, POLAR, PS, and WM.

SoccerCommand BasicPlayer::listenTo ObjectT    obj [protected]
 

This method returns a 'attentionto' command to listen to the specified object. In most occasions this is a teammate.

Definition at line 441 of file BasicPlayer.cpp.

References CMD_ATTENTIONTO, SoccerTypes::getIndex(), SoccerTypes::isKnownPlayer(), and ObjectT.

SoccerCommand BasicPlayer::mark ObjectT    o,
double    dDist,
MarkT    mark
[protected]
 

This skill enables an agent to mark an opponent, i.e. to guard him one-on-one with the purpose to minimize his usefulness for the opponent team. It can be used, for example, to block the path from the ball to an opponent or from an opponent to the goal. In this way the agent can prevent this opponent from receiving a pass or from moving closer to the goal while also obstructing a possible shot. This skill amounts to calculating the desired marking position based on the given arguments and then moving to this position. It receives three arguments: an object o (usually an opponent) that the agent wants to mark, a distance 'dDist' representing the desired distance between o and the marking position and a type indicator that denotes the type of marking that is required. We distinguish three types of marking:

  • MARK BALL: marking the opponent by standing at a distance 'dDist' away from him on the line between him and the ball. This type of marking will make it diĀ±cult for the opponent to receive a pass.
  • MARK GOAL: marking the opponent by standing at a distance 'dDist' away from him on the line between him and the center point of the goal he attacks. This type of marking will make it difficult for the opponent to score a goal.
  • MARK BISECTOR: marking the opponent by standing at a distance 'dDist' away from him on the bisector of the ball-opponent-goal angle. This type of marking enables the agent to intercept both a direct and a leading pass to the opponent.
After determining the marking position, the agent uses the moveToPos skill to move to this position. Note that the decision whether to turn or dash in the current situation depends on the angle of the marking position relative to the agent's body direction and on the distance to this position if this point lies behind the agent. In this case the moveToPos skill uses the threshold parameters MarkTurnAngle (=30) and MarkDistanceBack (=3) to make this decision. The values for these parameters are such that the condition which must hold for allowing a dash is fairly flexible. This is done because the marking position will be different in consecutive cycles due to the fact that the opponent and the ball move around from each cycle to the next. As a result, the agent will be able to actually progress towards a point that lies close to the marking position instead of constantly turning towards the newly calculated marking position in each cycle.
Parameters:
o  object that has to be marked
dDist  distance marking position is located from object position
mark  marking technique that should be used
Returns:
SoccerCommand to mark object 'o'.

Definition at line 2010 of file BasicPlayer.cpp.

References AngDeg, WorldModel::getAgentGlobalPosition(), VecPosition::getDistanceTo(), WorldModel::getGlobalPosition(), getMarkingPosition(), isAngInInterval(), mark(), MarkT, moveToPos(), VecPosition::normalizeAngle(), OBJECT_BALL, ObjectT, POLAR, turnBodyToObject(), turnBodyToPoint(), and WM.

Referenced by getMarkingPosition(), and mark().

SoccerCommand BasicPlayer::moveToPos VecPosition    posTo,
AngDeg    angWhenToTurn,
double    dDistBack = 0.0,
bool    bMoveBack = false,
int    iCycles = 1
[protected]
 

This skill enables an agent to move to a global position 'pos' on the field which is supplied to it as an argument. Since the agent can only move forwards or backwards into the direction of his body, the crucial decision in the execution of this skill is whether he should perform a turn or a dash. Turning has the advantage that in the next cycle the agent will be orientated correctly towards the point he wants to reach. However, it has the disadvantage that performing the turn will cost a cycle and will reduce the agent's velocity since no acceleration vector is added in that cycle. Apart from the target position 'pos', this skill receives several additional arguments for determining whether a turn or dash should be performed in the current situation. If the target point is in front of the agent then a dash is performed when the relative angle to this point is smaller than a given angle 'angWhenToTurn'. However, if the target point is behind the agent then a dash is only performed if the distance to point is less than a given value 'dDistBack' and if the angle relative to the back direction of the agent is smaller than 'angWhenToTurn'. In all other cases a turn is performed. Note that in the case of the goalkeeper it is sometimes desirable that he moves backwards towards his goal in order to keep sight of the rest of the field. To this end an additional boolean argument 'bMoveBack' is supplied to this skill that indicates whether the agent should always move backwards to the target point. If this value equals true then the agent will turn his back towards the target point if the angle relative to his back direction is larger than 'angToTurn'. In all other cases he will perform a (backward) dash towards 'posTo' regardless of whether the distance to this point is larger than 'dDistBack'.

Parameters:
posTo  global target position to which the agent wants to move
angWhenToTurn  angle determining when turn command is returned
dDistBack  when posTo lies closer than this value to the back of the agent (and within angWhenToTurn) a backward dash is returned
bMoveBack  boolean determing whether to move backwards to 'posTo'
Returns:
SoccerCommand that determines next action to move to 'posTo'

Definition at line 571 of file BasicPlayer.cpp.

References AngDeg, dashToPoint(), directTowards(), WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalPosition(), VecPosition::getDistanceTo(), VecPosition::getX(), VecPosition::getY(), VecPosition::normalizeAngle(), WorldModel::predictAgentPos(), WorldModel::predictFinalAgentPos(), turnBackToPoint(), and WM.

Referenced by defendGoalLine(), Player::deMeer5(), Player::deMeer5_goalie(), interceptScoringAttempt(), mark(), and Player::performPenalty().

SoccerCommand BasicPlayer::moveToPosAlongLine VecPosition    pos,
AngDeg    ang,
double    dDistThr,
int    iSign,
AngDeg    angThr,
AngDeg    angCorr
[protected]
 

This skill enables an agent to move along a line to a given position 'pos' on this line. It is used, for example, by the goalkeeper who often wants to stay on a line in front of his goal and move to different positions on this line depending on where the ball is located. Furthermore, it can also used by defenders for marking an opponent player by moving along a line between this player and the ball. The idea is that the agent must try to move as fast as possible to the desired point 'pos' along the line thereby keeping the number of turns to a minimum to avoid wasting cycles. Apart from the target position 'pos', this skill receives several additional arguments for determining whether the agent should turn or dash in the current situation. Since the agent can only move forwards or backwards into the direction of his body, it is important that he tries to keep the orientation of his body aligned with the direction of the line in order to be able to move quickly to the target point. A given angle 'ang' denotes the desired body angle (global) of the agent in the point 'pos'. The line l can thus be defined as going through 'pos' and having global direction 'ang'. Due to the noise that is added to the movement of the agent, the orientation of his body will never be exactly equal to 'ang' and as a result the agent' s position will start to deviate from the line. Each time when this skill is called, the agent's desired orientation is therefore slightly adjusted depending on his position with respect to l. If the distance d between the agent's current position and the line l is smaller than the given value 'dDistThr' then 'ang' remains unchanged. However, if d exceeds 'dDistThr' then 'ang' is adjusted in such a way that the agent will move closer to l in subsequent cycles. This is done by either increasing or decreasing the desired orientation 'ang' by 'angCorr' degrees depending on which side of the line the agent is located and on a prediction of the agent's movement in the forthcoming cycles. This prediction is represented by a given value 'iSign' which equals 1 if the agent is expected to move in the same direction as 'ang' and -1 if he will move in the opposite direction. Adjusting 'ang' in this way has the effect that in subsequent cycles the agent will move closer to the line again if this is necessary. The final decision whether to turn or dash is now made by comparing the agent's current body angle to the desired orientation. If the difference between these two angles is larger than 'angThr' degrees then the agent uses the turnBodyToPoint skill to turn in the desired direction. Otherwise, the dashToPoint skill is called to move towards the target position.

Parameters:
pos  global position to which the agent wants to move
ang  desired global body angle of agent in position 'pos'
dDistThr  threshold value that defines if desired angle is adjusted
iSign  indication whether agent predicts that he will move in the same direction as 'ang' in the subsequent cycles (iSign=1) or in the opposite direction (iSign=-1)
angThr  threshold value that specifies when agent will perform a turn command
angCorr  correction term with which angle is adjusted if necessary
Returns:
SoccerCommand that will move agent along line defined by position 'pos' and angle 'ang'.

Definition at line 1427 of file BasicPlayer.cpp.

References AngDeg, CMD_ILLEGAL, dashToPoint(), WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalPosition(), WorldModel::getBallPos(), VecPosition::getDistanceTo(), Line::getIntersection(), Line::getPointOnLineClosestTo(), Line::makeLineFromPositionAndAngle(), Line::makeLineFromTwoPoints(), VecPosition::normalizeAngle(), OBJECT_BALL, POLAR, turnBodyToPoint(), and WM.

Referenced by defendGoalLine().

SoccerCommand BasicPlayer::outplayOpponent ObjectT    o,
VecPosition    pos,
VecPosition   posTo = NULL
[protected]
 

This skill enables an agent to outplay an opponent. It is used, for example, when an attacker wants to get past an enemy defender. This is done by passing the ball to open space behind the defender in such a way that the attacker can beat the defender to the ball. Note that the attacker has an advantage in this situation, since he knows to which point he is passing the ball and is already turned in the right direction, whereas the defender is not. As result, the attacker has a headstart over the defender when trying to intercept the ball. Since a player can move faster without the ball, the main objective is to kick the ball as far as possible past the opponent while still being able to reach it before the opponent does. This skill receives two arguments, 'pos' and 'o', which respectively denote the point to which the agent wants to move with the ball and the object (usually an opponent) that the agent wants to outplay in doing so. First it is determined if it is possible to outplay the opponent o in the current situation. Let l be the line segment that runs from the agent's current position to the given point 'pos'. The best point to kick the ball to will be the furthest point from on this line that the agent can reach before the opponent does. We use a simple geometric calculation to find the point s on l which has equal distance to the agent and to the opponent. Let o' be the perpendicular projection of the opponent's position onto l and let d1, d2 and d3 respectively denote the distance between the agent poisition and o', the distance between o' and o and the distance between o' and s. To determine s we need to compute the unknown value of d3 using the values for d1 and d2 which can be derived from the world model. Since the distance from the agent position to s will be equal to the distance from o to s. Using this value for d3 we can compute the coordinates of the shooting point s. However, in some situations it is not likely that shooting the ball to this point will eventually result in outplaying the given opponent o on the way to 'pos'. We therefore use the values for d1, d2 and d3 to determine whether it is possible to outplay o in the current situation, and if so, what the best shooting point will be. The following situations are distinguished:

  • d1 + d3 > OutplayMinDist. If this condition holds, the opponent is located at a relatively large distance from the agent which makes an attempt to outplay him likely to be successful. First it is checked whether the agent's body is turned suffiiently towards the point 'pos'. If this is not the case then the turnWithBallTo skill is used to turn with the ball in the right direction. Otherwise, the kickTo skill is used to kick the ball to a point on the line l where the agent will be able to intercept it first. Note that in general the agent will be able to reach the point s before the opponent despite the fact that both players need to travel the same distance to this point. This is because the agent has already turned his body more or less towards 'pos' (and thus towards s), whereas the opponent probably has not. However, the actual point to which the ball is kicked is chosen slightly closer to the agent than the point s in order to be absolutely sure that he can intercept the ball before the opponent does. This safety margin is represented by the parameter OutplayBuffer which has a value of 2.5 in our current implementation. For this skill the desired end speed when the ball reaches z equals OutplayKickEndSpeed (=0.5). Note that the value for this parameter cannot be chosen too low, since this will cause the agent to intercept the ball before it reaches the target point
  • d1 + d3 < OutplayMinDist and d1 < d2. If this condition holds, the opponent is located close to the agent which makes it diĀ±cult to outplay him. However, if the agent is already turned in the right direction (i.e. towards 'pos') then d1 < d2 implies that the distance between the opponent and the line l (denoting the agent's desired movement trajectory) is large enough for the agent to outplay this opponent when the ball is kicked hard in the direction of 'pos' (i.e. further ahead than s). This is because the agent can start dashing after the ball immediately, whereas the opponent still has to turn in the right direction. As a result, the agent will have dashed past the opponent by the time the latter has turned correctly and this puts him in a good position to intercept the ball before the opponent. Therefore it is checked first whether the agent's body is sufficiently turned towards 'pos' and if this is not so then the turnWithBallTo skill is used toturn with the ball in the right direction. Otherwise, the kickTo skill is used to kick the ball past the opponent. In this case the point to which the ball is kicked either lies OutplayMaxDist (=20) metres ahead of the agent's current position into the direction of 'pos' or equals 'pos' when the distance to 'pos' is smaller than this value. In all other cases (i.e. d1 +d3 < OutplayMinDist and d1 > d2) this skill returns an illegal command to indicate that it is not possible to outplay the opponent o on the way to the point 'pos'.
Parameters:
o  opponent object that should be outplayed
pos  position to which agent wants to move while outplaying 'o'
posTo  position to which ball will be shot
Returns:
SoccerCommand to outplay object o on the way to 'pos', CMD_ILLEGAL when this is not possible.

Definition at line 1757 of file BasicPlayer.cpp.

References AngDeg, CMD_ILLEGAL, WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalPosition(), PlayerSettings::getConeWidth(), WorldModel::getCurrentTime(), VecPosition::getDistanceTo(), PlayerSettings::getDribbleAngThr(), WorldModel::getGlobalBodyAngle(), WorldModel::getGlobalPosition(), SoccerTypes::getIndex(), WorldModel::getNrInSetInCircle(), WorldModel::getNrInSetInCone(), Line::getPointOnLineClosestTo(), WorldModel::getTimeGlobalAngles(), PlayerSettings::getTurnWithBallAngThr(), PlayerSettings::getTurnWithBallFreezeThr(), VecPosition::getX(), VecPosition::getY(), kickTo(), Line::makeLineFromPositionAndAngle(), min(), VecPosition::normalizeAngle(), OBJECT_ILLEGAL, OBJECT_SET_OPPONENTS, ObjectT, PENALTY_X, POLAR, PS, turnWithBallTo(), and WM.

SoccerCommand BasicPlayer::searchBall   [protected]
 

This skill enables an agent to search for the ball when he cannot see it. It returns a turn command that causes the agent to turn his body by an angle that equals the width of his current view cone (denoted by the ViewAngle attribute in the AgentObject class). In this way the agent will see an entirely different part of the field after the turn which maximizes the chance that he will see the ball in the next cycle. Note that the agent turns towards the direction in which the ball was last observed to avoid turning back and forth without ever seeing the ball. Furthermore the inertia moment of the agent is taken into account to compensate for the current speed of the agent.

Returns:
SoccerCommand that searches for the ball.

Definition at line 176 of file BasicPlayer.cpp.

References AngDeg, SoccerCommand::dAngle, WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalPosition(), WorldModel::getBallPos(), WorldModel::getCurrentTime(), Time::getTime(), isAngInInterval(), VecPosition::normalizeAngle(), POLAR, turnBodyToPoint(), and WM.

Referenced by Player::deMeer5(), and Player::deMeer5_goalie().

SoccerCommand BasicPlayer::tackle   [protected]
 

This method returns the command to tackle the ball.

Definition at line 452 of file BasicPlayer.cpp.

References CMD_TACKLE.

SoccerCommand BasicPlayer::teleportToPos VecPosition    pos [protected]
 

This method returns a 'move' command to teleport the agent directly to the specified global position.

Parameters:
pos  global position to which should be moved.
Returns:
SoccerCommand to move directly to 'pos'.

Definition at line 433 of file BasicPlayer.cpp.

References CMD_MOVE, VecPosition::getX(), and VecPosition::getY().

Referenced by Player::deMeer5(), and Player::deMeer5_goalie().

SoccerCommand BasicPlayer::throughPass ObjectT    o,
VecPosition    posEnd,
AngDeg   angMax = NULL
[protected]
 

This skill enables an agent to give a more advanced type of pass called a through pass. With a through pass the ball is not passed directly to another player or just ahead of him, but it is kicked into open space between the opponent defenders and the opponent goalkeeper in such a way that a teammate (usually an attacker) will be able to reach the ball before an opponent does. If a through pass is executed successfully it often causes a disorganization of the opponent's defense which will enable an attacker to get the ball close to the enemy goal. This skill takes an object o (usually a teammate) as an argument which denotes the intended receiver of the through pass. The position p on the field to which the ball should be kicked is determined by drawing a line l from the object's current position to a given point 'pos' also supplied as an argument) and by computing the safest trajectory for the ball to a point on this line. To this end the widest angle between opponents from the current ball position to a point p on l is calculated. After this, the speed that the ball should have when it reaches this point is determined based on the distance from the current ball position to p and on the number of cycles n that o will need to reach p. If it turns out that the required end speed falls outside the range [MinPassEndSpeed .. MaxPassEndSpeed] it is set to the closest boundary of this range. The kickTo skill is then used to kick the ball to the desired point p at the required speed.

Parameters:
o  Object to which through pass should be given
posEnd  position that together with ball position defines line segment on which shooting point should be determined.
angMax  will be filled with the largest angle between the opponents
Returns:
SoccerCommand to give a throughPass to 'o'

Definition at line 1667 of file BasicPlayer.cpp.

References AngDeg, getEndSpeedForPass(), getThroughPassShootingPoint(), kickTo(), and ObjectT.

SoccerCommand BasicPlayer::turnBackToPoint VecPosition    pos,
int    iCycles = 1
[protected]
 

This skill enables an agent to turn his back towards a given point 'pos'. The only difference between this skill and turnBodyToPoint is that the angle between the given position and the predicted position of the agent in the next cycle is now made relative to the back of the agent by subtracting the agent's global back direction. This skill can for example be used by the goalkeeper in case he wants to move back to his goal while keeping sight of the rest of the field.

Parameters:
pos  position to which the agent's back should be turned
iCycles  denotes the number of cycles that are used to update the the agent position. The resulting position is compared with 'pos' to determine the desired turning angle.
Returns:
SoccerCommand command to turn agent's back to the desired point

Definition at line 104 of file BasicPlayer.cpp.

References AngDeg, CMD_TURN, WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentObjectType(), WorldModel::getAgentSpeed(), WorldModel::getAngleForTurn(), VecPosition::normalizeAngle(), WorldModel::predictAgentPos(), and WM.

Referenced by moveToPos().

SoccerCommand BasicPlayer::turnBodyToObject ObjectT    o [protected]
 

This skill enables an agent to turn his body towards an object o which is supplied to it as an argument. To this end the object's global position o in the next cycle is predicted based on its current velocity. This predicted position is passed as an argument to the turnBodyToPoint skill which generates a turn command that causes the agent to turn his body towards the object.

Parameters:
o  object to which agent wants to turn
Returns:
SoccerCommand that turns to this object

Definition at line 467 of file BasicPlayer.cpp.

References ObjectT, WorldModel::predictPosAfterNrCycles(), turnBodyToPoint(), and WM.

Referenced by Player::deMeer5(), Player::deMeer5_goalie(), interceptScoringAttempt(), kickBallCloseToBody(), Player::mainLoop(), and mark().

SoccerCommand BasicPlayer::turnBodyToPoint VecPosition    pos,
int    iCycles = 1
[protected]
 

This skill enables an agent to turn his body towards a given point. It receives a global position 'pos' on the field and returns a turn command that will turn the agent's body towards this point. To this end the agent's global position in the next cycle is predicted based on his current velocity. This is done to compensate for the fact that the remaining velocity will move the agent to another position in the next cycle. The global angle between the given position and the predicted position is then determined after which the agent's global body direction is subtracted from this angle in order to make it relative to the agent's body. Finally, the resulting angle is normalized and adjusted to compensate for the inertia moment and speed of the agent. If it is impossible to turn towards the given position in a single cycle then the agent turns as far as possible.

Parameters:
pos  position to which body should be turned
iCycles  denotes the number of cycles that are used to update the the agent position. The resulting position is compared with 'pos' to determine the desired turning angle.
Returns:
SoccerCommand turn command to turn body to the desired point

Definition at line 80 of file BasicPlayer.cpp.

References AngDeg, CMD_TURN, WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentObjectType(), WorldModel::getAgentSpeed(), WorldModel::getAngleForTurn(), VecPosition::normalizeAngle(), WorldModel::predictAgentPos(), and WM.

Referenced by collideWithBall(), Player::deMeer5(), Player::deMeer5_goalie(), directTowards(), holdBall(), intercept(), interceptClose(), interceptCloseGoalie(), mark(), moveToPosAlongLine(), Player::performPenalty(), searchBall(), turnBodyToObject(), and turnWithBallTo().

SoccerCommand BasicPlayer::turnNeckToObject ObjectT    o,
SoccerCommand    soc
[protected]
 

This skill enables an agent to turn his neck towards an object. It receives as arguments this object o as well as a primary action command 'soc' that will be executed by the agent at the end of the current cycle. Turning the neck towards an object amounts to predicting the object's global position in the next cycle and passing this predicted position together with the 'soc' command as arguments to the turnNeckToPoint skill. This low-level skill will then generate a turn neck command that causes the agent to turn his neck towards the given object. Note that the 'soc' command is supplied as an argument for predicting the agent's global position and neck angle after executing the command. This is necessary because a turn neck command can be executed in the same cycle as a kick, dash, turn , move or catch command.

Parameters:
o  object to which the agent wants to turn his neck
soc  SoccerCommand that is performed in this cycle.
Returns:
SoccerCommand that turns the neck of the agent to this object

Definition at line 487 of file BasicPlayer.cpp.

References ObjectT, WorldModel::predictPosAfterNrCycles(), turnNeckToPoint(), and WM.

Referenced by Player::deMeer5(), Player::deMeer5_goalie(), and Player::performPenalty().

SoccerCommand BasicPlayer::turnNeckToPoint VecPosition    pos,
SoccerCommand    soc
[protected]
 

This skill enables an agent to turn his neck towards a given point. It receives a global position 'pos' on the field as well as a primary action command 'soc' that will be executed by the agent at the end of the current cycle and returns a turn neck command that will turn the agent's neck towards 'pos'. To this end the agent's global position and neck direction after executing the cmd command are predicted using methods from the world model. The global angle between the given position and the predicted position is then determined after which the predicted neck direction is subtracted from this angle in order to make it relative to the agent's neck. Finally, the resulting angle is normalized and directly passed as an argument to the turn neck command since the actual angle with which a player turns his neck is by definition equal to this argument. If the resulting turn angle causes the absolute angle between the agent's neck and body to exceed the maximum value, then the agent turns his neck as far as possible. Note that it is necessary to supply the selected primary command as an argument to this skill, since a turn neck command can be executed in the same cycle as a kick, dash, turn , move or catch command.

Parameters:
pos  position to which neck should be turned
soc  SoccerCommand that is executed in the same cycle
Returns:
SoccerCommand turn command to turn neck to the desired point

Definition at line 137 of file BasicPlayer.cpp.

References AngDeg, CMD_TURNNECK, ServerSettings::getMaxNeckAng(), ServerSettings::getMinNeckAng(), VecPosition::normalizeAngle(), WorldModel::predictAgentStateAfterCommand(), SS, and WM.

Referenced by turnNeckToObject().

SoccerCommand BasicPlayer::turnWithBallTo AngDeg    ang,
AngDeg    angKickThr,
double    dFreezeThr
[protected]
 

This skill enables an agent to turn towards a global angle while keeping the ball in front of him. It is used, for example, when a defender has intercepted the ball in his defensive area and faces his own goal. In this situation the defender usually wants to pass the ball up the field into an area that is currently not visible to him and to this end he will first use this skill to turn with the ball towards the opponent's goal. Turning with the ball requires a sequence of commands to be performed. The ball first has to be kicked to a desired position relative to the agent, then it has to be stopped dead at that position and finally the agent must turn towards the ball again. Each time when this skill is called it has to be determined which part of the sequence still has to be executed. This is done as follows. If the absolute difference between the desired angle and the global angle of the ball relative to the position of the agent is larger than the value 'angKickThr' then the kickBallCloseToBody skill is used to kick the ball to a position close to the agent and at the desired angle. Otherwise, it is checked whether the ball still has speed from the previous action. If the remaining ball speed exceeds the given value 'dFreezeThr' then the ball is stopped dead at its current position using the freezeBall skill. In all other cases the agent turns his body towards the specified angle 'ang'.

Parameters:
ang  global direction in which ball and player should be faced
angKickThr  when ball angle difference is larger than this value ball is repositioned
dFreezeThr  when ball lies correct, but has speed higher than this value, ball is frozen.
Returns:
Soccercommand to turn with the ball to global angle 'ang'.

Definition at line 1298 of file BasicPlayer.cpp.

References AngDeg, collideWithBall(), freezeBall(), WorldModel::getAgentGlobalBodyAngle(), WorldModel::getAgentGlobalPosition(), WorldModel::getAgentObjectType(), WorldModel::getBallPos(), WorldModel::getBallSpeed(), WorldModel::getClosestInSetTo(), VecPosition::getDistanceTo(), WorldModel::getGlobalPosition(), ServerSettings::getMaximalKickDist(), SoccerCommand::isIllegal(), kickBallCloseToBody(), VecPosition::normalizeAngle(), OBJECT_BALL, OBJECT_ILLEGAL, OBJECT_SET_OPPONENTS, ObjectT, POLAR, WorldModel::predictAgentPosAfterCommand(), WorldModel::predictPosAfterNrCycles(), SS, turnBodyToPoint(), and WM.

Referenced by dribble(), and outplayOpponent().


Member Data Documentation

ActHandler* BasicPlayer::ACT [protected]
 

ActHandler to which commands can be sent

Definition at line 62 of file BasicPlayer.h.

Referenced by Player::deMeer5(), Player::deMeer5_goalie(), Player::executeStringCommand(), Player::mainLoop(), Player::performPenalty(), Player::Player(), and Player::sayBallStatus().

PlayerSettings* BasicPlayer::PS [protected]
 

All parameters used for the player

Definition at line 65 of file BasicPlayer.h.

Referenced by clearBall(), Player::deMeer5(), Player::deMeer5_goalie(), directPass(), dribble(), Player::executeStringCommand(), getActiveInterceptionPointBall(), getEndSpeedForPass(), getInterceptionPointBall(), getShootPositionOnLine(), interceptClose(), interceptCloseGoalie(), kickTo(), leadingPass(), outplayOpponent(), and Player::Player().

ServerSettings* BasicPlayer::SS [protected]
 

All parameters used by the server

Definition at line 64 of file BasicPlayer.h.

Referenced by accelerateBallToVelocity(), Player::amIAgentToSaySomething(), clearBall(), collideWithBall(), defendGoalLine(), Player::deMeer5(), Player::executeStringCommand(), freezeBall(), getActiveInterceptionPointBall(), getEndSpeedForPass(), getInterceptionPointBall(), holdBall(), interceptClose(), interceptCloseGoalie(), interceptScoringAttempt(), kickBallCloseToBody(), kickTo(), Player::mainLoop(), Player::performPenalty(), Player::Player(), Player::sayBallStatus(), Player::shallISaySomething(), turnNeckToPoint(), and turnWithBallTo().

WorldModel* BasicPlayer::WM [protected]
 

WorldModel that contains information of world

Definition at line 63 of file BasicPlayer.h.

Referenced by accelerateBallToVelocity(), alignNeckWithBody(), Player::amIAgentToSaySomething(), catchBall(), clearBall(), collideWithBall(), dashToPoint(), defendGoalLine(), Player::deMeer5(), Player::deMeer5_goalie(), directTowards(), dribble(), Player::executeStringCommand(), freezeBall(), getActiveInterceptionPointBall(), Player::getDeadBallPosition(), getDribblePoint(), getEndSpeedForPass(), getInterceptionPointBall(), getMarkingPosition(), getShootPositionOnLine(), getThroughPassShootingPoint(), holdBall(), intercept(), interceptClose(), interceptCloseGoalie(), interceptScoringAttempt(), kickBallCloseToBody(), kickTo(), leadingPass(), Player::mainLoop(), Player::makeBallInfo(), mark(), moveToPos(), moveToPosAlongLine(), outplayOpponent(), Player::performPenalty(), Player::Player(), Player::sayBallStatus(), Player::sayOppAttackerStatus(), searchBall(), Player::shallISaySomething(), turnBackToPoint(), turnBodyToObject(), turnBodyToPoint(), turnNeckToObject(), turnNeckToPoint(), and turnWithBallTo().


The documentation for this class was generated from the following files:
Generated on Fri Nov 7 11:46:01 2003 for UvA Trilearn 2003 Base Code by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001