SimulationStepPURPOSEExecutes one step of a POMDP simulation.
SYNOPSISfunction [s b o r]=SimulationStep(P,b,s,a)
DESCRIPTIONExecutes one step of a POMDP simulation. It updates the belief using the corresponding Prediction method and the given action and then corrects the belief using the corresponding Update method. The implementation of both the Prediction and Update methods are dependant on the nature of the beliefs. Parameters: P: The POMDP. b: The belief to update. s: The hidden state (used to query the observation and reward models) a: The action to execute. Outputs: s: The new hidden state. b: The new belief. o: The observation used in the Update. r: The reward obtained in the new attained (hidden) state. See also DBelief, GBelief, PBelief, SimulateFrom. CROSS-REFERENCE INFORMATIONThis function calls:
SOURCE CODE0001 function [s b o r]=SimulationStep(P,b,s,a) 0002 % Executes one step of a POMDP simulation. 0003 % 0004 % It updates the belief using the corresponding Prediction method and the 0005 % given action and then corrects the belief using the corresponding 0006 % Update method. 0007 % The implementation of both the Prediction and Update methods are 0008 % dependant on the nature of the beliefs. 0009 % 0010 % Parameters: 0011 % P: The POMDP. 0012 % b: The belief to update. 0013 % s: The hidden state (used to query the observation and reward models) 0014 % a: The action to execute. 0015 % 0016 % Outputs: 0017 % s: The new hidden state. 0018 % b: The new belief. 0019 % o: The observation used in the Update. 0020 % r: The reward obtained in the new attained (hidden) state. 0021 % 0022 % See also DBelief, GBelief, PBelief, SimulateFrom. 0023 0024 S=get(P,'StateSpace'); 0025 0026 [s b]=Prediction(P,s,b,a,S); 0027 0028 po=GetObsModelFixedS(P,s); 0029 if isa(po,'double') 0030 o=RandVector(po); 0031 else 0032 o=rand(po); 0033 end 0034 b=Update(P,b,o,S); 0035 0036 r=Reward(P,a,s); 0037 |