edu.cuny.cat.trader.strategy
Class StimuliResponseStrategy

java.lang.Object
  extended by java.util.Observable
      extended by edu.cuny.cat.trader.strategy.AbstractStrategy
          extended by edu.cuny.cat.trader.strategy.FixedQuantityStrategyImpl
              extended by edu.cuny.cat.trader.strategy.AdaptiveStrategyImpl
                  extended by edu.cuny.cat.trader.strategy.DiscreteLearnerStrategy
                      extended by edu.cuny.cat.trader.strategy.StimuliResponseStrategy
All Implemented Interfaces:
AuctionEventListener, AdaptiveStrategy, FixedQuantityStrategy, Strategy, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Prototypeable, edu.cuny.obj.Resetable, java.io.Serializable, java.lang.Cloneable

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 auction rounds by using the agent's profits in the last round as a reward signal.

Parameters

base.learner
classname, inherits StimuliResponseLearner
(the learning algorithm to use)

Default Base

stimuli_response_strategy

Version:
$Revision: 1.19 $
Author:
Steve Phelps
See Also:
Serialized Form

Field Summary
protected  edu.cuny.ai.learning.StimuliResponseLearner learner
          The learning algorithm to use.
static java.lang.String P_DEF_BASE
           
static java.lang.String P_LEARNER
           
 
Fields inherited from class edu.cuny.cat.trader.strategy.DiscreteLearnerStrategy
markupScale
 
Fields inherited from class edu.cuny.cat.trader.strategy.FixedQuantityStrategyImpl
quantity
 
Fields inherited from class edu.cuny.cat.trader.strategy.AbstractStrategy
agent, currentShout, MIN_PRICE_DIFFERENCE
 
Constructor Summary
StimuliResponseStrategy()
           
StimuliResponseStrategy(AbstractTradingAgent agent)
           
 
Method Summary
 int act()
          Generate an action from the learning algorithm.
 edu.cuny.ai.learning.Learner getLearner()
           
 void learn()
          Perform learning.
 java.lang.Object protoClone()
           
 void reset()
           
 void setLearner(edu.cuny.ai.learning.Learner learner)
           
 void setup(edu.cuny.config.param.ParameterDatabase parameters, edu.cuny.config.param.Parameter base)
           
 java.lang.String toString()
           
 
Methods inherited from class edu.cuny.cat.trader.strategy.DiscreteLearnerStrategy
eventOccurred, getMarkupScale, modifyShout, setMarkupScale
 
Methods inherited from class edu.cuny.cat.trader.strategy.FixedQuantityStrategyImpl
determineQuantity, getQuantity, setQuantity
 
Methods inherited from class edu.cuny.cat.trader.strategy.AbstractStrategy
getAgent, initialize, modifyShout, requiresAuctionHistory, setAgent
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.cuny.cat.trader.strategy.Strategy
determineQuantity, modifyShout, requiresAuctionHistory, setAgent
 

Field Detail

learner

protected edu.cuny.ai.learning.StimuliResponseLearner learner
The learning algorithm to use.


P_DEF_BASE

public static final java.lang.String P_DEF_BASE
See Also:
Constant Field Values

P_LEARNER

public static final java.lang.String P_LEARNER
See Also:
Constant Field Values
Constructor Detail

StimuliResponseStrategy

public StimuliResponseStrategy()

StimuliResponseStrategy

public StimuliResponseStrategy(AbstractTradingAgent agent)
Method Detail

setup

public void setup(edu.cuny.config.param.ParameterDatabase parameters,
                  edu.cuny.config.param.Parameter base)
Specified by:
setup in interface edu.cuny.config.param.Parameterizable
Overrides:
setup in class DiscreteLearnerStrategy

reset

public void reset()
Specified by:
reset in interface edu.cuny.obj.Resetable
Overrides:
reset in class AbstractStrategy

protoClone

public java.lang.Object protoClone()
Specified by:
protoClone in interface edu.cuny.obj.Prototypeable
Overrides:
protoClone in class AbstractStrategy

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()
Description copied from class: DiscreteLearnerStrategy
Perform learning.

Specified by:
learn in class DiscreteLearnerStrategy

getLearner

public edu.cuny.ai.learning.Learner getLearner()
Specified by:
getLearner in interface AdaptiveStrategy

setLearner

public void setLearner(edu.cuny.ai.learning.Learner learner)
Specified by:
setLearner in interface AdaptiveStrategy

toString

public java.lang.String toString()
Overrides:
toString in class DiscreteLearnerStrategy