Home > marl > world > gridworld > gridworld_dynamics.m

gridworld_dynamics

PURPOSE ^

Implements the discrete-time dynamics of the gridworld

SYNOPSIS ^

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

DESCRIPTION ^

Implements the discrete-time dynamics of the gridworld 
  [GW, STATEVIEWS, ACTIONVIEWS, REWARDVIEWS, FINISHED] = GRIDWORLD_DYNAMICS(GW, ACTIONS)
  Transforms the state of the world based on the agent actions, and
  computes the instantaneous rewards. This implementation of the gridworld
  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 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.


  See also gridworld

CROSS-REFERENCE INFORMATION ^

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