elge.examples.simple
Class SimpleAgent

java.lang.Object
  |
  +--elge.agent.Agent
        |
        +--elge.agent.AgentContainer
              |
              +--elge.world.WorldAgent
                    |
                    +--elge.examples.simple.SimpleAgent
All Implemented Interfaces:
GameAgent, LexikonHolder, MoveableAgent

public class SimpleAgent
extends WorldAgent
implements GameAgent, LexikonHolder

Author:
Palino

Field Summary
protected  Lexikon dict
           
static String GAME_RESULT
           
protected  Memory memory
           
protected  double pC
           
protected  double pO
           
protected  double pW
           
protected  boolean sFeedback
           
static String TOPIC_OBJECT
           
static String TOPIC_WORD
           
 
Fields inherited from class elge.agent.AgentContainer
agents, innerAgency
 
Fields inherited from class elge.agent.Agent
actualSituation, agency, agencyClass, agentClassCounter, id, name, registered
 
Fields inherited from interface elge.world.MoveableAgent
PROP_POSITION
 
Constructor Summary
SimpleAgent()
          Creates a new instance of SimpleAgent
SimpleAgent(String name)
           
 
Method Summary
 Situation getAnswer_hear(Agent agent, Object message)
           
 Double getCreateWordPA()
           
 Lexikon getLexikon()
          Returns the lexikon the object is using.
 Double getNewObjectPA()
           
 Double getNewWordPA()
           
 boolean getSpeakerFeedback()
           
 void setCreateWordPA(Double p)
           
 void setLexikon(Lexikon lex)
           
 void setNewObjectPA(Double p)
           
 void setNewWordPA(Double p)
           
 void setSpeakerFeedback(boolean set)
           
 boolean talkToAgent(Agent to)
          Agents chooses its topic to talk about, and returns true or false if the game was succesfull..
 boolean talkToAgentAbout(Agent to, Object topic)
          Agents should to talk agento using topic, and returns true or false if the game was succesfull..
 
Methods inherited from class elge.world.WorldAgent
addVetoableChangeListener, getFullName, getGenerated, getGroup, getHidden, getPosition, isGenerator, paint, removeVetoableChangeListener, setGenerated, setGroup, setHidden, setPosition
 
Methods inherited from class elge.agent.AgentContainer
add, add, add, agentsLife, del, getAgentCount, getAgents, life, setAgents
 
Methods inherited from class elge.agent.Agent
ask, ask, ask, createDefaultAgency, createUniqueID, getAgency, getID, getName, chooseAction, init, life, memorize, restart, sense, setAgency, setAgency, setAgency, setID, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TOPIC_OBJECT

public static final String TOPIC_OBJECT
See Also:
Constant Field Values

TOPIC_WORD

public static final String TOPIC_WORD
See Also:
Constant Field Values

GAME_RESULT

public static final String GAME_RESULT
See Also:
Constant Field Values

pC

protected double pC

pW

protected double pW

pO

protected double pO

dict

protected Lexikon dict

memory

protected Memory memory

sFeedback

protected boolean sFeedback
Constructor Detail

SimpleAgent

public SimpleAgent()
Creates a new instance of SimpleAgent


SimpleAgent

public SimpleAgent(String name)
Method Detail

getLexikon

public Lexikon getLexikon()
Description copied from interface: LexikonHolder
Returns the lexikon the object is using.

Specified by:
getLexikon in interface LexikonHolder
Returns:
Your Lexikon

setLexikon

public void setLexikon(Lexikon lex)

setNewWordPA

public void setNewWordPA(Double p)

getNewWordPA

public Double getNewWordPA()

setCreateWordPA

public void setCreateWordPA(Double p)

getCreateWordPA

public Double getCreateWordPA()

setNewObjectPA

public void setNewObjectPA(Double p)

getNewObjectPA

public Double getNewObjectPA()

getSpeakerFeedback

public boolean getSpeakerFeedback()

setSpeakerFeedback

public void setSpeakerFeedback(boolean set)

talkToAgentAbout

public boolean talkToAgentAbout(Agent to,
                                Object topic)
Description copied from interface: GameAgent
Agents should to talk agento using topic, and returns true or false if the game was succesfull..

Specified by:
talkToAgentAbout in interface GameAgent

getAnswer_hear

public Situation getAnswer_hear(Agent agent,
                                Object message)

talkToAgent

public boolean talkToAgent(Agent to)
Agents chooses its topic to talk about, and returns true or false if the game was succesfull..

Specified by:
talkToAgent in interface GameAgent