public abstract class BeliefAgent
extends java.lang.Object
Episode
object. These methods will automatically update this agent's BeliefState
, specified by the curBelief
data member,
as observations are made. Before beginning, the
agent's initial BeliefState
will need to be specified with the setBeliefState(burlap.mdp.singleagent.pomdp.beliefstate.BeliefState)
method.
Different agents can be specified by subclassing and implementing the getAction(burlap.mdp.singleagent.pomdp.beliefstate.BeliefState)
method.Modifier and Type | Field and Description |
---|---|
protected BeliefState |
curBelief
The agent's current
BeliefState |
protected Environment |
environment
The POMDP environment.
|
protected PODomain |
poDomain
The POMDP Domain defining the environment mechanics.
|
protected BeliefUpdate |
updater
The belief update to use
|
Constructor and Description |
---|
BeliefAgent(PODomain poDomain,
Environment environment)
Initializes.
|
Modifier and Type | Method and Description |
---|---|
Episode |
actUntilTerminal()
Causes the agent to act until the environment reaches a termination condition.
|
Episode |
actUntilTerminalOrMaxSteps(int maxSteps)
Causes the agent to act for some fixed number of steps.
|
abstract Action |
getAction(BeliefState curBelief)
Returns the action the agent should take for the input
BeliefState . |
BeliefUpdate |
getUpdater() |
void |
setBeliefState(BeliefState beliefState)
Sets this agent's current belief
|
void |
setEnvironment(Environment environment)
Sets the POMDP environment
|
void |
setUpdater(BeliefUpdate updater) |
protected Environment environment
protected BeliefState curBelief
BeliefState
protected PODomain poDomain
protected BeliefUpdate updater
public BeliefAgent(PODomain poDomain, Environment environment)
TabularBeliefUpdate
, but you can
change that with the setUpdater(BeliefUpdate)
method.poDomain
- the POMDP domain defining the mechanics of the environmentenvironment
- the environment in which the agent will be interacting.public void setEnvironment(Environment environment)
environment
- the POMDP environmentpublic void setBeliefState(BeliefState beliefState)
beliefState
- the agent' current beliefpublic BeliefUpdate getUpdater()
public void setUpdater(BeliefUpdate updater)
public Episode actUntilTerminal()
BeliefUpdate
.
The agent's action selection for the current belief state is defined by
the getAction(burlap.mdp.singleagent.pomdp.beliefstate.BeliefState)
method. The observation, action, and reward
sequence is saved and Episode
object and returned.Episode
that recorded the observation, action, and reward sequence.public Episode actUntilTerminalOrMaxSteps(int maxSteps)
BeliefUpdate
.
The agent's action selection for the current belief state is defined by
the getAction(burlap.mdp.singleagent.pomdp.beliefstate.BeliefState)
method. The observation, action, and reward
sequence is saved and Episode
object and returned.maxSteps
- the maximum number of steps to take in the environmentEpisode
that recorded the observation, action, and reward sequence.public abstract Action getAction(BeliefState curBelief)
BeliefState
.curBelief
- the BeliefState
in which the agent must make a decision.Action
specifying the agent's decision for the input BeliefState
.