Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
Public Member Functions | Public Attributes | List of all members
Evolife.Graphics.Landscape.Landscape Class Reference

A 2-D square toric grid. More...

Inheritance diagram for Evolife.Graphics.Landscape.Landscape:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, Width=100, Height=0, CellType=LandCell)
 
def setAdmissible (self, ContentType)
 
def Admissible (self, Content)
 
def ToricConversion (self, P)
 
def Modify (self, P, NewContent, check=False, Future=False)
 Changes content at a location. More...
 
def Content (self, P, Future=False)
 
def Cell (self, P)
 
def __getitem__ (self, P)
 
def free (self, P)
 
def neighbourhoodLength (self, Radius=1)
 
def neighbours (self, P, Radius=1)
 returns neighbouring cells More...
 
def segment (self, P0, P1)
 
def InspectNeighbourhood (self, Pos, Radius)
 Makes statistics about local content Returns a dictionary by Content. More...
 
def statistics (self)
 scans ground and builds lists of cells depending on Content More...
 
def update (self)
 updates the delayed effect of cells that have been modified More...
 
def activation (self)
 Active cells produce their effect. More...
 
def activate (self, Pos)
 Cell located at position 'Pos' has been modified and now produces its effect, possibly on neighbouring cells. More...
 
def randomPosition (self, Content=None, check=False)
 picks an element of the grid with 'Content' in it More...
 
def travel (self)
 Iteratively returns Cells of the grid. More...
 

Public Attributes

 ContentType
 
 Size
 
 Width
 
 Height
 
 Dimension
 
 Ground
 
 ActiveCells
 
 Statistics
 

Detailed Description

A 2-D square toric grid.

Definition at line 68 of file Landscape.py.

Constructor & Destructor Documentation

◆ __init__()

def Evolife.Graphics.Landscape.Landscape.__init__ (   self,
  Width = 100,
  Height = 0,
  CellType = LandCell 
)

Reimplemented in Evolife.Graphics.Landscape.Landscape_3D.

Definition at line 71 of file Landscape.py.

Member Function Documentation

◆ __getitem__()

def Evolife.Graphics.Landscape.Landscape.__getitem__ (   self,
  P 
)

Definition at line 124 of file Landscape.py.

◆ activate()

def Evolife.Graphics.Landscape.Landscape.activate (   self,
  Pos 
)

Cell located at position 'Pos' has been modified and now produces its effect, possibly on neighbouring cells.

Definition at line 198 of file Landscape.py.

◆ activation()

def Evolife.Graphics.Landscape.Landscape.activation (   self)

Active cells produce their effect.

Definition at line 192 of file Landscape.py.

◆ Admissible()

def Evolife.Graphics.Landscape.Landscape.Admissible (   self,
  Content 
)

Definition at line 87 of file Landscape.py.

◆ Cell()

def Evolife.Graphics.Landscape.Landscape.Cell (   self,
  P 
)

Definition at line 118 of file Landscape.py.

◆ Content()

def Evolife.Graphics.Landscape.Landscape.Content (   self,
  P,
  Future = False 
)

Definition at line 114 of file Landscape.py.

◆ free()

def Evolife.Graphics.Landscape.Landscape.free (   self,
  P 
)

Definition at line 126 of file Landscape.py.

◆ InspectNeighbourhood()

def Evolife.Graphics.Landscape.Landscape.InspectNeighbourhood (   self,
  Pos,
  Radius 
)

Makes statistics about local content Returns a dictionary by Content.

The center position is omitted

Definition at line 155 of file Landscape.py.

◆ Modify()

def Evolife.Graphics.Landscape.Landscape.Modify (   self,
  P,
  NewContent,
  check = False,
  Future = False 
)

Changes content at a location.

Definition at line 96 of file Landscape.py.

◆ neighbourhoodLength()

def Evolife.Graphics.Landscape.Landscape.neighbourhoodLength (   self,
  Radius = 1 
)

Definition at line 130 of file Landscape.py.

◆ neighbours()

def Evolife.Graphics.Landscape.Landscape.neighbours (   self,
  P,
  Radius = 1 
)

returns neighbouring cells

Definition at line 133 of file Landscape.py.

◆ randomPosition()

def Evolife.Graphics.Landscape.Landscape.randomPosition (   self,
  Content = None,
  check = False 
)

picks an element of the grid with 'Content' in it

Definition at line 203 of file Landscape.py.

◆ segment()

def Evolife.Graphics.Landscape.Landscape.segment (   self,
  P0,
  P1 
)

Definition at line 146 of file Landscape.py.

◆ setAdmissible()

def Evolife.Graphics.Landscape.Landscape.setAdmissible (   self,
  ContentType 
)

Definition at line 83 of file Landscape.py.

◆ statistics()

def Evolife.Graphics.Landscape.Landscape.statistics (   self)

scans ground and builds lists of cells depending on Content

Definition at line 170 of file Landscape.py.

◆ ToricConversion()

def Evolife.Graphics.Landscape.Landscape.ToricConversion (   self,
  P 
)

Definition at line 91 of file Landscape.py.

◆ travel()

def Evolife.Graphics.Landscape.Landscape.travel (   self)

Iteratively returns Cells of the grid.

Definition at line 223 of file Landscape.py.

◆ update()

def Evolife.Graphics.Landscape.Landscape.update (   self)

updates the delayed effect of cells that have been modified

Definition at line 181 of file Landscape.py.

Member Data Documentation

◆ ActiveCells

Evolife.Graphics.Landscape.Landscape.ActiveCells

Definition at line 80 of file Landscape.py.

◆ ContentType

Evolife.Graphics.Landscape.Landscape.ContentType

Definition at line 72 of file Landscape.py.

◆ Dimension

Evolife.Graphics.Landscape.Landscape.Dimension

Definition at line 77 of file Landscape.py.

◆ Ground

Evolife.Graphics.Landscape.Landscape.Ground

Definition at line 78 of file Landscape.py.

◆ Height

Evolife.Graphics.Landscape.Landscape.Height

Definition at line 75 of file Landscape.py.

◆ Size

Evolife.Graphics.Landscape.Landscape.Size

Definition at line 73 of file Landscape.py.

◆ Statistics

Evolife.Graphics.Landscape.Landscape.Statistics

Definition at line 81 of file Landscape.py.

◆ Width

Evolife.Graphics.Landscape.Landscape.Width

Definition at line 74 of file Landscape.py.


The documentation for this class was generated from the following file: