Lattice gas automata implemented in Python.
Project description
Lattice Gas Cellular Automata
This project focuses on the declarative implementation of the popular Lattice Gas Cellular Automata listed below. Models with checked names are implemented and ready to use.
- HPP
- FHP I
- FHP II
- FHP III
Currently, all the models are fully implemented, so feel free to test them.
Application GUI
Application window when the following commands were called:
lgca --model-name=HPP --pattern=wiki --steps=640 --run
lgca --model-name=FHPII --pattern=obstacle --steps=250 --run
Installation
Install using pip (creating a Python virtual environment first is strongly recommended).
pip install lgca
Usage
To get some information about the application just run:
lgca --help
and You should see something like below.
pygame 2.5.2 (SDL 2.28.3, Python 3.12.7)
Hello from the pygame community. https://www.pygame.org/contribute.html
Usage: lgca [OPTIONS]
Lattice Gas Cellular Automata [X] HPP [X] FHP I [X] FHP II [ ] FHP III
Options:
-v, --value INTEGER RANGE Content value. [default: 0; 0<=x<=255]
-n, --model-name [HPP|FHPI|FHPII|FHPIII|hpp|fhpi|fhpii|fhpiii]
Model name. [default: HPP]
-w, --width INTEGER Lattice window width. [default: 300]
-h, --height INTEGER Lattice window height. [default: 200]
-s, --steps INTEGER Number of steps. [default: -1]
-r, --run Run immediately.
-d, --deterministic Generate the same randomized result for the
same params. [default: True]
-p, --pattern [wiki|random|alt|single|obstacle|test]
Select initial state pattern. [default:
wiki]
--help Show this message and exit.
So the sample usage can look like this
lgca --run
The above command should display the HPP model visualization, identical to the one on Wikipedia.
https://en.wikipedia.org/wiki/HPP_model
- To start/stop the application just press the space button.
- To reset app to the initial state press the S button.
- To quit the app pres ESC button or quit the window.
Status
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lgca-0.1.8.tar.gz.
File metadata
- Download URL: lgca-0.1.8.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93a9defd829572f9690a94212679b4aee4e439fcedf60cb146bfc2c97d42b566
|
|
| MD5 |
465984aebf7faa1564a9bbb65632276f
|
|
| BLAKE2b-256 |
c417bc851a015ee604eae4e85d0d479a22775ac328a750820a1ec377253353e6
|
Provenance
The following attestation bundles were made for lgca-0.1.8.tar.gz:
Publisher:
python-publish.yml on siciarek/lgca
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lgca-0.1.8.tar.gz -
Subject digest:
93a9defd829572f9690a94212679b4aee4e439fcedf60cb146bfc2c97d42b566 - Sigstore transparency entry: 157462334
- Sigstore integration time:
-
Permalink:
siciarek/lgca@4d12794a76db84baccb906d7a98ef89f2943600d -
Branch / Tag:
refs/tags/0.1.8 - Owner: https://github.com/siciarek
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4d12794a76db84baccb906d7a98ef89f2943600d -
Trigger Event:
release
-
Statement type:
File details
Details for the file lgca-0.1.8-py3-none-any.whl.
File metadata
- Download URL: lgca-0.1.8-py3-none-any.whl
- Upload date:
- Size: 47.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61cd6d5851fb5de94712bf029dbb5e63a6f37dd781ce65c8133a18f35dda4497
|
|
| MD5 |
f447323606a4b3d49378705e0a5265bd
|
|
| BLAKE2b-256 |
897b6be64e3764f1410499b0c01a38013c9368388620cb6b114d6510c8a28590
|
Provenance
The following attestation bundles were made for lgca-0.1.8-py3-none-any.whl:
Publisher:
python-publish.yml on siciarek/lgca
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lgca-0.1.8-py3-none-any.whl -
Subject digest:
61cd6d5851fb5de94712bf029dbb5e63a6f37dd781ce65c8133a18f35dda4497 - Sigstore transparency entry: 157462336
- Sigstore integration time:
-
Permalink:
siciarek/lgca@4d12794a76db84baccb906d7a98ef89f2943600d -
Branch / Tag:
refs/tags/0.1.8 - Owner: https://github.com/siciarek
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4d12794a76db84baccb906d7a98ef89f2943600d -
Trigger Event:
release
-
Statement type: