public class ApprenticeshipLearning
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ApprenticeshipLearning.StationaryRandomDistributionPolicy
This class extends Policy.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEBUG_CODE_RF_WEIGHTS |
static int |
DEBUG_CODE_SCORE |
Modifier and Type | Method and Description |
---|---|
static double[] |
estimateFeatureExpectation(Episode episode,
DenseStateFeatures featureFunctions,
java.lang.Double gamma)
Calculates the Feature Expectations given one demonstration, a feature mapping and a discount factor gamma
|
static double[] |
estimateFeatureExpectation(java.util.List<Episode> episodes,
DenseStateFeatures featureFunctions,
java.lang.Double gamma)
Calculates the Feature Expectations given a list of demonstrations, a feature mapping and a
discount factor gamma
|
static RewardFunction |
generateRewardFunction(DenseStateFeatures featureFunctions,
burlap.behavior.singleagent.learnfromdemo.apprenticeship.ApprenticeshipLearning.FeatureWeights featureWeights)
Generates an anonymous instance of a reward function derived from a FeatureMapping
and associated feature weights
Computes (w^(i))T phi from step 4 in section 3
|
static State |
getInitialState(java.util.List<Episode> episodes)
Returns the initial state of a randomly chosen episode analysis
|
static Policy |
getLearnedPolicy(ApprenticeshipLearningRequest request)
Computes a policy that models the expert trajectories included in the request object.
|
public static final int DEBUG_CODE_SCORE
public static final int DEBUG_CODE_RF_WEIGHTS
public static double[] estimateFeatureExpectation(Episode episode, DenseStateFeatures featureFunctions, java.lang.Double gamma)
episode
- An EpisodeAnalysis object that contains a sequence of state-action pairsfeatureFunctions
- Feature Mapping which maps states to featuresgamma
- Discount factor gammapublic static double[] estimateFeatureExpectation(java.util.List<Episode> episodes, DenseStateFeatures featureFunctions, java.lang.Double gamma)
episodes
- List of expert demonstrations as EpisodeAnalysis objectsfeatureFunctions
- Feature Mapping which maps states to featuresgamma
- Discount factor for future expected rewardpublic static RewardFunction generateRewardFunction(DenseStateFeatures featureFunctions, burlap.behavior.singleagent.learnfromdemo.apprenticeship.ApprenticeshipLearning.FeatureWeights featureWeights)
featureFunctions
- The feature mapping of states to featuresfeatureWeights
- The weights given to each featurepublic static State getInitialState(java.util.List<Episode> episodes)
episodes
- the expert demonstrationspublic static Policy getLearnedPolicy(ApprenticeshipLearningRequest request)
request
- the IRL problem descriptionPolicy