SimulateFrom
PURPOSE 
Simulates a POMDP from a given belief.
SYNOPSIS 
function r=SimulateFrom(P,V,start,n)
DESCRIPTION 
CROSS-REFERENCE INFORMATION 
This function calls:
- OptimalAction Returns the optimal action for a given belief.
- empty Checks if a policy is empty.
- rand Random state from a discrete belief.
- get Get for GBeliefs.
- rand Random state from a belief.
- get Get function for the GMixture object.
- rand Generates random points on a GMixture.
- get Gaussian object get function.
- rand Generates random ponts on a Gaussian.
- get Get function for CS_CO_CA_POMDPs.
- get Get function for CS_CO_DA_POMDPs.
- get Get function for CS_CO_POMDPs.
- get Get function for CS_DO_CA_POMDPs.
- get Get function for CS_DO_DA_POMDPs.
- get Get function for CS_POMDPs.
- get Get function for DS_CO_CA_POMDPs.
- get Get function for DS_CO_DA_POMDPs.
- get Get function for DS_DO_CA_POMDPs.
- get Get function for DS_DO_DA_POMDPs.
- SimulationStep Executes one step of a POMDP simulation.
- get Get functio for POMDPs.
- rand Random state from a continuous space.
- rand Random state from a discrete space.
This function is called by:
SOURCE CODE 
0001 function r=SimulateFrom(P,V,start,n)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 A=get(P,'ActionSpace');
0022 noPolicy=empty(V);
0023 s=rand(start);
0024 b=start;
0025 r=0;
0026 gamma=1;
0027 for i=1:n
0028 if noPolicy
0029 a=rand(A);
0030 else
0031 a=OptimalAction(V,b);
0032 end
0033 [s b o r1]=SimulationStep(P,b,s,a);
0034 r=r+gamma*r1;
0035 gamma=gamma*P.gamma;
0036 end
0037
|