CA {simecol}R Documentation

Stochastic Cellular Automaton

Description

simecol example: This model simulates a stochastic cellular automaton.

Usage

data(conway)

Format

An S4 object according to the gridModel specification. The object contains the following slots:

main
Functions with the state transition rules of Coway's Game of Life.
parms
A list with two vector elements:
pbirth
probability of birth,
pdeath
death probability, dependend on neighbors
times
Number of time steps to be simulated.
init
A matrix, giving the initial state of the cellular grid (default: rectangle in the middle of the grid).

Details

To see all details, please have a look into the implementation.

See Also

sim, parms, init, times.

Examples

    data(CA)
    times(CA)["to"] <- 10
    plot(sim(CA))

    set.seed(345)
    times(CA)["to"] <- 50
    CA <- sim(CA)

    library(lattice)
    tcol <- (terrain.colors(13))[-13]
    x <- out(CA, last=TRUE)
    x <- ifelse(x == 0, NA, x)
    print(levelplot(x,
                 cuts = 11,
                 col.regions = tcol,
                 colorkey=list(at=seq(0,55,5))
    ))

[Package simecol version 0.5-2 Index]