ipdlx.strategy
Class Historical
java.lang.Object
ipdlx.Strategy
ipdlx.strategy.Historical
- All Implemented Interfaces:
- PDValues, java.lang.Cloneable
public final class Historical
- extends Strategy
Historical strategy
- Author:
- Jan Humble
| Fields inherited from interface ipdlx.PDValues |
COOPERATE, DEFAULT_MISTAKE_LEVEL, DEFAULT_PUNISHMENT, DEFAULT_REWARD, DEFAULT_SUCKER, DEFAULT_TEMPTATION, DEFECT, EXIT, moves, PLAYER_A, PLAYER_B |
|
Constructor Summary |
Historical(int historySize,
java.lang.String initialActions,
java.lang.String actions)
|
Historical(java.lang.String abbrName,
java.lang.String name,
java.lang.String description,
int historySize,
java.lang.String initialActions,
java.lang.String actions)
|
|
Method Summary |
protected java.lang.Object |
clone()
returns full name of the strategy |
protected void |
construct(java.lang.String initialActions,
java.lang.String actions)
|
double |
getMove()
returns move |
static void |
main(java.lang.String[] args)
|
void |
reset()
sets the initial state of this strategy |
java.lang.String |
toString()
|
| Methods inherited from class ipdlx.Strategy |
getAbbrName, getDescription, getFinalMove, getFullName, getName, getNumberOfOpponents, getOpponentMove, getOpponentsMoves, getResult, setLastResult, setNumberOfOpponents, setOpponentMove, setOpponentsMoves |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Historical
public Historical(int historySize,
java.lang.String initialActions,
java.lang.String actions)
throws WrongHistoricalValuesException
- Throws:
WrongHistoricalValuesException
Historical
public Historical(java.lang.String abbrName,
java.lang.String name,
java.lang.String description,
int historySize,
java.lang.String initialActions,
java.lang.String actions)
throws WrongHistoricalValuesException
- Throws:
WrongHistoricalValuesException
reset
public void reset()
- Description copied from class:
Strategy
- sets the initial state of this strategy
- Overrides:
reset in class Strategy
construct
protected void construct(java.lang.String initialActions,
java.lang.String actions)
throws WrongHistoricalValuesException
- Throws:
WrongHistoricalValuesException
clone
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Description copied from class:
Strategy
- returns full name of the strategy
- Overrides:
clone in class Strategy
- Returns:
- full name of the strategy "abbrName (FullName)"
- Throws:
java.lang.CloneNotSupportedException
getMove
public double getMove()
- Description copied from class:
Strategy
- returns move
- Specified by:
getMove in class Strategy
- Returns:
- move of this strategy
toString
public java.lang.String toString()
- Overrides:
toString in class Strategy
main
public static void main(java.lang.String[] args)