|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.pogamut.Client.Agent
cz.cuni.pogamut.Client.TestBot
public class TestBot
Good old Kheppera robots, who doesn't know them? Well this bot doesn't look like the Kheppera at all and certainly doesn't have all the sensors the Kheppera has. But it resembles it somehow. This bot doesn't use the information about the navigation points that is provided by the UT2004 and GB2004 rather it uses the AutoTrace feature of the GB2004 and walks according them.
Field Summary | |
---|---|
int |
bigTurn
Big rotation (degrees). |
(package private) boolean |
first
|
static int |
FRONT_SENSOR
|
static int |
LEFT_SENSOR
|
float |
moveSpeed
How fast should we move? |
boolean |
moving
Whether the bot is moving. |
static int |
RIGHT_SENSOR
|
boolean |
sensor
Whether any of the sensor signalize the collision. |
static double |
SENSOR_LENGTH
|
boolean |
sensorFront
Whether the front sensor signalize the collision. |
boolean |
sensorLeft
Whether the left sensor signalize the collision. |
boolean |
sensorRight
Whether the right sensor signalize the collision. |
int |
smallTurn
Small rotation (degrees). |
(package private) boolean |
traceRun
|
(package private) java.util.ArrayList<AutoTraceRay> |
traces
|
int |
turnSleep
How much time should we wait for the rotation to finish (milliseconds). |
Fields inherited from class cz.cuni.pogamut.Client.Agent |
---|
bindedParserType, body, flagLogicTemporalyStopped, gameBotConnection, gameMap, GARBAGE_COLLECTOR_FREQUENCY, instancesAlive, iterationEndListeners, log, logicFrequency, logicFrequencyChanged, memory, oldLogicFrequency, parserLogger, pauseHolders, platformLog, random, rawGBLog |
Constructor Summary | |
---|---|
TestBot()
Creates a new instance of agent. |
Method Summary | |
---|---|
protected void |
doLogic()
There you are supposed to connect any external tool for decision making or you can write there some script, that will control the agent. |
static void |
main(java.lang.String[] args)
NOTE: this method MUST REMAIN DEFINED + MUST REMAIN EMPTY, due to technical reasons. |
protected void |
postPrepareAgent()
prepare logic according to information from gathered from startCommunication like choosing plan/parameters according to game type note that you still can't send any messages to gamebots (like CONF etc.) |
protected void |
prePrepareAgent()
prepares agent logic to run - like initializing neural networks etc. |
protected void |
shutdownAgent()
clean - up after the end of simulation of agent |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LEFT_SENSOR
public static final int FRONT_SENSOR
public static final int RIGHT_SENSOR
public static final double SENSOR_LENGTH
public boolean sensorLeft
public boolean sensorRight
public boolean sensorFront
public boolean moving
public boolean sensor
public int turnSleep
public float moveSpeed
public int smallTurn
public int bigTurn
boolean traceRun
java.util.ArrayList<AutoTraceRay> traces
boolean first
Constructor Detail |
---|
public TestBot()
Method Detail |
---|
protected void doLogic()
Agent
Note: it's not good practice to have infinite loop in doLogic() because stopAgentSoft() won't work. But it's OK if you rewrite the stopAgentSoft()
doLogic
in class Agent
protected void prePrepareAgent() throws PogamutException
Agent
prePrepareAgent
in class Agent
PogamutException
protected void postPrepareAgent() throws PogamutException
Agent
postPrepareAgent
in class Agent
PogamutException
protected void shutdownAgent() throws PogamutException
Agent
shutdownAgent
in class Agent
PogamutException
public static void main(java.lang.String[] args) throws java.net.URISyntaxException
java.net.URISyntaxException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |