uk.ac.liv.auction.agent
Class MDPStrategy
java.lang.Object
uk.ac.liv.auction.agent.AbstractStrategy
uk.ac.liv.auction.agent.FixedQuantityStrategyImpl
uk.ac.liv.auction.agent.AdaptiveStrategyImpl
uk.ac.liv.auction.agent.DiscreteLearnerStrategy
uk.ac.liv.auction.agent.MDPStrategy
- All Implemented Interfaces:
- AdaptiveStrategy, AuctionEventListener, java.lang.Cloneable, FixedQuantityStrategy, Parameterizable, Prototypeable, Resetable, java.io.Serializable, Strategy
- public class MDPStrategy
- extends DiscreteLearnerStrategy
- implements java.io.Serializable
A trading strategy that uses an MDP learning algorithm,
such as the Q-learning algorithm, to adapt its trading behaviour in
successive auction rounds. The current market-quote is hashed to produce
an integer state value.
- Version:
- $Revision: 1.18 $
- Author:
- Steve Phelps
- See Also:
- Serialized Form
|
Method Summary |
int |
act()
Generate an action from the learning algorithm. |
int |
auctionState(Auction auction)
Hash the market quote to produce a state value for the learning algorithm. |
Learner |
getLearner()
|
void |
learn(Auction auction)
Perform learning. |
void |
reset()
Reinitialise our state to the original settings. |
void |
setLearner(Learner learner)
|
void |
setup(ec.util.ParameterDatabase parameters,
ec.util.Parameter base)
Initialise this object from a parameter database. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
learner
protected MDPLearner learner
bidBinStart
protected double bidBinStart
bidBinWidth
protected double bidBinWidth
askBinStart
protected double askBinStart
askBinWidth
protected double askBinWidth
quoteBins
protected int quoteBins
firstShout
protected boolean firstShout
P_LEARNER
public static final java.lang.String P_LEARNER
- See Also:
- Constant Field Values
P_QUOTEBINS
public static final java.lang.String P_QUOTEBINS
- See Also:
- Constant Field Values
P_ASKBINSTART
public static final java.lang.String P_ASKBINSTART
- See Also:
- Constant Field Values
P_ASKBINWIDTH
public static final java.lang.String P_ASKBINWIDTH
- See Also:
- Constant Field Values
P_BIDBINSTART
public static final java.lang.String P_BIDBINSTART
- See Also:
- Constant Field Values
P_BIDBINWIDTH
public static final java.lang.String P_BIDBINWIDTH
- See Also:
- Constant Field Values
MDPStrategy
public MDPStrategy(AbstractTradingAgent agent,
double askBinStart,
double askBinWidth,
double bidBinStart,
double bidBinWidth)
MDPStrategy
public MDPStrategy()
setup
public void setup(ec.util.ParameterDatabase parameters,
ec.util.Parameter base)
- Description copied from interface:
Parameterizable
- Initialise this object from a parameter database.
- Specified by:
setup in interface Parameterizable- Overrides:
setup in class DiscreteLearnerStrategy
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(Auction auction)
- Description copied from class:
DiscreteLearnerStrategy
- Perform learning.
- Specified by:
learn in class DiscreteLearnerStrategy
auctionState
public int auctionState(Auction auction)
- Hash the market quote to produce a state value for the learning algorithm.
reset
public void reset()
- Description copied from interface:
Resetable
- Reinitialise our state to the original settings.
- Specified by:
reset in interface Resetable- Overrides:
reset in class AbstractStrategy
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()