Skip to main content

Cell class for Cellular Automata

https://test.pypi.org/project/cellular-automata-class/

Installation

pip install cellular-automata-class

Usage

Import the class as:

from cellular_automata_class import cell

It can be used to set up a lattice:

def set_lattice(length, choice):
    '''
    Given the choice of lattice pattern, sets a 2 dimensional, finite lattice,
    digits of which store a cell each
    '''

    lattice = []
    for n in range(length):
        lattice.append([])

    for x in range(length):
        for y in range(length):
            lattice[x] += [Cell(1,x,y) if x == math.floor(length/2) else Cell(0,x,y)]

    return lattice

In order to "play" the lattice, we need to iterate through the whole lattice calling cell.evaluate() method:

def play(lattice, evaluation_count):

    for n in range(evaluation_count): 
        lattice_copy = copy.deepcopy(lattice)
        for x in lattice:
            for y in x:
                y.evaluate(lattice_copy)

The class can be expanded in various ways. E.g. we can add stochastic element to it, we can add new neighborhood types, etc.

Troubleshooting

Contribute

References

Metadata

Release files for cellular-automata-class 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cellular-automata-class 0.0.4
File Size Uploaded Provenance
cellular_automata_class-0.0.4.tar.gz 3.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cellular-automata-class 0.0.4
File Interpreter ABI Platform
cellular_automata_class-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 8.0 kB

Release files / cellular_automata_class-0.0.4.tar.gz

Download URL cellular_automata_class-0.0.4.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2947968a94b5ac33bb782083413284084280558ec28b5489cde6344438abb1e0
BLAKE2b-256 checksum
How to use checksums
2ca5f88fea67deee3dcdac4385ce1eb3c25937efbdfcb6b96d597e99ca75c1c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Release files / cellular_automata_class-0.0.4-py3-none-any.whl

Download URL cellular_automata_class-0.0.4-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f54ebe4a86e07b581ce14abe265dfe6d7f2a09b934b77ce618c942b2000e6e7d
BLAKE2b-256 checksum
How to use checksums
a71ff028790812b478229bcb38fa7307aa01e041ef95436f5fe954508f6db086
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Security for cellular-automata-class 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page