uk.ac.liv.auction.agent
Class RandomConstrainedStrategy

java.lang.Object
  extended byuk.ac.liv.auction.agent.AbstractStrategy
      extended byuk.ac.liv.auction.agent.FixedQuantityStrategyImpl
          extended byuk.ac.liv.auction.agent.RandomConstrainedStrategy
All Implemented Interfaces:
AuctionEventListener, java.lang.Cloneable, FixedQuantityStrategy, Parameterizable, Prototypeable, Resetable, java.io.Serializable, Strategy

public class RandomConstrainedStrategy
extends FixedQuantityStrategyImpl
implements java.io.Serializable

A trading strategy that in which we bid a different random markup on our agent's private value in each auction round. This strategy is often referred to as Zero Intelligence Constrained (ZI-C) in the literature.

Parameters

base.maxmarkup
double >= 0
(the maximum markup to bid for)

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

Field Summary
static double DEFAULT_MARKUP
           
protected  cern.jet.random.AbstractContinousDistribution markupDistribution
           
protected  double maxMarkup
           
static java.lang.String P_MAX_MARKUP
           
 
Fields inherited from class uk.ac.liv.auction.agent.AbstractStrategy
agent, auction, currentShout
 
Constructor Summary
RandomConstrainedStrategy()
           
RandomConstrainedStrategy(AbstractTradingAgent agent, double maxMarkup)
           
 
Method Summary
 void endOfRound(Auction auction)
           
 double getMaxMarkup()
           
 void initialise()
           
 boolean modifyShout(Shout.MutableShout shout)
          Modify the price and quantity of the given shout according to this strategy.
 void setMaxMarkup(double maxMarkup)
           
 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 uk.ac.liv.auction.agent.FixedQuantityStrategyImpl
determineQuantity, getQuantity, setQuantity
 
Methods inherited from class uk.ac.liv.auction.agent.AbstractStrategy
eventOccurred, getAgent, modifyShout, protoClone, reset, setAgent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface uk.ac.liv.auction.agent.Strategy
modifyShout, setAgent
 
Methods inherited from interface uk.ac.liv.util.Prototypeable
protoClone
 
Methods inherited from interface uk.ac.liv.util.Resetable
reset
 
Methods inherited from interface uk.ac.liv.auction.core.AuctionEventListener
eventOccurred
 

Field Detail

maxMarkup

protected double maxMarkup

markupDistribution

protected cern.jet.random.AbstractContinousDistribution markupDistribution

P_MAX_MARKUP

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

DEFAULT_MARKUP

public static final double DEFAULT_MARKUP
See Also:
Constant Field Values
Constructor Detail

RandomConstrainedStrategy

public RandomConstrainedStrategy()

RandomConstrainedStrategy

public RandomConstrainedStrategy(AbstractTradingAgent agent,
                                 double maxMarkup)
Method Detail

initialise

public void initialise()
Overrides:
initialise in class AbstractStrategy

modifyShout

public boolean modifyShout(Shout.MutableShout shout)
Description copied from class: AbstractStrategy
Modify the price and quantity of the given shout according to this strategy.

Overrides:
modifyShout in class FixedQuantityStrategyImpl

endOfRound

public void endOfRound(Auction auction)
Specified by:
endOfRound in class AbstractStrategy

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 FixedQuantityStrategyImpl

getMaxMarkup

public double getMaxMarkup()

setMaxMarkup

public void setMaxMarkup(double maxMarkup)

toString

public java.lang.String toString()