|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.network.DefaultNode
uchicago.src.sim.network.DefaultDrawableNode
uchicago.src.repastdemos.neural.Employee
public class Employee
This class represents the agents who are to perform an action for the Boss. The agent learns to perform the correct action by training a neural network based on the commands received, and whether they were scolded for the action they did perform, or praised.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class uchicago.src.sim.network.DefaultNode |
|---|
DefaultNode.OrderedHashMap |
| Field Summary | |
|---|---|
static int |
BOSS_A
|
static int |
BOSS_B
|
protected org.joone.io.MemoryInputSynapse |
desiredNetworkOutput
This is used to store the output that we want to train the network towards |
static int |
DO_NOTHING
|
static int |
DO_SOMETHING
|
protected org.joone.engine.DirectSynapse |
inputForRetrieval
This is the input synapse used to grab information from the network. |
protected org.joone.io.MemoryInputSynapse |
inputForTraining
This is used to store the input that results in the desired output |
protected RepastNeuralWrapper |
net
This is the neural network used by this employee |
| Fields inherited from class uchicago.src.sim.network.DefaultDrawableNode |
|---|
item |
| Fields inherited from class uchicago.src.sim.network.DefaultNode |
|---|
inEdges, inMap, label, outEdges, outMap |
| Constructor Summary | |
|---|---|
Employee()
|
|
Employee(double x,
double y)
|
|
| Method Summary | |
|---|---|
protected void |
doNothing()
|
protected void |
doSomething()
|
void |
draw(SimGraphics g)
Draws this Drawable2DGridNode. |
double |
getActionPerformed()
|
double[] |
getCommands()
|
double |
getError()
|
void |
postStep()
normally the method for swapping in new public data and otherwise handling the results/cleanup of a step |
void |
praise(Boss boss)
|
void |
preStep()
normally the method for setting up an agent for the next step |
void |
receiveCommand(int bossID,
int command)
|
static void |
resetIndices()
|
void |
scold(Boss boss)
|
void |
step()
normally the method that performs the actual actions of a step |
| Methods inherited from class uchicago.src.sim.network.DefaultDrawableNode |
|---|
allowResizing, calcSize, contains, getBorderColor, getBorderWidth, getColor, getFont, getHeight, getLabelColor, getNode, getWidth, getX, getY, setBorderColor, setBorderWidth, setColor, setDrawable, setDrawableNoCopy, setFont, setHeight, setLabelColor, setNodeLabel, setWidth, setX, setX, setY, setY |
| Methods inherited from class uchicago.src.sim.network.DefaultNode |
|---|
addInEdge, addInEdges, addOutEdge, addOutEdges, clearInEdges, clearOutEdges, getEdgesFrom, getEdgesTo, getFromNodes, getId, getInDegree, getInEdges, getInNodes, getNodeLabel, getNumInEdges, getNumOutEdges, getOutDegree, getOutEdges, getOutNodes, getRandomFromNode, getRandomNodeIn, getRandomNodeOut, getRandomToNode, getToNodes, hasEdgeFrom, hasEdgeTo, hasEdgeToOrFrom, makeRandomInEdge, makeRandomOutEdge, removeEdgesFrom, removeEdgesTo, removeInEdge, removeOutEdge |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface uchicago.src.sim.gui.DrawableNonGridNode |
|---|
getOutEdges |
| Methods inherited from interface uchicago.src.sim.gui.Drawable2DGridNode |
|---|
getOutEdges |
| Field Detail |
|---|
public static final int DO_NOTHING
public static final int DO_SOMETHING
public static final int BOSS_A
public static final int BOSS_B
protected RepastNeuralWrapper net
protected org.joone.io.MemoryInputSynapse desiredNetworkOutput
protected org.joone.io.MemoryInputSynapse inputForTraining
protected org.joone.engine.DirectSynapse inputForRetrieval
| Constructor Detail |
|---|
public Employee(double x,
double y)
throws RepastException
RepastException
public Employee()
throws RepastException
RepastException| Method Detail |
|---|
public static void resetIndices()
public void preStep()
throws NeuralException
AutoStepable
preStep in interface AutoStepableNeuralException
public void step()
throws NeuralException
AutoStepable
step in interface AutoStepableNeuralExceptionpublic void postStep()
AutoStepable
postStep in interface AutoStepablepublic void draw(SimGraphics g)
Drawable2DGridNode
draw in interface Drawable2DGridNodedraw in interface NonGridDrawabledraw in class DefaultDrawableNodeg - the SimGraphics object used for drawingpublic void scold(Boss boss)
public void praise(Boss boss)
public void receiveCommand(int bossID,
int command)
protected void doNothing()
protected void doSomething()
public double getActionPerformed()
public double[] getCommands()
public double getError()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||