Inheritance diagram for RS::AmIFirstToBall:
Public Member Functions
|AmIFirstToBall (bool includeTeammates=true, float assumeSpeed=5)|
|Create a predicate with default behavior.|
|AmIFirstToBall (const AmIFirstToBall &obj)|
|Creates a predicate that is an exact copy of obj. |
|Destroys the predicate.|
|AmIFirstToBall &||operator= (const AmIFirstToBall &obj)|
|Assignment operator. |
|virtual FuzzyBool||operator() ()|
|Function application operator. |
|virtual FuzzyBool||evaluate ()|
|Should return the truth value of the predicate.|
Protected Member Functions
|virtual void||update (const UInt32 update_number)|
|The update function, should be used to update the value of the predicate if necessary. |
Including opponents only or all visible players in the test is optional. For now, it assumes that all players will keep their speed towards the ball. (The projection of the speed vector on the line towards the ball) It doesn't yet take the ball speed into account.
We will implement another model that doesn't rely that much on the magnitude of speed vector later.
It will calculate the time towards the ball with the function t = (distance to ball)/ (K1 + Project(SpeedVector(Ball) on Vector(Ball to Player)) * S) where K1 is a speed that all players are assumed to have and S is a function that is 1 for all players but the Agent, for which it is dependent on the current stamina level and distance to the ball.
Definition at line 96 of file AmIFirstToBall.h.
Assigns obj to this predicate.
Function application operator.
Will call evaluate().
Reimplemented from RS::Predicate.
The update function, should be used to update the value of the predicate if necessary.
The method needUpdate(const UInt32 update_number) can be used to check if the predicate needs to be updated based on the last update number it was updated for.