|Modifier and Type||Class and Description|
Collects SARS data from source states generated by a
|Modifier and Type||Field and Description|
The actions used for collecting data.
|Constructor and Description|
Initializes the collector's action set using the actions that are part of the domain.
Initializes this collector's action set to use for collecting data.
|Modifier and Type||Method and Description|
Collects data from an initial state until either a terminal state is reached or until the maximum number of steps is taken.
Collects nSamples of SARS tuples and returns it in a
protected java.util.List<Action> actions
public SARSCollector(Domain domain)
domain- the domain containing the actions to use
public SARSCollector(java.util.List<Action> actions)
actions- the action set to use for collecting data.
public abstract SARSData collectDataFrom(State s, RewardFunction rf, int maxSteps, TerminalFunction tf, SARSData intoDataset)
s- the initial state from which data should be collected.
rf- the reward function from which rewards are tracks.
maxSteps- the maximum number of steps that can be taken.
tf- the terminal function that ends data collection.
intoDataset- the dataset into which data will be stored. If null, a dataset is created.
public SARSData collectNInstances(StateGenerator sg, RewardFunction rf, int nSamples, int maxEpisodeSteps, TerminalFunction tf, SARSData intoDataset)
sg- a state geneator for finding initial state from which data can be collected.
rf- the reward function that defines the reward received.
nSamples- the number of SARS samples to collect.
maxEpisodeSteps- the maximum number of steps that can be taken when rolling out from a state generted by
StateGeneratorsg, before a new rollout is started.
tf- the terminal function that caused a rollout to stop and a new state to be generated from
intoDataset- the dataset into which the results will be collected. If null, a new dataset is created.