public class PacPercept extends Percept
Modifier and Type | Field and Description |
---|---|
protected boolean |
bump |
static double |
DESTINATION_NOISE |
protected VisiblePackage |
heldPackage |
static double |
LOCATION_NOISE |
protected java.lang.String[] |
messages |
static double |
PHANTOM_PACKAGE_NOISE |
static int |
VIS_RADIUS |
protected java.util.ArrayList<VisibleAgent> |
visAgents |
protected java.util.ArrayList<VisiblePackage> |
visPackages |
protected int |
worldSize |
Constructor and Description |
---|
PacPercept(PackageState state,
Agent agent)
Construct a package delivery world percept.
|
Modifier and Type | Method and Description |
---|---|
boolean |
feelBump()
Returns true if the percept reflects that the agent bumped into
an obstacle as a result of its most recent action.
|
VisiblePackage |
getHeldPackage()
Returns the visible package that the agent is currently holding.
|
java.lang.String[] |
getMessages()
Returns an array of strings representing messages sent since the
agent's last turn.
|
VisibleAgent[] |
getVisAgents()
Returns an array of the visible agents.
|
VisiblePackage[] |
getVisPackages()
Return an array of the visible packages.
|
int |
getWorldSize()
Returns the length of the world.
|
protected boolean |
inRange(int ax,
int ay,
int tx,
int ty) |
void |
printPercept() |
protected boolean bump
protected java.util.ArrayList<VisibleAgent> visAgents
protected java.util.ArrayList<VisiblePackage> visPackages
protected java.lang.String[] messages
protected VisiblePackage heldPackage
protected int worldSize
public static final int VIS_RADIUS
public static double LOCATION_NOISE
public static double PHANTOM_PACKAGE_NOISE
public static double DESTINATION_NOISE
public PacPercept(PackageState state, Agent agent)
public boolean feelBump()
public int getWorldSize()
public VisibleAgent[] getVisAgents()
public VisiblePackage[] getVisPackages()
public java.lang.String[] getMessages()
public VisiblePackage getHeldPackage()
public void printPercept()
protected boolean inRange(int ax, int ay, int tx, int ty)