public class RlStrategy extends AbstractRlStrategy implements Serializable, org.springframework.beans.factory.InitializingBean, Taggable
Modifier and Type | Field and Description |
---|---|
protected StimuliResponseLearner |
learner |
actions, currentStrategy, initialPropensities, strategyFactory
agent, scheduler
Constructor and Description |
---|
RlStrategy() |
RlStrategy(Agent agent,
org.springframework.beans.factory.ObjectFactory<Strategy> strategyFactory,
StimuliResponseLearner learner) |
RlStrategy(org.springframework.beans.factory.ObjectFactory<Strategy> strategyFactory,
StimuliResponseLearner learner) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
Strategy |
clone() |
void |
execute(List<Agent> otherAgents)
Execute the behaviour defined by this strategy.
|
StimuliResponseLearner |
getLearner() |
int |
getNumberOfActions() |
String |
getTag() |
void |
initialise() |
void |
setAgent(Agent agent)
Configure the agent associated with this strategy.
|
void |
setInitialPropensities(double[] initialPropensities) |
void |
setLearner(StimuliResponseLearner learner) |
void |
setTag(String tag) |
void |
subscribeToEvents(EventScheduler scheduler)
A Strategy should subscribe to any events it wants to receive by calling
the
addListener method in the EventScheduler class. |
getInitialPropensities, getStrategyFactory, setStrategyFactory, unsubscribeFromEvents
eventOccurred, fireEvent, getAgent, getScheduler, onSimulationFinished, setScheduler, subscribeToEvents
protected StimuliResponseLearner learner
public RlStrategy(Agent agent, org.springframework.beans.factory.ObjectFactory<Strategy> strategyFactory, StimuliResponseLearner learner)
public RlStrategy(org.springframework.beans.factory.ObjectFactory<Strategy> strategyFactory, StimuliResponseLearner learner)
public RlStrategy()
public void initialise()
initialise
in class AbstractRlStrategy
public void subscribeToEvents(EventScheduler scheduler)
Strategy
addListener
method in the EventScheduler
class.subscribeToEvents
in interface Strategy
subscribeToEvents
in class AbstractStrategy
scheduler
- The EventScheduler
on which to listen.public void execute(List<Agent> otherAgents)
Strategy
execute
in interface Strategy
execute
in class AbstractStrategy
otherAgents
- The other agents with which the agent associated
with this strategy is interacting.public StimuliResponseLearner getLearner()
public void setLearner(StimuliResponseLearner learner)
public void setAgent(Agent agent)
Strategy
setAgent
in interface Strategy
setAgent
in class AbstractStrategy
public Strategy clone() throws CloneNotSupportedException
clone
in interface Strategy
clone
in class AbstractStrategy
CloneNotSupportedException
public void setInitialPropensities(double[] initialPropensities)
public int getNumberOfActions()
getNumberOfActions
in class AbstractRlStrategy
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
Copyright © 2014. All rights reserved.