public abstract class BeliefAgent
extends java.lang.Object
EpisodeAnalysis
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.oomdp.singleagent.pomdp.beliefstate.BeliefState)
method.
Different agents can be specified by subclassing and implementing the getAction(burlap.oomdp.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.
|
Constructor and Description |
---|
BeliefAgent(PODomain poDomain,
Environment environment)
Initializes
|
Modifier and Type | Method and Description |
---|---|
EpisodeAnalysis |
actUntilTerminal()
Causes the agent to act until the environment reaches a termination condition.
|
EpisodeAnalysis |
actUntilTerminalOrMaxSteps(int maxSteps)
Causes the agent to act for some fixed number of steps.
|
abstract GroundedAction |
getAction(BeliefState curBelief)
Returns the action the agent should take for the input
BeliefState . |
void |
setBeliefState(BeliefState beliefState)
Sets this agent's current belief
|
void |
setEnvironment(Environment environment)
Sets the POMDP environment
|
protected Environment environment
protected BeliefState curBelief
BeliefState
protected PODomain poDomain
public BeliefAgent(PODomain poDomain, Environment environment)
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 EpisodeAnalysis actUntilTerminal()
BeliefState
's
BeliefState.getUpdatedBeliefState(burlap.oomdp.core.states.State, burlap.oomdp.singleagent.GroundedAction)
method. The agent's action selection for the current belief state is defend by
the getAction(burlap.oomdp.singleagent.pomdp.beliefstate.BeliefState)
method. The observation, action, and reward
sequence is saved and EpisodeAnalysis
object and returned.EpisodeAnalysis
that recorded the observation, action, and reward sequence.public EpisodeAnalysis actUntilTerminalOrMaxSteps(int maxSteps)
BeliefState
's
BeliefState.getUpdatedBeliefState(burlap.oomdp.core.states.State, burlap.oomdp.singleagent.GroundedAction)
method. The agent's action selection for the current belief state is defend by
the getAction(burlap.oomdp.singleagent.pomdp.beliefstate.BeliefState)
method. The observation, action, and reward
sequence is saved and EpisodeAnalysis
object and returned.EpisodeAnalysis
that recorded the observation, action, and reward sequence.public abstract GroundedAction getAction(BeliefState curBelief)
BeliefState
.curBelief
- the BeliefState
in which the agent must make a decision.GroundedAction
specifying the agent's decision for the input BeliefState
.