DS_CA_RewardModelPURPOSEDS_CA_RewardModel constructor.
SYNOPSISfunction RM=DS_CA_RewardModel(varargin)
DESCRIPTIONDS_CA_RewardModel constructor. Defines a reward function on discrete state and continuous action spaces, r(s,a). This is the type of reward functions is not used in the paper. It is the type of reward functions used in Spaan and Vlassis work (JAIR 2005) Note that the mixture defining this type of reward model is not normalized. Parameters S: Discrete state space. A: Continuous action space. r: A cell array of Gaussian mixture in 'a' (one for each state). CROSS-REFERENCE INFORMATIONThis function calls:
SOURCE CODE0001 function RM=DS_CA_RewardModel(varargin) 0002 % DS_CA_RewardModel constructor. 0003 % 0004 % Defines a reward function on discrete state and continuous 0005 % action spaces, r(s,a). 0006 % This is the type of reward functions is not used in the paper. It is 0007 % the type of reward functions used in Spaan and Vlassis work (JAIR 2005) 0008 % 0009 % Note that the mixture defining this type of reward model is not 0010 % normalized. 0011 % 0012 % Parameters 0013 % S: Discrete state space. 0014 % A: Continuous action space. 0015 % r: A cell array of Gaussian mixture in 'a' (one for each state). 0016 0017 switch nargin 0018 case 1 0019 if isa(varargin{1},'DS_CA_RewardModel') 0020 RM=varargin{1}; 0021 else 0022 error('Wrong parameter type in DS_CA_RewardModel constructor'); 0023 end 0024 0025 case 3 0026 if isa(varargin{1},'DSpace') 0027 AM.S=varargin{1}; 0028 else 0029 error('Wrong parameter type in DS_CA_RewardModel constructor'); 0030 end 0031 if isa(varargin{2},'CSpace') 0032 AM.A=varargin{2}; 0033 else 0034 error('Wrong parameter type in DS_CA_RewardModel constructor'); 0035 end 0036 if isa(varargin{3},'cell') 0037 RM.r=varargin{3}; 0038 end 0039 0040 if dim(RM.S)~=size(RM.r,2) 0041 error('Size missmatch in DS_CA_RewardModel constructor'); 0042 end 0043 0044 RM=class(RM,'DS_CA_RewardModel'); 0045 otherwise 0046 error('Wrong number of parameters in DS_CA_RewardModel constructor'); 0047 end |