|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iastate.jrelm.demo.RothErevAgent<A>
public class RothErevAgent<A extends Action<java.lang.Integer>>
This agent is meant to demonstrate the use of the core components. It is a simple agent with behavior driven by a modified version of the Roth-Erev reinforcement learning algorithm. It must at least be supplied with a learning domain and parameters for the learning algortithm.
Use nextAction() to elicit a choice of action from the agent in the form of an Action object selected from the given action domain. Use activate(double) to give the agent feedback in the for of a double. This will trigger the learning process.
The type of Action and ActionDomain may be specified through parameters. This agent has been set to use RothErevActionID internally as it is using a ARELearner.
Constructor Summary | |
---|---|
RothErevAgent(REParameters params,
ActionDomain<java.lang.Integer,A> dom)
Build agent driven by Roth-Erev Reinforcement Learning. |
|
RothErevAgent(REParameters params,
ActionDomain<java.lang.Integer,A> dom,
java.lang.String agentID)
Build agent driven by Roth-Erev Reinforcement Learning. |
Method Summary | |
---|---|
A |
chooseAction()
Elicits a choice of action from the agent. |
java.lang.String |
getID()
Retreive a String identifier for this agent. |
RELearner |
getLearner()
Retrieve the leaner this agent is using. |
void |
receiveFeedback(double feedback)
Use this to give the agent input from the environment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RothErevAgent(REParameters params, ActionDomain<java.lang.Integer,A> dom, java.lang.String agentID)
dom
- - A DiscreteFiniteActionagentID
- - identifier for this agent ("Anonymous" by default)parameters
- - parameters for Roth-Erev learningpublic RothErevAgent(REParameters params, ActionDomain<java.lang.Integer,A> dom)
dom
- - A DiscreteFiniteActionparameters
- - parameters for Roth-Erev learningMethod Detail |
---|
public void receiveFeedback(double feedback)
feedback
- - double representing the result of the agent's last actionpublic A chooseAction()
SimpleStatelessPolicy.generateAction()
public java.lang.String getID()
JReLMAgent
getID
in interface JReLMAgent<RELearner>
JReLMAgent.getID()
public RELearner getLearner()
JReLMAgent
getLearner
in interface JReLMAgent<RELearner>
JReLMAgent.getLearner()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |