Home > marl > world > rrgw > rrgw_dynamics.m

rrgw_dynamics

PURPOSE ^

Implements the discrete-time dynamics of the rrgw

SYNOPSIS ^

function [gw, stateviews, actionviews, rewardviews, finished] = rrgw_dynamics(gw, actions)

DESCRIPTION ^

Implements the discrete-time dynamics of the rrgw 
  [GW, STATEVIEWS, ACTIONVIEWS, REWARDVIEWS, FINISHED] = RRGW_DYNAMICS(GW, ACTIONS)
  Transforms the state of the world based on the agent actions, and
  computes the instantaneous rewards. This implementation of the rrgw
  will always return true and complete views over state, joint actions and
  joint rewards.

  Parameters:
   GW          - the gridworld.
   ACTIONS     - the joint action vector of the agents, a column vector.
               May contain NaN elements, signifying 'noop' for agents that
               completed their task.

  Returns:
   GW          - the altered gridworld.
   STATEVIEWS  - the views of the agents over the state, nth agent view on
               the nth column.
   ACTIONVIEWS - the views of the agents over the joint action, nth agent
               view on the nth column.
   REWARDVIEWS - the views of the agents over the joint reward, nth agent
               view on the nth column.
   FINISHED    - a boolean row vector containing for each agent a flag 
               that signals if that agents' task has finished in this trial
               (either by success, or failure). nth agent flag on the nth
               column.

  The agents cannot move out of the grid, onto an obstacle, or in mixed
  settings onto a goal that does not belong to them. Furthermore, if
  several agents try to move into the same position, they will be reset to
  their original positions (including any agents that wouldn't have hit an
  agent if that agent wouldn't have hit something else and been reset
  etc., recursively).

  Each agent finishes when it has reached its corresponding goal. There is
  no failure situation. In competitive worlds, the agent that reaches the
  goal first wins, the other loses, and the trial terminates at that
  moment.


  See also rrgw

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Wed 04-Aug-2010 16:55:08 by m2html © 2005