net.sourceforge.jasa.agent.strategy
Class StimuliResponseStrategy
java.lang.Object
AbstractStrategy
net.sourceforge.jasa.agent.strategy.AbstractTradingStrategy
net.sourceforge.jasa.agent.strategy.FixedQuantityStrategyImpl
net.sourceforge.jasa.agent.strategy.FixedDirectionStrategy
net.sourceforge.jasa.agent.strategy.AdaptiveStrategyImpl
net.sourceforge.jasa.agent.strategy.DiscreteLearnerStrategy
net.sourceforge.jasa.agent.strategy.StimuliResponseStrategy
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, AdaptiveStrategy, FixedQuantityStrategy, TradingStrategy, MarketEventListener
public class StimuliResponseStrategy
- extends DiscreteLearnerStrategy
- implements java.io.Serializable
A trading strategy that uses a stimuli-response learning algorithm, such as
the Roth-Erev algorithm, to adapt its trading behaviour in successive market
rounds by using the agent's profits in the last round as a reward signal.
-
-
Field Summary |
protected StimuliResponseLearner |
learner
The learning algorithm to use. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
learner
protected StimuliResponseLearner learner
- The learning algorithm to use.
StimuliResponseStrategy
public StimuliResponseStrategy(AbstractTradingAgent agent)
StimuliResponseStrategy
public StimuliResponseStrategy()
protoClone
public java.lang.Object protoClone()
- Overrides:
protoClone
in class AbstractTradingStrategy
act
public int act()
- Description copied from class:
DiscreteLearnerStrategy
- Generate an action from the learning algorithm.
- Specified by:
act
in class DiscreteLearnerStrategy
learn
public void learn(Market auction)
- Description copied from class:
DiscreteLearnerStrategy
- Perform learning.
- Specified by:
learn
in class DiscreteLearnerStrategy
reset
public void reset()
- Overrides:
reset
in class AbstractTradingStrategy
getLearner
public Learner getLearner()
- Specified by:
getLearner
in interface AdaptiveStrategy
setLearner
public void setLearner(Learner learner)
- Specified by:
setLearner
in interface AdaptiveStrategy
toString
public java.lang.String toString()