Collaboration diagram for RS::WorldModel:

Public Member Functions | |
| WorldModel () | |
| Default constructor. | |
| virtual | ~WorldModel () |
| Destructor. | |
| WorldModel (const WorldModel &wm) | |
| CopyConstructor. | |
| WorldModel & | operator= (const WorldModel &wm) |
| assignment operator | |
| void | addOpponent (const PlayerObject &opponent) |
| Add an opponent to the agents world model. | |
| const std::vector< PlayerObject > & | getOpponents () const |
| Returns the opponents the agent knows about. | |
| const PlayerObject & | getOpponentClosestToAgent () const |
| Returns the opponent closest to the agent. | |
| const PlayerObject & | getOpponentClosestToBall () const |
| Returns the opponent closest to the ball. | |
| void | setOpponentClosestToAgent (PlayerObject *player) |
| Set the teammate closest to the agent. | |
| void | setOpponentClosestToBall (PlayerObject *player) |
| Set the teammate closest to the ball. | |
| std::vector< PlayerObject > & | getOpponents () |
| Returns the opponets to the Strategies. | |
| void | clearOpponents () |
| Clear all the opponents from the world model. | |
| void | addTeammate (const PlayerObject &teammates) |
| Add a teammate to the agents world model. | |
| const std::vector< PlayerObject > & | getTeammates () const |
| Returns the teammates the agent knows about. | |
| const PlayerObject & | getTeammateClosestToAgent () const |
| Returns the opponent closest to the agent. | |
| const PlayerObject & | getTeammateClosestToBall () const |
| Returns the observed teammate which is closest to the ball. | |
| const PlayerObject & | getTeammateIncludingAgentClosestToBall () const |
| Returns the teammate, including the agent, which is closest to the ball. | |
| void | setTeammateClosestToBall (PlayerObject *player) |
| Set the teammate closest to the ball. | |
| void | setTeammateClosestToAgent (PlayerObject *player) |
| Set the teammate closest to the agent. | |
| std::vector< PlayerObject > & | getTeammates () |
| Returns the teammates to the Strategies. | |
| void | clearTeammates () |
| Clear all the teammates from the world model. | |
| void | addUnknown (const PlayerObject &unknown) |
| Add a unknown player to the world model. | |
| const std::vector< PlayerObject > & | getUnknowns () const |
| Returns the unknown players. | |
| std::vector< PlayerObject > & | getUnknowns () |
| Returns the unknown players to the strategies. | |
| void | clearUnknowns () |
| Clear all the unknown player from the world model. | |
| void | setBall (const BallObject &ball) |
| Set the ball in the world model. | |
| const BallObject & | getBall () const |
| Returns the ball from the agents world model. | |
| BallObject & | getBall () |
| Returns the ball to a Strategy. | |
| void | setAgent (const AgentObject &agent) |
| Set the agents information about itself. | |
| const AgentObject & | getAgent () const |
| Get the agents model of itself. | |
| AgentObject & | getAgent () |
| Returns the agent object to a Strategy. | |
| void | addPlayMode (const PlayMode &playMode) |
| Add a playmode for the current world model. | |
| const std::vector< PlayMode > & | getPlayModes () const |
| Returns the playmodes for the current world model. | |
| std::vector< PlayMode > & | getPlayModes () |
| Returns the playmodes to a Strategy. | |
| void | clearPlayModes () |
| Clear all but the last playmodes. | |
| const PlayMode | getLastPlayMode () const |
| Returns the last playmode in the worldmodel. | |
| const Time & | getGameTime () const |
| Return the current world models game time. | |
| void | setGameTime (Time time) |
| const TimeUnknown & | getLastSeeTime () const |
| Return the time for last visual information. | |
| void | setLastSeeTime (Time time) |
| const TimeUnknown & | getNextSeeTime () const |
| Return the time for the next visual information. | |
| void | setNextSeeTime (const TimeUnknown &time) |
| const TimeUnknown & | getNextNextSeeTime () const |
| Return the time for the second next visual information. | |
| void | setNextNextSeeTime (const TimeUnknown &time) |
| void | addCommand (const ServerCommand *cmd) |
| const std::list< const ServerCommand * > & | getCommands () const |
Protected Attributes | |
| std::vector< PlayMode > | playModes |
| Representation of the playmodes. | |
| BallObject | ball |
| The model of the ball. | |
| AgentObject | agent |
| The model of the agent itself. | |
| std::vector< PlayerObject > | opponents |
| The models of the opponents. | |
| PlayerObject * | closestOpponent |
| The opponent closest to the player. | |
| PlayerObject * | closestOpponentToBall |
| The opponent closest to the ball. | |
| std::vector< PlayerObject > | teammates |
| The models of the teammates. | |
| PlayerObject * | closestTeammate |
| The opponent closest to the player. | |
| PlayerObject * | closestTeammateToBall |
| The opponent closest to the ball. | |
| std::vector< PlayerObject > | unknowns |
| The models of the unknown players. | |
| std::string | ownMessage |
| Last heard message from ourself. | |
| std::string | playerMessage |
| Last heard message from another player. | |
| std::string | coachMessage |
| Last heard message from the coach. | |
| Time | gameTime |
| Represent the game time in the current world model. | |
| TimeUnknown | lastSeeTime |
| Representation of the time we last saw something. | |
| TimeUnknown | nextSeeTime |
| The next cycle we should see something. | |
| TimeUnknown | nextNextSeeTime |
| The second next cycle we should see something. | |
| PlayerObject | emptyPlayer |
| A Unknown player for return values. | |
| std::list< const ServerCommand * > | commands |
| A list of the executed commands this cycle. | |
The class contains fundamental information about the agents belives of the world. The agents position and speed, where the teammates and opponents are, the current playmode, and the speed and position of the ball are examples of information in the agens world model. The Worldmodel is stored in a history in WorldModelInterface and updated by the agenst Strategies.
Document interaction with Views.
Is the const/nonconst methods necessary.
Definition at line 100 of file WorldModel.h.
|
|
Returns the opponent closest to the agent. * If we don't known anything at all about any opponent. A PlayerObject with all values unknown will be returned. Definition at line 192 of file WorldModel.cc. References closestOpponent, and emptyPlayer. Referenced by RS::PlayerView::getOpponentClosestToAgent(). |
|
|
Returns the opponent closest to the ball. If we don't known anything at all about any opponent. A PlayerObject with all values unknown will be returned. Definition at line 198 of file WorldModel.cc. References closestOpponentToBall, and emptyPlayer. Referenced by RS::PlayerView::getOpponentClosestToBall(). |
|
|
Returns the opponent closest to the agent. If no teammate is seen then a PlayerObject with all values unknown will be returned. Definition at line 228 of file WorldModel.cc. References closestTeammate, and emptyPlayer. Referenced by RS::PlayerView::getTeammateClosestToAgent(). |
|
|
Returns the observed teammate which is closest to the ball. The agent itself is not included. If no teammate is seen then a PlayerObject with all values unknown will be returned. Definition at line 234 of file WorldModel.cc. References closestTeammateToBall, and emptyPlayer. Referenced by RS::PlayerView::getTeammateClosestToBall(), and getTeammateIncludingAgentClosestToBall(). |
|
|
Returns the teammate, including the agent, which is closest to the ball. If no teammates are seen then the closest teammate will be the agent itself. Definition at line 240 of file WorldModel.cc. References agent, getAgent(), getBall(), RS::MobileObject::getPosition(), and getTeammateClosestToBall(). Referenced by RS::PlayerView::getTeammateIncludingAgentClosestToBall(). |
1.3-rc3