public class EnvironmentModel
extends java.lang.Object
Constructor and Description |
---|
EnvironmentModel(java.util.List<Percept> percepts,
java.util.List<Command> commands) |
Modifier and Type | Method and Description |
---|---|
boolean |
agentHasBall()
Figure out if this agent currently has possession of the ball
Currently based on distance to the ball, ideally should change to last touch.
|
boolean |
agentInMovementArea() |
boolean |
ballInMovementRange()
Test whether the ball is within the agent's movement range.
|
double |
getAgentAbsAngleRadians() |
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
getAgentLocation() |
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
getAgentToGoal() |
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
getAgentVelocityVector() |
double |
getBallAngle() |
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
getBallLocation() |
java.util.List<Command> |
getCommands() |
java.util.HashMap<java.lang.Integer,org.apache.commons.math3.geometry.euclidean.twod.Vector2D> |
getFriendlyPlayerLocations() |
double |
getGoalAngle() |
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
getGoalLocation() |
HomeArea |
getHomeArea() |
Percept |
getLastPercept() |
static org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
getLocationFromRelativeInfo(org.apache.commons.math3.geometry.euclidean.twod.Vector2D relativeOrigin,
double absAngle,
double distance)
Static method used to build a 2D location vector from direction and angle relative to some specified point
|
MovementArea |
getMovementArea() |
java.util.HashMap<java.lang.Integer,org.apache.commons.math3.geometry.euclidean.twod.Vector2D> |
getOpposingPlayerLocations() |
org.apache.commons.math3.geometry.euclidean.twod.Vector2D |
getOwnGoalLocation() |
java.util.List<Percept> |
getPercepts() |
com.github.robocup_atan.atan.model.enums.PlayMode |
getPlayMode() |
boolean |
hasAgentAbsAngle() |
boolean |
hasAgentLocation() |
boolean |
isPlayerGoalKeeper() |
void |
setAgentAbsAngleRadians(double agentAbsAngel) |
void |
setAgentLocation(org.apache.commons.math3.geometry.euclidean.twod.Vector2D agentLocation) |
void |
setAgentToGoal(org.apache.commons.math3.geometry.euclidean.twod.Vector2D agentToGoal) |
void |
setAgentVelocityVector(org.apache.commons.math3.geometry.euclidean.twod.Vector2D agentVelocityVector) |
void |
setBallAngle(double ballAngle) |
void |
setBallLocation(org.apache.commons.math3.geometry.euclidean.twod.Vector2D ballLocation) |
void |
setFriendlyPlayerLocations(java.util.HashMap<java.lang.Integer,org.apache.commons.math3.geometry.euclidean.twod.Vector2D> friendlyPlayerLocations) |
void |
setGoalAngle(double goalAngle) |
void |
setGoalLocation(org.apache.commons.math3.geometry.euclidean.twod.Vector2D goalLocation) |
void |
setHasAgentAbsAngle() |
void |
setHomeArea(HomeArea homeArea) |
void |
setMovementArea(MovementArea movementArea) |
void |
setOpposingPlayerLocations(java.util.HashMap<java.lang.Integer,org.apache.commons.math3.geometry.euclidean.twod.Vector2D> opposingPlayerLocations) |
void |
setOwnGoalLocation(org.apache.commons.math3.geometry.euclidean.twod.Vector2D ownGoalLocation) |
void |
setPlayMode(com.github.robocup_atan.atan.model.enums.PlayMode playMode) |
boolean |
teamHasBall()
Figure out whether this agent's team is currently in possession of the ball.
|
public static org.apache.commons.math3.geometry.euclidean.twod.Vector2D getLocationFromRelativeInfo(org.apache.commons.math3.geometry.euclidean.twod.Vector2D relativeOrigin, double absAngle, double distance)
relativeOrigin
- The point which the distance and angle are relative toabsAngle
- The direction in radians to the other objectdistance
- The distance to the other objectpublic boolean teamHasBall()
public boolean agentHasBall()
public boolean ballInMovementRange()
public boolean hasAgentAbsAngle()
public void setHasAgentAbsAngle()
public java.util.List<Percept> getPercepts()
public org.apache.commons.math3.geometry.euclidean.twod.Vector2D getAgentLocation()
public void setAgentLocation(org.apache.commons.math3.geometry.euclidean.twod.Vector2D agentLocation)
public HomeArea getHomeArea()
public void setHomeArea(HomeArea homeArea)
public boolean hasAgentLocation()
public double getAgentAbsAngleRadians()
public void setAgentAbsAngleRadians(double agentAbsAngel)
public Percept getLastPercept()
public void setMovementArea(MovementArea movementArea)
public MovementArea getMovementArea()
public void setBallLocation(org.apache.commons.math3.geometry.euclidean.twod.Vector2D ballLocation)
public org.apache.commons.math3.geometry.euclidean.twod.Vector2D getBallLocation()
public java.util.List<Command> getCommands()
public void setAgentVelocityVector(org.apache.commons.math3.geometry.euclidean.twod.Vector2D agentVelocityVector)
public org.apache.commons.math3.geometry.euclidean.twod.Vector2D getAgentVelocityVector()
public void setOpposingPlayerLocations(java.util.HashMap<java.lang.Integer,org.apache.commons.math3.geometry.euclidean.twod.Vector2D> opposingPlayerLocations)
public java.util.HashMap<java.lang.Integer,org.apache.commons.math3.geometry.euclidean.twod.Vector2D> getOpposingPlayerLocations()
public void setFriendlyPlayerLocations(java.util.HashMap<java.lang.Integer,org.apache.commons.math3.geometry.euclidean.twod.Vector2D> friendlyPlayerLocations)
public java.util.HashMap<java.lang.Integer,org.apache.commons.math3.geometry.euclidean.twod.Vector2D> getFriendlyPlayerLocations()
public void setGoalAngle(double goalAngle)
public double getGoalAngle()
public void setGoalLocation(org.apache.commons.math3.geometry.euclidean.twod.Vector2D goalLocation)
public org.apache.commons.math3.geometry.euclidean.twod.Vector2D getGoalLocation()
public void setAgentToGoal(org.apache.commons.math3.geometry.euclidean.twod.Vector2D agentToGoal)
public org.apache.commons.math3.geometry.euclidean.twod.Vector2D getAgentToGoal()
public void setBallAngle(double ballAngle)
public double getBallAngle()
public boolean agentInMovementArea()
public void setOwnGoalLocation(org.apache.commons.math3.geometry.euclidean.twod.Vector2D ownGoalLocation)
public org.apache.commons.math3.geometry.euclidean.twod.Vector2D getOwnGoalLocation()
public void setPlayMode(com.github.robocup_atan.atan.model.enums.PlayMode playMode)
public com.github.robocup_atan.atan.model.enums.PlayMode getPlayMode()
public boolean isPlayerGoalKeeper()