Evolife documentation

     summary     

    

******************************************************************************************
Module Evolife.Graphics.Landscape:        
=================================
This class defines a 2D square grid on which agents can move
******************************************************************************************


    **************************************************************************************
    Class LandCell:        
    ==============
    Defines what’s in one location on the ground
    **************************************************************************************

        ----------------------------------------------------------------------------------
        Method LandCell.__init__        
        ----------------------------------------------------------------------------------
        Arguments:
            . Content
            . VoidCell


        ----------------------------------------------------------------------------------
        Method LandCell.Content        
        ----------------------------------------------------------------------------------
        Arguments:
            . Future


        ----------------------------------------------------------------------------------
        Method LandCell.free        
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method LandCell.clean        
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method LandCell.setContent        
        ----------------------------------------------------------------------------------
        Arguments:
            . Content
            . Future


        ----------------------------------------------------------------------------------
        Method LandCell.activated:        
        =========================
        tells whether a cell is active
        ----------------------------------------------------------------------------------
        Arguments:
            . Future


        ----------------------------------------------------------------------------------
        Method LandCell.Update        
        ----------------------------------------------------------------------------------


    **************************************************************************************
    Class Landscape:        
    ===============
    A 2-D square toric grid
    **************************************************************************************

        ----------------------------------------------------------------------------------
        Method Landscape.__init__        
        ----------------------------------------------------------------------------------
        Arguments:
            . Width
            . Height
            . CellType


        ----------------------------------------------------------------------------------
        Method Landscape.setAdmissible        
        ----------------------------------------------------------------------------------
        Arguments:
            . ContentType


        ----------------------------------------------------------------------------------
        Method Landscape.Admissible        
        ----------------------------------------------------------------------------------
        Arguments:
            . Content


        ----------------------------------------------------------------------------------
        Method Landscape.ToricConversion        
        ----------------------------------------------------------------------------------
        Arguments:
            . P


        ----------------------------------------------------------------------------------
        Method Landscape.Modify:        
        =======================
        Changes content at a location
        ----------------------------------------------------------------------------------
        Arguments:
            . P
            . NewContent
            . check
            . Future


        ----------------------------------------------------------------------------------
        Method Landscape.Content        
        ----------------------------------------------------------------------------------
        Arguments:
            . P
            . Future


        ----------------------------------------------------------------------------------
        Method Landscape.Cell        
        ----------------------------------------------------------------------------------
        Arguments:
            . P


        ----------------------------------------------------------------------------------
        Method Landscape.free        
        ----------------------------------------------------------------------------------
        Arguments:
            . P


        ----------------------------------------------------------------------------------
        Method Landscape.neighbourhoodLength        
        ----------------------------------------------------------------------------------
        Arguments:
            . Radius


        ----------------------------------------------------------------------------------
        Method Landscape.neighbours:        
        ===========================
        returns neighbouring cells
        ----------------------------------------------------------------------------------
        Arguments:
            . P
            . Radius


        ----------------------------------------------------------------------------------
        Method Landscape.segment        
        ----------------------------------------------------------------------------------
        Arguments:
            . P0
            . P1


        ----------------------------------------------------------------------------------
        Method Landscape.InspectNeighbourhood:        
        =====================================
        Makes statistics about local content
            Returns a dictionary by Content.
            The center position is omitted
        ----------------------------------------------------------------------------------
        Arguments:
            . Pos
            . Radius


        ----------------------------------------------------------------------------------
        Method Landscape.statistics:        
        ===========================
        scans ground and builds lists of cells depending on Content
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method Landscape.update:        
        =======================
        updates the delayed effect of cells that have been modified
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method Landscape.activation:        
        ===========================
        Active cells produce their effect
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method Landscape.activate:        
        =========================
        Cell located at position ‘Pos’ has been modified and now produces its effect, possibly on neighbouring cells
        ----------------------------------------------------------------------------------
        Arguments:
            . Pos


        ----------------------------------------------------------------------------------
        Method Landscape.randomPosition:        
        ===============================
        picks an element of the grid with ‘Content’ in it
        ----------------------------------------------------------------------------------
        Arguments:
            . Content
            . check


        ----------------------------------------------------------------------------------
        Method Landscape.travel:        
        =======================
        Iteratively returns Cells of the grid
        ----------------------------------------------------------------------------------


    **************************************************************************************
    Class LandCell_3D:        inherits from Evolife.Graphics.Landscape.LandCell
    =================
    Same as LandCell, plus a third dimension
    **************************************************************************************

        ----------------------------------------------------------------------------------
        Method LandCell_3D.__init__        
        ----------------------------------------------------------------------------------
        Arguments:
            . Altitude
            . Content
            . VoidCell


    **************************************************************************************
    Class Landscape_3D:        inherits from Evolife.Graphics.Landscape.Landscape
    ==================
    Same as Landscape, but stores a third dimension in cells
    **************************************************************************************

        ----------------------------------------------------------------------------------
        Method Landscape_3D.__init__        
        ----------------------------------------------------------------------------------
        Arguments:
            . Altitudes
            . AltitudeFile
            . CellType


    

    

    Back to Evolife