Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
A
B
C
D
E
F
G
H
I
L
M
N
O
P
R
S
T
U
V
X
Y
A
Action
- class edu.sc.ants.
Action
.
An action taken by an agent
Action(String)
- Constructor for class edu.sc.ants.
Action
Action constructor.
Action(String, double)
- Constructor for class edu.sc.ants.
Action
Action constructor.
addAgent(Environment, int, int, double, String)
- Method in class edu.sc.ants.
Environment.RunningThingContainer
Create a new agent and add it to the environment
addAgent(int)
- Method in class edu.sc.ants.
Follower.BlackList
Adds agent to the list.
addMessage(Message)
- Method in class edu.sc.ants.
Environment.RunningThing
Appends the given message to the mailbox
addObservation(Observation, int)
- Method in class edu.sc.ants.
Map
Add an observation to the map.
Agent
- class edu.sc.ants.
Agent
.
An Agent is a Thing that can take action.
Agent(int, Environment, String, double, double, double, String)
- Constructor for class edu.sc.ants.
Agent
A constructor.
agentID
- Variable in class edu.sc.ants.
Observation
The Thing's ID.
animationPanel
- Variable in class edu.sc.ants.
Ants
animator
- Variable in class edu.sc.ants.
Environment
the thread
Ants
- class edu.sc.ants.
Ants
.
The applet.
Ants()
- Constructor for class edu.sc.ants.
Ants
B
blackList
- Variable in class edu.sc.ants.
Follower
The blacklist
bufferSize
- Variable in class edu.sc.ants.
Environment.RunningThing
C
certainty
- Variable in class edu.sc.ants.
Observation
How certain are we that this observation is true? Values between 0 and 1
createAndAddAgent(String)
- Method in class edu.sc.ants.
Environment
Randomly generates a thing (in this case, an agent) of the given type it to the environment
currentID
- Variable in class edu.sc.ants.
Environment.RunningThingContainer
Each agent gets a currentID taken from this variable.
currentTarget
- Variable in class edu.sc.ants.
Follower
ID of the agent I am currently following.
D
deleteAgent()
- Method in class edu.sc.ants.
Environment
Deletes the thing that was last picked
deleteAgent(int)
- Method in class edu.sc.ants.
Environment.RunningThingContainer
Delete an agent with the given ID.
deleteAgent(String)
- Method in class edu.sc.ants.
Environment.RunningThingContainer
Delete the agent that was last picked.
die()
- Method in class edu.sc.ants.
Environment
Is this ever called?
distance
- Variable in class edu.sc.ants.
Message
If the message is a "bid" then the distance is like the bid amount or utility the receiver expects.
draw(Graphics)
- Method in class edu.sc.ants.
Thing
I draw myself, where I
think
I am.
draw(Graphics, double, double, double)
- Method in class edu.sc.ants.
EnemyAgent
draw(Graphics, double, double, double)
- Method in class edu.sc.ants.
Follower
Draw myself
draw(Graphics, double, double, double)
- Method in class edu.sc.ants.
GoodAgent
draw(Graphics, double, double, double)
- Method in class edu.sc.ants.
Target
Draw myself the color red.
draw(Graphics, double, double, double)
- Method in class edu.sc.ants.
Thing
I draw myself on g, using the given coordinates.
drawInfo(Graphics)
- Method in class edu.sc.ants.
Agent
Draws lines from where I think I am to where I think everyone else is.
E
EnemyAgent
- class edu.sc.ants.
EnemyAgent
.
Bad guys move around randomly and do
not
engage in the broadcasting of observations (why help the enemy?)
EnemyAgent(int, Environment, String, double, double, double, String)
- Constructor for class edu.sc.ants.
EnemyAgent
env
- Variable in class edu.sc.ants.
Thing
my pointer to the enviroment Im in.
Environment
- class edu.sc.ants.
Environment
.
The Environment holds a vector of Thread, each represents a Thing that is running in the world.
Environment.RunningThing
- class edu.sc.ants.
Environment.RunningThing
.
This class embodies one running thing (i.e.
Environment.RunningThing(Environment, Thing)
- Constructor for class edu.sc.ants.
Environment.RunningThing
Add a new thing.
Environment.RunningThingContainer
- class edu.sc.ants.
Environment.RunningThingContainer
.
Contains all the running things (i.e.
Environment.RunningThingContainer(Environment)
- Constructor for class edu.sc.ants.
Environment.RunningThingContainer
Environment()
- Constructor for class edu.sc.ants.
Environment
expireObservations()
- Method in class edu.sc.ants.
Thing
Expires old observations, older than myExpireWait.
expireOld(long)
- Method in class edu.sc.ants.
Follower.BlackList
Expire entries that are older than miliseconds.
expiresAt
- Variable in class edu.sc.ants.
Message
Time at which the message is supposed to expire
F
fixCoords(Observation)
- Method in class edu.sc.ants.
Environment
If the coordinates are out of bounds, set them back within bounds.
fixed
- Variable in class edu.sc.ants.
Thing
true if I am being handled by user.
Follower
- class edu.sc.ants.
Follower
.
Follows Target agents around using a negotiation protocols to make sure that no more than n Followers are following any given Target agent.
Follower.BlackList
- class edu.sc.ants.
Follower.BlackList
.
The list of all the agents a Follower agent cannot follow.
Follower.BlackList.BlackListElement
- class edu.sc.ants.
Follower.BlackList.BlackListElement
.
A small class to hold a blacklisted agent ID and the time we added this ID to the list.
Follower.BlackList.BlackListElement(Follower.BlackList, int, long)
- Constructor for class edu.sc.ants.
Follower.BlackList.BlackListElement
Follower.BlackList(Follower)
- Constructor for class edu.sc.ants.
Follower.BlackList
Constructor
Follower(int, Environment, String, double, double, double, String)
- Constructor for class edu.sc.ants.
Follower
A constructor.
followers
- Variable in class edu.sc.ants.
Target
The IDs of the agents following me
G
generateAction()
- Method in class edu.sc.ants.
Agent
This method needs to return the action the agent wants to take at that particular time.
generateAction()
- Method in class edu.sc.ants.
Follower
Find the enemy that is closest to me and head towards him, moving closer if I am in the correct heading.
generateAction()
- Method in class edu.sc.ants.
GoodAgent
Find the enemy that is closest to us and head towards him, moving closer if we are in the correct heading.
generateAction()
- Method in class edu.sc.ants.
Thing
This routine is meant to be redefined by the programmer.
getAgent(int)
- Method in class edu.sc.ants.
Environment.RunningThingContainer
Look for an agent.
getAgentLocation(int)
- Method in class edu.sc.ants.
Environment.RunningThingContainer
Look for an agent.
getAgentLocationCopy(int)
- Method in class edu.sc.ants.
Environment.RunningThingContainer
Look for an agent.
getCloseAgents(int, double)
- Method in class edu.sc.ants.
Environment.RunningThingContainer
Get all the agents that are close to agentID, including itself
getCloseRunningThings(int, double)
- Method in class edu.sc.ants.
Environment.RunningThingContainer
Get all the agents that are close to agentID, not including agentID
getCurrentID()
- Method in class edu.sc.ants.
Environment.RunningThingContainer
Get the value of currentID.
getDistance()
- Method in class edu.sc.ants.
Message
Get the value of distance.
getExpiresAt()
- Method in class edu.sc.ants.
Message
Get the value of expiresAt.
getFollowAction(Observation, double)
- Method in class edu.sc.ants.
Follower
Get an action that will make this agent follow an agent at location best.
getID()
- Method in class edu.sc.ants.
Follower.BlackList.BlackListElement
Get the value of ID.
getInput(int, double)
- Method in class edu.sc.ants.
Environment
getLocation()
- Method in class edu.sc.ants.
Environment.RunningThing
Get the value of location.
getLocationCopy()
- Method in class edu.sc.ants.
Environment.RunningThing
Return a copy of the current location.
getMap()
- Method in class edu.sc.ants.
Message
Get the value of map.
getMessage()
- Method in class edu.sc.ants.
Environment.RunningThing
Get the next message
getMessage(int)
- Method in class edu.sc.ants.
Environment
Is there a message waiting for an agent?
getMessage(int)
- Method in class edu.sc.ants.
Environment.RunningThingContainer
Get the message of the given agent
getPerformative()
- Method in class edu.sc.ants.
Message
Get the value of performative.
getReceivedAt()
- Method in class edu.sc.ants.
Message
Get the value of receivedAt.
getReceiver()
- Method in class edu.sc.ants.
Message
Get the value of receiver.
getRunAwayAction(Observation, double)
- Method in class edu.sc.ants.
Follower
Get an action that will make this agent run away from the agent at location best.
getRunningThings()
- Method in class edu.sc.ants.
Environment.RunningThingContainer
Get the value of runningThings.
getSender()
- Method in class edu.sc.ants.
Message
Get the value of sender.
getSentAt()
- Method in class edu.sc.ants.
Message
Get the value of sentAt.
getThing()
- Method in class edu.sc.ants.
Environment.RunningThing
Get the value of thing.
getThread()
- Method in class edu.sc.ants.
Environment.RunningThing
Get the value of thread.
getTime()
- Method in class edu.sc.ants.
Follower.BlackList.BlackListElement
Get the value of time.
GoodAgent
- class edu.sc.ants.
GoodAgent
.
An example agent that follows enemy (type = "bad") agents
GoodAgent(int, Environment, String, double, double, double, String)
- Constructor for class edu.sc.ants.
GoodAgent
H
heading
- Variable in class edu.sc.ants.
Observation
The Thing's heading.
heading
- Variable in class edu.sc.ants.
Thing
headMessage
- Variable in class edu.sc.ants.
Environment.RunningThing
the one that is returned.
I
ID
- Variable in class edu.sc.ants.
Follower.BlackList.BlackListElement
The agent ID
incorporateObservations(Vector)
- Method in class edu.sc.ants.
Thing
Merge vo into lastInput Observations, using agentID as the unique key.
incorporateOthersObservations(Map)
- Method in class edu.sc.ants.
Thing
Incorporate the observations made by (possibly) others.
init()
- Method in class edu.sc.ants.
Ants
Start everything
init()
- Method in class edu.sc.ants.
Environment
Initialize.
isAgentIn(int)
- Method in class edu.sc.ants.
Follower.BlackList
Tells whether agent id is in the list or not.
isAgentInUpdate(int)
- Method in class edu.sc.ants.
Follower.BlackList
Tells whether agent id is in the list or not and, if it is in, updates its time to the current time.
isFollowingMe(int)
- Method in class edu.sc.ants.
Target
Is this agent following me (i.e.
L
lastFollowMessage
- Variable in class edu.sc.ants.
Follower
Time when I last told currentTarget I was following it
lastInput
- Variable in class edu.sc.ants.
Thing
the last input I received.
lastPick
- Variable in class edu.sc.ants.
Environment
The last agent that was picked.
list
- Variable in class edu.sc.ants.
Follower.BlackList
A list of blackListElement
location
- Variable in class edu.sc.ants.
Environment.RunningThing
The
real
position of this agent
M
main(String[])
- Static method in class edu.sc.ants.
Ants
map
- Variable in class edu.sc.ants.
Message
Agents can give each other maps of what they believe is out there.
Map
- class edu.sc.ants.
Map
.
Maps are sent in messages.
Map()
- Constructor for class edu.sc.ants.
Map
maxNumFollow
- Variable in class edu.sc.ants.
Target
The maximum number of agents I want following me.
Message
- class edu.sc.ants.
Message
.
The Message object is sent back and forth between the agents and includes all the information they send to each other.
Message(String, int, int, Map)
- Constructor for class edu.sc.ants.
Message
A constructor with a lot of arguments
Message(String, int, int, Map, double)
- Constructor for class edu.sc.ants.
Message
Build a messeage with a map and a distance(bid).
messages
- Variable in class edu.sc.ants.
Environment.RunningThing
The agent's mailbox of messages.
myBroadcastRange
- Variable in class edu.sc.ants.
Thing
how far can I scream
myColor
- Variable in class edu.sc.ants.
Thing
my color
myExpireWait
- Variable in class edu.sc.ants.
Thing
the number of miliseconds that must pass before I ignore a given observation.
myID
- Variable in class edu.sc.ants.
Thing
a unique ID given to me by the Environment.
mySensingRange
- Variable in class edu.sc.ants.
Thing
how far I can sense
mySize
- Variable in class edu.sc.ants.
Thing
my size.
N
name
- Variable in class edu.sc.ants.
Thing
for printing purposes.
O
Observation
- class edu.sc.ants.
Observation
.
An observation of a given object (Thing).
Observation()
- Constructor for class edu.sc.ants.
Observation
Observation(int, double, double, double, String, double)
- Constructor for class edu.sc.ants.
Observation
Observation(Observation)
- Constructor for class edu.sc.ants.
Observation
A copy constructor
observations
- Variable in class edu.sc.ants.
Map
Vector of observations
offgraphics
- Variable in class edu.sc.ants.
Environment
offscreen
- Variable in class edu.sc.ants.
Environment
offscreensize
- Variable in class edu.sc.ants.
Environment
We use page flipping to avoid flickering
owner
- Variable in class edu.sc.ants.
Map
ID of agent who made Observation
P
performative
- Variable in class edu.sc.ants.
Message
The performative of the message.
pick
- Variable in class edu.sc.ants.
Environment
has someone been picked by the user, who?
processInput()
- Method in class edu.sc.ants.
Agent
This method needs to handle all input and send any messages that need to be sent.
processInput()
- Method in class edu.sc.ants.
EnemyAgent
processInput()
- Method in class edu.sc.ants.
Follower
Incorporate all the observations that the agent hears about and broadcasts all that the agent knows (so others can hear this and do likewise).
processInput()
- Method in class edu.sc.ants.
Target
processInput()
- Method in class edu.sc.ants.
Thing
This routine is meant to be redefined by the programmer.
R
receivedAt
- Variable in class edu.sc.ants.
Message
Time at which the message was received, to be set by recipient if it wants.
receiver
- Variable in class edu.sc.ants.
Message
The ID of the agent who is meant to receive this message.
resume()
- Method in class edu.sc.ants.
Environment
Tell this thing to continue executing its run() loop
resume()
- Method in class edu.sc.ants.
Thing
Tell this thing to continue executing its run() loop
run()
- Method in class edu.sc.ants.
Ants
run()
- Method in class edu.sc.ants.
Environment
The main loop
run()
- Method in class edu.sc.ants.
Thing
The main loop.
running
- Variable in class edu.sc.ants.
Environment
True if this thread should be running
running
- Variable in class edu.sc.ants.
Thing
True if this thread should be running
runningThings
- Variable in class edu.sc.ants.
Environment.RunningThingContainer
Contains all the running things
S
scramble()
- Method in class edu.sc.ants.
Environment
Scramble the agents around.
sender
- Variable in class edu.sc.ants.
Message
ID of the sender
sendMessage(Message, double)
- Method in class edu.sc.ants.
Environment
An agent calls this when it wants to send a message.
sentAt
- Variable in class edu.sc.ants.
Message
Time at which the message was sent
setCurrentID(int)
- Method in class edu.sc.ants.
Environment.RunningThingContainer
Set the value of currentID.
setDistance(double)
- Method in class edu.sc.ants.
Message
Set the value of distance.
setExpiresAt(long)
- Method in class edu.sc.ants.
Message
Set the value of expiresAt.
setID(int)
- Method in class edu.sc.ants.
Follower.BlackList.BlackListElement
Set the value of ID.
setLocation(Observation)
- Method in class edu.sc.ants.
Environment.RunningThing
Set the value of location.
setMap(Map)
- Method in class edu.sc.ants.
Message
Set the value of map.
setPerformative(String)
- Method in class edu.sc.ants.
Message
Set the value of performative.
setReceivedAt(long)
- Method in class edu.sc.ants.
Message
Set the value of receivedAt.
setReceiver(int)
- Method in class edu.sc.ants.
Message
Set the value of receiver.
setRunningThings(Vector)
- Method in class edu.sc.ants.
Environment.RunningThingContainer
Set the value of runningThings.
setSender(int)
- Method in class edu.sc.ants.
Message
Set the value of sender.
setSentAt(long)
- Method in class edu.sc.ants.
Message
Set the value of sentAt.
setThing(Thing)
- Method in class edu.sc.ants.
Environment.RunningThing
Set the value of thing.
setThread(Thread)
- Method in class edu.sc.ants.
Environment.RunningThing
Set the value of thread.
setTime(long)
- Method in class edu.sc.ants.
Follower.BlackList.BlackListElement
Set the value of time.
shake()
- Method in class edu.sc.ants.
Environment
Shake, rattle and roll
start()
- Method in class edu.sc.ants.
Ants
start()
- Method in class edu.sc.ants.
Environment
This is called when we start for the first time.
start()
- Method in class edu.sc.ants.
Thing
the thread starts running
startThreads()
- Method in class edu.sc.ants.
Environment
Resume all the agent(Thing) threads
stop()
- Method in class edu.sc.ants.
Ants
stop()
- Method in class edu.sc.ants.
Environment
Tell this Thing to exit its run method
stop()
- Method in class edu.sc.ants.
Thing
Tell this Thing to exit its run method
stopThreads()
- Method in class edu.sc.ants.
Environment
Stop each of the threads
suspend()
- Method in class edu.sc.ants.
Environment
Tell this thing to wait and to nothing in its run loop
suspend()
- Method in class edu.sc.ants.
Thing
Tell this thing to wait and to nothing in its run loop
suspended
- Variable in class edu.sc.ants.
Environment
Should this agent just wait?
suspended
- Variable in class edu.sc.ants.
Thing
Should this agent just wait?
T
tailMessage
- Variable in class edu.sc.ants.
Environment.RunningThing
add new message here
takeAction(int, Action)
- Method in class edu.sc.ants.
Environment
The agents call this when they want to take an action.
Target
- class edu.sc.ants.
Target
.
Is followed by a Follower agent and uses negotiation protocols to make sure that no more than n agents are following him
Target(int, Environment, String, double, double, double, String)
- Constructor for class edu.sc.ants.
Target
theThings
- Variable in class edu.sc.ants.
Environment
The things in this environment
thing
- Variable in class edu.sc.ants.
Environment.RunningThing
The thing we refer to
Thing
- class edu.sc.ants.
Thing
.
Top-level class for all the inhabitants of the TargetShare simulation.
Thing(int, Environment, String, double, double, double, String)
- Constructor for class edu.sc.ants.
Thing
Constructor.
thread
- Variable in class edu.sc.ants.
Environment.RunningThing
The thread on which it runs
time
- Variable in class edu.sc.ants.
Follower.BlackList.BlackListElement
The time when this agent was blacklisted
time
- Variable in class edu.sc.ants.
Observation
The time the observation was made
timeBetweenFollowMessages
- Variable in class edu.sc.ants.
Follower
Time between successive notifications to the target that I am following it, in miliseconds.
timeExpireBlackList
- Variable in class edu.sc.ants.
Follower
Time an agent remains in my blacklist, in ms
type
- Variable in class edu.sc.ants.
Action
The type of action.
type
- Variable in class edu.sc.ants.
Observation
The Thing's type.
type
- Variable in class edu.sc.ants.
Thing
my type.
U
update(Graphics)
- Method in class edu.sc.ants.
Environment
Refresh the screen, we call each agent to draw itself where it is.
V
value
- Variable in class edu.sc.ants.
Action
An amount associated with the type.
X
xLocation
- Variable in class edu.sc.ants.
Observation
xLocation
- Variable in class edu.sc.ants.
Thing
where I
think
I am
xSize
- Static variable in class edu.sc.ants.
Environment
the size of the enviroment, in pixels
Y
yLocation
- Variable in class edu.sc.ants.
Observation
The Thing's x location
yLocation
- Variable in class edu.sc.ants.
Thing
where I
think
I am
ySize
- Static variable in class edu.sc.ants.
Environment
the size of the enviroment, in pixels
A
B
C
D
E
F
G
H
I
L
M
N
O
P
R
S
T
U
V
X
Y
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES