Institut de Robòtica i Informàtica Industrial

CS_CA_ActionModel

PURPOSE ^

CS_CA_ActionModel constructor.

SYNOPSIS ^

function AM=CS_CA_ActionModel(varargin)

DESCRIPTION ^

   CS_CA_ActionModel constructor. 

   Defines an Action Model on continuous state and action spaces.
   Parameters:
     S: The continuous state space
     A: The continuous action space
     B: Matrix defining a ineal mapping from 'a' to  's'. 
        B*a gives a displacement in the state space.
     S: Covariance for the white noise for all actions.
        Noise for the displacement produced for each action (the same for
        all actions in this implementation).

 See also CSpace.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function AM=CS_CA_ActionModel(varargin)
0002 %   CS_CA_ActionModel constructor.
0003 %
0004 %   Defines an Action Model on continuous state and action spaces.
0005 %   Parameters:
0006 %     S: The continuous state space
0007 %     A: The continuous action space
0008 %     B: Matrix defining a ineal mapping from 'a' to  's'.
0009 %        B*a gives a displacement in the state space.
0010 %     S: Covariance for the white noise for all actions.
0011 %        Noise for the displacement produced for each action (the same for
0012 %        all actions in this implementation).
0013 %
0014 % See also CSpace.
0015 
0016   switch nargin
0017     case 1
0018       if isa(varargin{1},'CS_CA_ActionModel')
0019         AM=varargin{1};
0020       else
0021         error('Wrong parameter type in CS_CA_ActionModel constructor');
0022       end
0023     case 4
0024       
0025       if isa(varargin{1},'CSpace')
0026         AM.S=varargin{1};
0027       else
0028         error('Wrong parameter type in CS_CA_ActionModel constructor');
0029       end
0030       
0031       if isa(varargin{2},'CSpace')
0032         AM.A=varargin{2};
0033       else
0034         error('Wrong parameter type in CS_CA_ActionModel constructor');
0035       end
0036       
0037       if isa(varargin{3},'double')
0038         AM.B=varargin{3};
0039       else
0040         error('Wrong parameter type in CS_CA_ActionModel constructor');
0041       end
0042       
0043       if isa(varargin{4},'double')
0044         AM.Noise=varargin{4};
0045       else
0046         error('Wrong parameter type in CS_CA_ActionModel constructor');
0047       end
0048       
0049       AMBase=ActionModel();
0050       
0051       AM=class(AM,'CS_CA_ActionModel',AMBase);
0052       
0053     otherwise
0054       error('Wrong number of parameters in CS_CA_ActionModel constructor');
0055   end
0056


Institut de Robòtica i Informàtica Industrial

Generated on Wed 05-Aug-2009 15:05:21 by m2html © 2003