Polis Genesis
An autonomous town simulation where artificial life meets a living 3D world.
Overview
Polis Genesis is a real-time, 3D town simulation built around autonomous agents. Each resident has its own genome, needs, moods, memories, relationships, and a neural-network-driven mind.
Residents make decisions, work, interact, form families, and participate in an evolving virtual society. Rather than relying entirely on scripted events, the simulation brings together individual behavior and interconnected systems to explore how a virtual society develops.
Try the hosted viewer without installing anything:
Features
- Autonomous agents --- neural-network-driven behavior that learns from experience.
- Needs and daily life --- food, water, sleep, work, social interaction, and other needs shape decisions.
- Economy --- jobs, salaries, housing, taxes, and a shared town treasury.
- Families and genealogy --- relationships, children, genetic inheritance, and mutation.
- Law and order --- crime, police, courts, fines, and prisons.
- Dynamic environment --- day/night transitions, seasonal lighting, waterways, fountains, and ambient sound.
- Interactive 3D viewer --- a browser-based world built with Three.js and Vite.
- Python CLI --- console, server, and web commands for interacting with the simulation.
- Snapshots and analytics --- JSON exports, statistical reports, and replay functionality.
Getting Started
Try it online
Open the live demo:
https://eyadstein.github.io/polis-genesis/
Install the Python package
pip install polis-genesis
Run the simulation
Start the console interface:
polis-genesis console
Start the local server:
polis-genesis serve
Open the local viewer address printed by the server. Depending on the
configuration, it may be available at
http://localhost:8787/world.html.
Launch web mode:
polis-genesis web
Build from Source
Prerequisites
- Rust and Cargo
- Node.js and npm
- Python for Python tooling
Run the simulation
From the repository root:
cargo run --release -p polis_cli -- 1 3000 200
Start the 3D viewer
cd viewer
npm ci
npm run dev
Vite prints the local development URL in the terminal.
Build the production viewer
From the viewer directory:
npm run build
The generated static site is written to viewer/dist. GitHub Actions
builds and deploys the viewer to GitHub Pages.
Technology Stack
Component Technology
Simulation engine Rust 3D rendering Three.js Front-end tooling Vite Python interface Python Continuous integration GitHub Actions Demo hosting GitHub Pages
Roadmap
- Core engine, genomes, needs, moods, and movement
- Economy, jobs, and housing
- Relationships, children, and inheritance
- Memory and social interaction
- Law enforcement and justice systems
- Schools, belief systems, culture, and sports
- Expanded survival mechanics and emergent epochs
- Enhanced observation, replay, and analytics
Documentation
Contributing
Contributions, bug reports, and ideas are welcome.
- Fork the repository.
- Create a branch for your changes.
- Implement your changes and add tests where appropriate.
- Run the relevant checks.
- Submit a pull request describing your changes.
Run the Rust checks:
cargo test --workspace --all-features --locked
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
For viewer changes:
cd viewer
npm ci
npm test
npm run build
License
Distributed under the MIT License.
Explore the world. Observe the agents. Watch the town evolve.
Metadata
Release files for polis-genesis 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| polis_genesis-0.2.0.tar.gz | 6.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| polis_genesis-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.9 kB
Release files / polis_genesis-0.2.0.tar.gz
| Download URL | polis_genesis-0.2.0.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e69a296ff47fc0e8f645a499cb8dbfb64629b7c4463ac1f3de7038394561ced
|
|
BLAKE2b-256 checksum How to use checksums |
ed84fdc59f3c934f3629038d7fc0e6ff289b0dd343765eca7c4e04aded333485
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logRelease files / polis_genesis-0.2.0-py3-none-any.whl
| Download URL | polis_genesis-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
859a6e3f058c6d02fb0799a048a4b06083835a2b2f1efa9884c2ae49cdb2e0e0
|
|
BLAKE2b-256 checksum How to use checksums |
3574571f0a18126df894554d2a06c06a7014b2e3676e470f143565bcadbe2ec1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logSecurity for polis-genesis 0.2.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for polis_genesis-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logA 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.