organism-class: organism - class definition

Description Arguments Details Value Examples

Description

In the Game of Evolution, an organism is an I x J binary matrix. Each ON state in this matrix is a 'living cell' in Game of Life Each OFF state in this matrix is a 'dead cell' in Game of Life

Arguments

cells

an IxJ binary matrix to be stored as an organism

shift

a Vector of c(X,Y) coordinate offsets to center the cells matrix [c(0,0)]

Details

To account for

Value

organism

Examples

1
2
3
4
5
6
7
# Example of a glider encoded as logical matrix
glider_logical <- matrix( data = c(F,T,F,
                                   F,F,T,
                                   T,T,T), nrow = 3, byrow = T)

# Example of a glider encoded as an organism
glider <- organism(cells = glider_logical)

fransilvion/REvolution documentation built on Nov. 4, 2019, 12:57 p.m.