Empirical
Classes | Namespaces
StateGrid.h File Reference

StateGrid maintains a rectilinear grid that agents can traverse. More...

#include <map>
#include <string>
#include "../base/assert.h"
#include "../base/Ptr.h"
#include "../base/vector.h"
#include "../tools/BitVector.h"
#include "../tools/File.h"
#include "../tools/map_utils.h"
#include "../tools/math.h"
#include "../tools/Random.h"

Go to the source code of this file.

Classes

class  emp::StateGridInfo
 Full information about the states available in a state grid and meanings of each state. More...
 
struct  emp::StateGridInfo::StateInfo
 Information about what a particular state type means in a state grid. More...
 
class  emp::StateGrid
 A StateGrid describes a map of grid positions to the current state of each position. More...
 
class  emp::StateGridStatus
 Information about a particular agent on a state grid. More...
 
struct  emp::StateGridStatus::State
 

Namespaces

 emp
 If we are in emscripten, make sure to include the header.
 

Detailed Description

StateGrid maintains a rectilinear grid that agents can traverse.

Note
This file is part of Empirical, https://github.com/devosoft/Empirical
Date
2017-2018.

State grids are a matrix of values, representing states of a 2D environment that an organism can traverse.

Todo:

Functions such as Load() should throw exceptions (or equilv.), not use asserts.

Need to figure out a default mapping for how outputs translate to moves around a state grid. -1 = Back up ; 0 = Turn left ; 1 = Move fast-forwards ; 2 = Turn right

Allow StateGridInfo to be built inside of StateGrid (change reference to pointer and possible ownership)