Exemplo n.º 1
0
Arquivo: complex.py Projeto: kcsaff/CA
def complex(moore=[0.0, 0.5, 0.0,
                   0.5, 0.0, 0.5,
                   0.0, 0.5, 0.0],
            history = -1.0,
            potential = 0.005,
            denom = False,
            ):
    return rule('complex',
                moore=moore,
                history=history,
                potential=potential,
                denom=denom)
Exemplo n.º 2
0
Arquivo: water.py Projeto: kcsaff/CA
def mean(moore=[0.125, 0.125, 0.125,
                0.125, 0.125, 0.125,
                0.125, 0.125, 0.125],
          history = 0.0,
          damping = 0.0,
          heat = 0,
          min = -1000, max = +1000,
          under = -1000, over = +1000
          ):
    return rule('water',
                moore=moore,
                history=history,
                damping=damping,
                heat=heat,
                min=min, max=max,
                under=under, over=over)
Exemplo n.º 3
0
Arquivo: water.py Projeto: kcsaff/CA
def water(moore=[0.0, 0.5, 0.0,
                 0.5, 0.0, 0.5,
                 0.0, 0.5, 0.0],
          history = -1.0,
          damping = 0.005,
          heat = 0,
          min = 0.0, max = 255.9,
          under = 0.0, over = 255.9
          ):
    return rule('water',
                moore=moore,
                history=history,
                damping=damping,
                heat=heat,
                min=min, max=max,
                under=under, over=over)
Exemplo n.º 4
0
Arquivo: redox.py Projeto: kcsaff/CA
def redox(
          activation = {1: {(-1,-1): (0, 1),
                            (-1, 0): (0, 1),
                            (-1, 1): (0, 1),
                            ( 0,-1): (0, 1),
                            ( 0, 0): (1, 0),
                            ( 0, 1): (0, 1),
                            ( 1,-1): (0, 1),
                            ( 1, 0): (0, 1),
                            ( 1, 1): (0, 1),
          }},
          reduction = [[0, 0, 0, 1, 0, 0, 0, 0, 0],
                       [0, 0, 1, 1, 0, 0, 0, 0, 0]],
          quiescent = 0
          ):
    return rule('redox', 
                activation=activation, 
                reduction=reduction,
                quiescent=quiescent)
Exemplo n.º 5
0
Arquivo: life.py Projeto: kcsaff/CA
def banks(birth = [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1],
          survival = [1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1],
          decay = 0): 
    return rule('banks', birth=birth, survival=survival, decay=decay)
Exemplo n.º 6
0
Arquivo: life.py Projeto: kcsaff/CA
def brain(birth = [2], survival = [], decay = 1):
    return rule('brain', birth=birth, survival=survival, decay=decay)
Exemplo n.º 7
0
Arquivo: life.py Projeto: kcsaff/CA
def life(birth = [3], survival = [2,3]):
    return rule('life', birth=birth, survival=survival)
Exemplo n.º 8
0
Arquivo: rivers.py Projeto: kcsaff/CA
def rivers():
    return rule('rivers')