|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.simbrain.world.odorworld.AbstractEntity
org.simbrain.world.odorworld.OdorWorldEntity
org.simbrain.world.odorworld.OdorWorldAgent
public class OdorWorldAgent
Agent represents in a creature in the world which can react to stimuli and move. Agents are controlled by neural networks, in particular their input and output nodes.
| Field Summary |
|---|
| Fields inherited from class org.simbrain.world.odorworld.OdorWorldEntity |
|---|
IMAGENAMES |
| Constructor Summary | |
|---|---|
OdorWorldAgent()
Default constructor. |
|
OdorWorldAgent(OdorWorld wr,
String nm,
String type,
int x,
int y,
double ori)
Creates an instance of an agent. |
|
| Method Summary | |
|---|---|
void |
completedInputRound()
Complicated input round. |
Point |
getLeftWhisker()
|
double |
getMovementIncrement()
|
double |
getOrientation()
|
double |
getOrientationRad()
|
World |
getParentWorld()
Return the parent world for this agent. |
Point |
getRightWhisker()
|
double |
getStimulus(String[] sensorID)
Get the stimulus associated with the a given sensory id. |
double |
getTurnIncrement()
|
double |
getWhiskerAngle()
|
double |
getWhiskerLength()
|
void |
goStraightBackward(double value)
Moves agent backward. |
void |
goStraightForward(double value)
Moves agent forward. |
void |
setMotorCommand(String[] commandList,
double value)
Actiate a motor command on this agent. |
void |
setMovementIncrement(double straightFactor)
|
void |
setOrientation(double d)
Set the orienation of the creature. |
void |
setTurnIncrement(double turnFactor)
|
void |
setWhiskerAngle(double whiskerAngle)
|
void |
setWhiskerLength(double whiskerLength)
|
void |
turnLeft(double value)
Turn agent left. |
void |
turnRight(double value)
Turn agent to the right. |
protected boolean |
validMove(Point possibleCreatureLocation)
Check to see if the creature can move to a given new location. |
void |
wrapAround()
Implements a "video-game" world or torus, such that when an object leaves on side of the screen it reappears on the other. |
| Methods inherited from class org.simbrain.world.odorworld.OdorWorldEntity |
|---|
getBites, getBitesToDie, getEdible, getHeight, getImageName, getImageNameIndex, getImageNames, getLocation, getName, getParent, getRectangle, getRectangle, getResurrectionProb, getStimulus, getTheImage, getWidth, getX, getY, imagesRenderer, moveTo, paintThis, reset, setBites, setBitesToDie, setEdible, setImageName, setLocation, setName, setParent, setResurrectionProb, setStimulus, setTheImage, setX, setY, terminate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.simbrain.world.Agent |
|---|
getName |
| Constructor Detail |
|---|
public OdorWorldAgent()
public OdorWorldAgent(OdorWorld wr,
String nm,
String type,
int x,
int y,
double ori)
wr - Odor world to place agentnm - Name of agenttype - Type of agentx - Positiony - Positionori - Orientation| Method Detail |
|---|
public double getOrientation()
public double getOrientationRad()
public void setOrientation(double d)
d - the orientation, in degreespublic Point getLeftWhisker()
public Point getRightWhisker()
public void turnRight(double value)
value - Amount to turn agentpublic void turnLeft(double value)
value - Amount to turn agentpublic void goStraightForward(double value)
value - Amount to move agentpublic void goStraightBackward(double value)
value - Amount to move agentprotected boolean validMove(Point possibleCreatureLocation)
possibleCreatureLocation - on-screen location to be checked
public void wrapAround()
public void setMotorCommand(String[] commandList,
double value)
setMotorCommand in interface AgentcommandList - the command itselfvalue - the activation level of the output neuron which produced this commandpublic double getStimulus(String[] sensorID)
getStimulus in interface AgentsensorID - the string representing the id
public double getMovementIncrement()
public void setMovementIncrement(double straightFactor)
straightFactor - The straight_factor to set.public double getTurnIncrement()
public void setTurnIncrement(double turnFactor)
turnFactor - The turnFactor to set.public double getWhiskerAngle()
public void setWhiskerAngle(double whiskerAngle)
whiskerAngle - The whiskerAngle to set.public double getWhiskerLength()
public void setWhiskerLength(double whiskerLength)
whiskerLength - The whiskerLength to set.public World getParentWorld()
Agent
getParentWorld in interface Agentpublic void completedInputRound()
completedInputRound in interface Agent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||