Institut de Robòtica i Informàtica Industrial

DiscretizeActionModel

PURPOSE ^

Generates a new action model discretizing the action space of the given model.

SYNOPSIS ^

function DS_DA_AM=DiscretizeActionModel(DS_CA_AM,ActionSet)

DESCRIPTION ^

   Generates a new action model discretizing the action space of the given model.

   Produces an action model defined on a discrete action space from an
   action model defined on continuous action spaces.
   In both the input and output action models, the state space is
   discrete.
   Parameters:
     DS_CA_AM: The discrete state continuous action action model to be 
               discretized.
     ActionSet: The discrete set of actions to use in the discretization.

   See also DS_DA_ActionModel.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function DS_DA_AM=DiscretizeActionModel(DS_CA_AM,ActionSet)
0002 %   Generates a new action model discretizing the action space of the given model.
0003 %
0004 %   Produces an action model defined on a discrete action space from an
0005 %   action model defined on continuous action spaces.
0006 %   In both the input and output action models, the state space is
0007 %   discrete.
0008 %   Parameters:
0009 %     DS_CA_AM: The discrete state continuous action action model to be
0010 %               discretized.
0011 %     ActionSet: The discrete set of actions to use in the discretization.
0012 %
0013 %   See also DS_DA_ActionModel.
0014 
0015   na=size(ActionSet,2);
0016   T=zeros(DS_CA_AM.ns,DS_CA_AM.ns,na);
0017   for i=1:DS_CA_AM.ns
0018     for j=1:DS_CA_AM.ns
0019       T(i,j,:)=cellfun(@(a)(Value(DS_CA_AM.T{i}{j},a)),ActionSet);
0020     end
0021   end
0022   DS_DA_AM=DS_DA_ActionModel(T);
0023


Institut de Robòtica i Informàtica Industrial

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