Survivor Simulation for CPSC383
Project description
AEGIS
AEGIS is a survivor simulation used in CPSC 383. This repo contains:
- Server/engine (Python package) that runs simulations and exposes a WebSocket for the client
- Client (Electron, React, TypeScript, Tailwind CSS) for visualizing and controlling simulations
- Documentation site (Next.js/MDX; see
docs/README.md)
Repo Layout
src/_aegisandsrc/aegis: Python engine, CLI entrypoint, public APIclient: Electron desktop client (builds for macOS, Windows, Linux)docs: Documentation website and contentschema: Shared Protocol Buffer/TypeScript typesworlds: Sample worlds for running simulationsagents: Example/reference agents (e.g.,agent_path,agent_mas,agent_prediction)config/config.yaml: Runtime configuration for the engine
Prerequisites
- Python 3.12+
- Node.js 20+
uv(for Python env/build) —pip install uvor seehttps://docs.astral.sh/uv/
Package name (PyPI)
The Python package is published as aegis-game. Once released, you can install it with:
pip install aegis-game
The CLI entrypoint is aegis (e.g., aegis launch).
Download for usage in assignments or competitions
- Create a python project and install the
aegis-gamepackage (Any method works, will demo with uv)
# Initialize project
uv init --package my-new-project
cd my-new-project
# Add the aegis-game package as a dependency
uv add aegis-game
- Create scaffold
aegis init
This creates all necessary files/folders in your project that an aegis simulation needs to run
- Configure features
Edit config/config.yaml to enable/disable features (e.g., messages, dynamic spawning, abilities). If you change features, regenerate stubs so the API your agent recongizes matches the config:
aegis forge
- Launch a game (through the console)
# One agent
aegis launch --world ExampleWorld --agent agent_path
# Five agents with max rounds of 500 (requires config of ALLOW_CUSTOM_AGENT_COUNT=true)
aegis launch --world ExampleWorld --agent agent_path --amount 5 --rounds 500
Run aegis launch -h to see all ways you can run an aegis simulation
Notes:
- World names are the file names under
worlds/without the.worldextension. For example,worlds/ExampleWorld.world→--world ExampleWorld. - Agent names are folder names under
agents/. For example,agents/agent_path→--agent agent_path.
- Use the client UI
TODO
Download for Development
- Clone and set up Python
git clone https://github.com/CPSC-383/aegis.git
cd aegis
uv sync --group dev
# Activate the virtualenv
# macOS/Linux
source .venv/bin/activate
# Windows (PowerShell)
.\.venv\Scripts\Activate.ps1
- Run the server locally
aegis launch --world ExampleWorld --agent agent_path
- Run the client in development mode
cd client
npm ci
npm run dev
- Linting and typing (Python)
# After `uv sync --group dev`
uv run ruff check .
uv run pyright
Documentation
See docs/README.md for local development and deployment of the docs site.
Releasing
Releases are tag-driven and handled via GitHub Actions. Client and engine (Aegis) are released separately.
- Client tags:
client-v<major>.<minor>.<patch> - Aegis tags:
aegis-v<major>.<minor>.<patch>
- Client release
cd client
npm version [patch|minor|major]
git tag -a client-v<major>.<minor>.<patch> -m "Client Release <version>"
git push origin client-v<major>.<minor>.<patch>
- Aegis (Python) release
# Bump version in the Python package
hatch version [release|major|minor|patch|a|b|pre|post|dev]
git tag -a aegis-v<major>.<minor>.<patch> -m "Aegis Release <version>"
git push origin aegis-v<major>.<minor>.<patch>
After tags are pushed, the corresponding workflows will:
- Build and upload artifacts to a GitHub Release
- For Aegis, also publish to the configured Python package index (currently set to TestPyPI in the workflow)
After the workflow completes, open the created GitHub Release and add in any notes for the release if you please
Troubleshooting
- Windows PowerShell execution policy may block script activation; if needed, run PowerShell as Administrator and execute:
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
- Ensure Node.js 20+ and Python 3.12+ are on your PATH
- If the client cannot connect, verify the server was started with
--clientand that no firewall is blocking the port
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 aegis_game-2.0.0.tar.gz.
File metadata
- Download URL: aegis_game-2.0.0.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccbf8c9521655d245692f032e33018308b91b3ad0dc6a6edd3f353d2bbd91715
|
|
| MD5 |
2b6a69919afae055075aed3557cb21d8
|
|
| BLAKE2b-256 |
e327070a121ba8c4588d6eb10fc5fc5df211577ba2ce04a207e0f67d4e29af28
|
Provenance
The following attestation bundles were made for aegis_game-2.0.0.tar.gz:
Publisher:
release-aegis.yml on CPSC-383/aegis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aegis_game-2.0.0.tar.gz -
Subject digest:
ccbf8c9521655d245692f032e33018308b91b3ad0dc6a6edd3f353d2bbd91715 - Sigstore transparency entry: 371458843
- Sigstore integration time:
-
Permalink:
CPSC-383/aegis@c5b0555a3767dcfad1fc15e7d67deb393488c183 -
Branch / Tag:
refs/tags/aegis-v2.0.0rc0 - Owner: https://github.com/CPSC-383
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-aegis.yml@c5b0555a3767dcfad1fc15e7d67deb393488c183 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aegis_game-2.0.0-py3-none-any.whl.
File metadata
- Download URL: aegis_game-2.0.0-py3-none-any.whl
- Upload date:
- Size: 57.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
850ce35b05c59de7750784b935a28a127984291d85330e3dc43bc99d50b1ca1a
|
|
| MD5 |
3d9ee8d9b596e5e7fe5164c48a3fd44a
|
|
| BLAKE2b-256 |
56dce6bdefda4552002efda023756f1d5d4ec71583b5bd143c795ae9e3c85df2
|
Provenance
The following attestation bundles were made for aegis_game-2.0.0-py3-none-any.whl:
Publisher:
release-aegis.yml on CPSC-383/aegis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aegis_game-2.0.0-py3-none-any.whl -
Subject digest:
850ce35b05c59de7750784b935a28a127984291d85330e3dc43bc99d50b1ca1a - Sigstore transparency entry: 371458875
- Sigstore integration time:
-
Permalink:
CPSC-383/aegis@c5b0555a3767dcfad1fc15e7d67deb393488c183 -
Branch / Tag:
refs/tags/aegis-v2.0.0rc0 - Owner: https://github.com/CPSC-383
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-aegis.yml@c5b0555a3767dcfad1fc15e7d67deb393488c183 -
Trigger Event:
push
-
Statement type: