Institut de Robòtica i Informàtica Industrial

DiscretizeActionModel

PURPOSE ^

Produces a new action model discretizing the state space.

SYNOPSIS ^

function DAM=DiscretizeActionModel(AM,DS)

DESCRIPTION ^

   Produces a new action model discretizing the state space.

   Produces an action model defined on a discrete state space from an
   action model defined on continuous state spaces.
   In both the input and output action models, the action space is
   discrete.
   Parameters:
     AM: The continuous state, discrete action action model to be discretized.
     DS: The discrete space with the samples to be used as discrete states 
         in the discretization.

   See also DS_DA_ActionModel.

CROSS-REFERENCE INFORMATION ^

This function calls:
  • DS_DA_ActionModel DS_DA_ActionModel constructor.
  • get Get for GBeliefs.
  • Crop Limits all means to be inside the given space.
  • Value Evaluates a GMixture.
  • get Get function for the GMixture object.
  • Crop Forces the Gaussian mean to be in a given space.
  • Gaussian Gaussian construtor.
  • Value Evaluation of a Gaussian.
  • get Gaussian object get function.
  • get Get function for CS_CO_CA_POMDPs.
  • get Get function for CS_CO_DA_POMDPs.
  • get Get function for CS_CO_POMDPs.
  • get Get function for CS_DO_CA_POMDPs.
  • get Get function for CS_DO_DA_POMDPs.
  • get Get function for CS_POMDPs.
  • get Get function for DS_CO_CA_POMDPs.
  • get Get function for DS_CO_DA_POMDPs.
  • get Get function for DS_DO_CA_POMDPs.
  • get Get function for DS_DO_DA_POMDPs.
  • get Get functio for POMDPs.
  • Crop Forces a state to be in a given continuous sub-space.
  • dim Dimensionality of a continuous space.
  • Crop Forces a state to be in a given discrete space.
  • dim Dimensionality of a discrete space.
This function is called by:

SOURCE CODE ^

0001 function DAM=DiscretizeActionModel(AM,DS)
0002 %   Produces a new action model discretizing the state space.
0003 %
0004 %   Produces an action model defined on a discrete state space from an
0005 %   action model defined on continuous state spaces.
0006 %   In both the input and output action models, the action space is
0007 %   discrete.
0008 %   Parameters:
0009 %     AM: The continuous state, discrete action action model to be discretized.
0010 %     DS: The discrete space with the samples to be used as discrete states
0011 %         in the discretization.
0012 %
0013 %   See also DS_DA_ActionModel.
0014 
0015   ns=dim(DS);
0016   
0017   na=dim(AM.A);
0018   T=cell(1,na);
0019   for i=1:na
0020     m=get(AM.gA{i},'mean');
0021     S=get(AM.gA{i},'covariance');
0022     T{i}=zeros(ns,ns);
0023     for j=1:ns
0024       % Gaussian on next state form current state 'j' when
0025       % action 'i' is executed.
0026       g=Gaussian(Crop(AM.S,DS(j)+m),S);
0027       for k=1:ns
0028         T{i}(k,j)=Value(g,DS(k));
0029       end      
0030       T{i}(:,j)=T{i}(:,j)/sum(T{i}(:,j));
0031     end
0032   end
0033   
0034   DAM=DS_DA_ActionModel(DS,AM.A,T);
0035


Institut de Robòtica i Informàtica Industrial

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