|
Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
|
A 2-D square toric grid. More...

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 | |
A 2-D square toric grid.
Definition at line 68 of file Landscape.py.
| 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.
| def Evolife.Graphics.Landscape.Landscape.__getitem__ | ( | self, | |
| P | |||
| ) |
Definition at line 124 of file Landscape.py.
| 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.
| def Evolife.Graphics.Landscape.Landscape.activation | ( | self | ) |
Active cells produce their effect.
Definition at line 192 of file Landscape.py.
| def Evolife.Graphics.Landscape.Landscape.Admissible | ( | self, | |
| Content | |||
| ) |
Definition at line 87 of file Landscape.py.
| def Evolife.Graphics.Landscape.Landscape.Cell | ( | self, | |
| P | |||
| ) |
Definition at line 118 of file Landscape.py.
| def Evolife.Graphics.Landscape.Landscape.Content | ( | self, | |
| P, | |||
Future = False |
|||
| ) |
Definition at line 114 of file Landscape.py.
| def Evolife.Graphics.Landscape.Landscape.free | ( | self, | |
| P | |||
| ) |
Definition at line 126 of file Landscape.py.
| 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.
| 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.
| def Evolife.Graphics.Landscape.Landscape.neighbourhoodLength | ( | self, | |
Radius = 1 |
|||
| ) |
Definition at line 130 of file Landscape.py.
| def Evolife.Graphics.Landscape.Landscape.neighbours | ( | self, | |
| P, | |||
Radius = 1 |
|||
| ) |
returns neighbouring cells
Definition at line 133 of file Landscape.py.
| 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.
| def Evolife.Graphics.Landscape.Landscape.segment | ( | self, | |
| P0, | |||
| P1 | |||
| ) |
Definition at line 146 of file Landscape.py.
| def Evolife.Graphics.Landscape.Landscape.setAdmissible | ( | self, | |
| ContentType | |||
| ) |
Definition at line 83 of file Landscape.py.
| 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.
| def Evolife.Graphics.Landscape.Landscape.ToricConversion | ( | self, | |
| P | |||
| ) |
Definition at line 91 of file Landscape.py.
| def Evolife.Graphics.Landscape.Landscape.travel | ( | self | ) |
Iteratively returns Cells of the grid.
Definition at line 223 of file Landscape.py.
| 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.
| Evolife.Graphics.Landscape.Landscape.ActiveCells |
Definition at line 80 of file Landscape.py.
| Evolife.Graphics.Landscape.Landscape.ContentType |
Definition at line 72 of file Landscape.py.
| Evolife.Graphics.Landscape.Landscape.Dimension |
Definition at line 77 of file Landscape.py.
| Evolife.Graphics.Landscape.Landscape.Ground |
Definition at line 78 of file Landscape.py.
| Evolife.Graphics.Landscape.Landscape.Height |
Definition at line 75 of file Landscape.py.
| Evolife.Graphics.Landscape.Landscape.Size |
Definition at line 73 of file Landscape.py.
| Evolife.Graphics.Landscape.Landscape.Statistics |
Definition at line 81 of file Landscape.py.
| Evolife.Graphics.Landscape.Landscape.Width |
Definition at line 74 of file Landscape.py.