public class ApprenticeshipLearning
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ApprenticeshipLearning.RandomPolicy
This class extends Policy, and all it does is create a randomly generated distribution of
actions over all possible states.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
debugCodeRFWeights |
static int |
debugCodeScore |
static int |
FEATURE_EXPECTATION_SAMPLES |
| Constructor and Description |
|---|
ApprenticeshipLearning() |
| Modifier and Type | Method and Description |
|---|---|
static double[] |
estimateFeatureExpectation(EpisodeAnalysis episodeAnalysis,
StateToFeatureVectorGenerator 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<EpisodeAnalysis> episodes,
StateToFeatureVectorGenerator 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(StateToFeatureVectorGenerator 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<EpisodeAnalysis> episodes)
Returns the initial state of a randomly chosen episode analysis
|
static Policy |
getLearnedPolicy(ApprenticeshipLearningRequest request)
Computes a policy that models the expert trajectorys included in the request object.
|
public static final int FEATURE_EXPECTATION_SAMPLES
public static final int debugCodeScore
public static final int debugCodeRFWeights
public static double[] estimateFeatureExpectation(EpisodeAnalysis episodeAnalysis, StateToFeatureVectorGenerator featureFunctions, java.lang.Double gamma)
episodeAnalysis - 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<EpisodeAnalysis> episodes, StateToFeatureVectorGenerator 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(StateToFeatureVectorGenerator 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<EpisodeAnalysis> episodes)
episodes - public static Policy getLearnedPolicy(ApprenticeshipLearningRequest request)
request - Policy