#include <BasicPlayer.h>
Inheritance diagram for BasicPlayer:
Definition at line 59 of file BasicPlayer.h.
|
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).
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(). |
|
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.
Definition at line 57 of file BasicPlayer.cpp. References CMD_TURNNECK, WorldModel::getAgentBodyAngleRelToNeck(), and WM. Referenced by Player::deMeer5(), and Player::deMeer5_goalie(). |
|
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.
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(). |
|
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:
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. |
|
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(). |
|
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.
Definition at line 424 of file BasicPlayer.cpp. References CMD_SAY. |
|
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.
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(). |
|
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.
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. |
|
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.
Definition at line 1603 of file BasicPlayer.cpp. References CMD_ILLEGAL, PlayerSettings::getFastPassEndSpeed(), PlayerSettings::getPassEndSpeed(), kickTo(), PASS_FAST, PASS_NORMAL, PassT, and PS. |
|
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(). |
|
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:
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. |
|
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.
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(). |
|
|
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. |
|
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].
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(). |
|
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.
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(). |
|
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:
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(). |
|
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'.
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(). |
|
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.
Definition at line 2297 of file BasicPlayer.cpp. References AngDeg, WorldModel::getGlobalPosition(), getShootPositionOnLine(), ObjectT, and WM. Referenced by throughPass(). |
|
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. |
|
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'.
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(). |
|
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.
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(). |
|
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.
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(). |
|
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.
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. |
|
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.
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(). |
|
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.
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(). |
|
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.
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. |
|
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. |
|
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:
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(). |
|
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'.
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(). |
|
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.
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(). |
|
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:
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. |
|
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.
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(). |
|
This method returns the command to tackle the ball. Definition at line 452 of file BasicPlayer.cpp. References CMD_TACKLE. |
|
This method returns a 'move' command to teleport the agent directly to the specified global position.
Definition at line 433 of file BasicPlayer.cpp. References CMD_MOVE, VecPosition::getX(), and VecPosition::getY(). Referenced by Player::deMeer5(), and Player::deMeer5_goalie(). |
|
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.
Definition at line 1667 of file BasicPlayer.cpp. References AngDeg, getEndSpeedForPass(), getThroughPassShootingPoint(), kickTo(), and ObjectT. |
|
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.
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(). |
|
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.
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(). |
|
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.
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(). |
|
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.
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(). |
|
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.
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(). |
|
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'.
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(). |
|
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(). |
|
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(). |
|
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 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(). |