|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hu.birot.OTKit.multiagent.Agent
public class Agent
A single agent, with a linguistic competence, performance, learning method, age, etc.
Field Summary | |
---|---|
protected double |
age
|
Grammar |
grammar
|
Learning |
learning
|
OfflineLearning |
offlineLearning
|
OnlineLearning |
onlineLearning
|
Production |
production
|
Constructor Summary | |
---|---|
Agent()
By default, the age of a newly created agent is set to 0. |
Method Summary | |
---|---|
double |
age()
This method returns the age of the agent. |
boolean |
offlineLearning(java.util.Vector<Candidate> cand)
The agent learns off-line. |
boolean |
onlineLearning(Candidate cand)
The agent learns on-line. |
Candidate |
produceCandidate(float rnd)
The agent produces a candidate, defined by rnd. |
java.util.Vector<Form> |
produceUtterance(float rnd)
The agent utters a form, defined by rnd. |
void |
turnsOlder()
The agent turns older by one "year". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double age
public Grammar grammar
public Production production
public Learning learning
public OnlineLearning onlineLearning
public OfflineLearning offlineLearning
Constructor Detail |
---|
public Agent()
By default, the age of a newly created agent is set to 0.
Method Detail |
---|
public double age()
This method returns the age of the agent. As you know, the age of an agent is not a public information. Yet, you may want to ask her age. If she is in a good mood, she will answer your question.
public void turnsOlder()
The agent turns older by one "year". By default, the age value of the agent is increased by 1. Yet, it may be useful to override this method, so that for instance parameters of the agent's learning or production methods be also adjusted.
Remember that the age of an agent is not a public field, because it cannot be changed randomly.
public java.util.Vector<Form> produceUtterance(float rnd)
The agent utters a form, defined by rnd. The output is a vector of Forms, with the base at position 0, the underlying form at position 1, the surface form at position 2 and finally (unless the grammar's utter object is not defined) the overt form at position 3. The agent's grammar and production algorithm are used as follows:
Thus, the method returns every information of the randomized production process. It is up to the listener agent to employ exclusively the overt form (for instance, in an unsupervised learning situation), or to deploy the underlying form, as well (in supervised learning or when the context provides clues about what the speaker agent has meant).
rnd
- A number between 0 and 1 that determines the choice of the underlying
form.
public Candidate produceCandidate(float rnd)
The agent produces a candidate, defined by rnd. The underlying form of the candidate produced is generated by the random() method of the base object in the agent's grammar, with the use of the value rnd. Subsequently, the surface form in the candidate to be returned is computed by the produce() method of the agent's production object (which also makes use of the agent's grammar).
rnd
- A number between 0 and 1 that determines the choice of
the underlying form.
public boolean offlineLearning(java.util.Vector<Candidate> cand)
The agent learns off-line. Using its offlineLearning object, the agent creates its grammar based on the learning data in the Vector of Candidates cand.
cand
- The learning data
public boolean onlineLearning(Candidate cand)
The agent learns on-line. Using its onlineLearning object, the agent updates its grammar based on the single piece of learning data cand.
cand
- The piece of learning data (aka winner candidate)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |