![]() |
CS_CA_RewardModelPURPOSE
CS_CA_RewardModel constructor.
SYNOPSIS
function RM=CS_CA_RewardModel(varargin)
DESCRIPTION
CS_CA_RewardModel constructor. Defines a reward function on continuous state and action spaces, r(s,a). This kind of reward models is never directly used since continuous action spaces are discretized (See line 14a of Table 2 in page 21 in the paper). Note that the mixture defining this type of reward model is not normalized. Parameters S: Continuous state space. A: Continuous action space. w: weights of the double mixture. gS: Gaussians in 's'. gA: Gaussians in 'a'. CROSS-REFERENCE INFORMATION
This function calls:
SOURCE CODE
0001 function RM=CS_CA_RewardModel(varargin) 0002 % CS_CA_RewardModel constructor. 0003 % 0004 % Defines a reward function on continuous state and 0005 % action spaces, r(s,a). 0006 % This kind of reward models is never directly used since continuous 0007 % action spaces are discretized (See line 14a of Table 2 in page 21 in 0008 % the paper). 0009 % 0010 % Note that the mixture defining this type of reward model is not 0011 % normalized. 0012 % 0013 % Parameters 0014 % S: Continuous state space. 0015 % A: Continuous action space. 0016 % w: weights of the double mixture. 0017 % gS: Gaussians in 's'. 0018 % gA: Gaussians in 'a'. 0019 0020 0021 switch nargin 0022 case 1 0023 if isa(varargin{1},'CS_CA_RewardModel') 0024 RM=varargin{1}; 0025 else 0026 error('Wrong parameter type in CS_CA_RewardModel constructor'); 0027 end 0028 case 5 0029 if isa(varargin{1},'CSpace') 0030 RM.S=varargin{1}; 0031 else 0032 error('Wrong parameter type in CS_CA_RewardModel constructor'); 0033 end 0034 if isa(varargin{2},'CSpace') 0035 RM.A=varargin{2}; 0036 else 0037 error('Wrong parameter type in CS_CA_RewardModel constructor'); 0038 end 0039 if isa(varargin{3},'double') 0040 RM.w=varargin{3}; 0041 end 0042 if isa(varargin{4},'cell') 0043 RM.gS=varargin{4}; 0044 end 0045 if isa(varargin{5},'cell') 0046 RM.gA=varargin{5}; 0047 end 0048 0049 RM=class(RM,'CS_CA_RewardModel'); 0050 0051 otherwise 0052 error('Wrong number of parameters in CS_CA_RewardModel constructor'); 0053 end 0054 |