<< conway Game of Life of Conway genzero >>

Game of Life of Conway >> Game of Life of Conway > evolution

evolution

Computes the evolution of a given grid according to the rules of the Conway's game of life

Syntax

[B,n]=evolution(A,N,cyc,fig)

Parameters

A:

matrix with configuration of the original grid

N:

maximum number of generations to be computed

cyc:

%t for infinite periodic arrangement or %f for finite grid

fig:

%t for diplaying plot

B:

matrix with the final configuration of the grid

n:

number of generations computed

Description

evolution computes the evolution of a grid of square cells according to the rules of the Conway's game of life. The simulations will be interrupted if the grid comes to a stable configuration (including death). evolution is a main function of the game_of_life package for Scilab.

Examples

// Observe the evolution of
// the first 200 generations of
// a grid originally set as
// a spaceship glider pattern in
// a periodic 13 by 11 cells grid.
//
A=genzero(27,28,.26);..
B=evolution(A,200,%t,%t);

// Generate a periodic 27 by 28 cells grid
// where individual cells have a 26:74 chance
// to be live or dead and
// observe its evolution.
A=genzero(27,28,.26);..
B=evolution(A,%inf,%t,%t);

See also

Authors


Report an issue
<< conway Game of Life of Conway genzero >>