public interface LearningAgent
runLearningEpisodeFrom(State)
method which causes the agent to interact with the world until it reaches a terminal state.
The interface also provides some common mechanisms for getting the last learning episode the agent performed, storing a history
of learning episodes, and returning the history of stored episodes.Modifier and Type | Interface and Description |
---|---|
static class |
LearningAgent.LearningAgentBookKeeping
Because
LearningAgent is an interface, default methods for managing
the history of experienced episodes is not provided. |
Modifier and Type | Method and Description |
---|---|
java.util.List<EpisodeAnalysis> |
getAllStoredLearningEpisodes()
Returns all saved
EpisodeAnalysis objects of which the agent has kept track. |
EpisodeAnalysis |
getLastLearningEpisode()
Returns the last learning episode of the agent.
|
EpisodeAnalysis |
runLearningEpisodeFrom(State initialState)
Causes the agent to perform a learning episode starting in the given initial state.
|
EpisodeAnalysis |
runLearningEpisodeFrom(State initialState,
int maxSteps)
Causes the agent to perform a learning episode starting in the given initial state.
|
void |
setNumEpisodesToStore(int numEps)
Tells the agent how many
EpisodeAnalysis objects representing learning episodes to internally store. |
EpisodeAnalysis runLearningEpisodeFrom(State initialState)
initialState
- The initial state in which the agent will start the episode.EpisodeAnalysis
object.EpisodeAnalysis runLearningEpisodeFrom(State initialState, int maxSteps)
initialState
- The initial state in which the agent will start the episode.maxSteps
- the maximum number of steps in the episodeEpisodeAnalysis
object.EpisodeAnalysis getLastLearningEpisode()
void setNumEpisodesToStore(int numEps)
EpisodeAnalysis
objects representing learning episodes to internally store.
For instance, if the number of set to 5, then the agent should remember the save the last 5 learning episodes. Note that this number
has nothing to do with how learning is performed; it is purely for performance gathering.numEps
- the number of learning episodes to remember.java.util.List<EpisodeAnalysis> getAllStoredLearningEpisodes()
EpisodeAnalysis
objects of which the agent has kept track.EpisodeAnalysis
objects of which the agent has kept track.