Lib for Simulation of fantasy ecosystems
Project description
Mythica
Mythica: is a library to create and simulate fantasy-like ecosystems. Allows creatures to interact in turn-based seasons or battles. These creatures can mutate, breed or kill eachother.
Caracteristics
-
Creatures: Has Genes that decide its stats and abilities to use in an "act".
-
Abilities: Actions that can be a simple tackle or even summon a tsunami, it depends on effect and the context.
-
Ecosystems: A "world" where the creatures can coexist or not
-
Logger: Registry of the turns and actions of the creature in an ecosystem.
-
Load of Abilities: Can be created from a class or a yaml file.
-
Catalog: Predefined examples of "Abilities", "Effects" and "Creatures"
Example
from mythica.core import BaseEcosystem
from mythica.catalog import ABILITIES, CREATURES
fire_ball = ABILITIES["fire_ball"]
extreme_speed = ABILITIES["extreme_speed"]
tsunami = ABILITIES["tsunami"]
tackle = ABILITIES["tackle"]
creature_1 = CREATURES["dinosaur"]
creature_2 = CREATURES["bird"]
creature_3 = CREATURES["alien"]
ecosystem = BaseEcosystem(
name = "Example Eco",
seed = 2025,
creatures = [
creature_1,
creature_2,
creature_3
]
)
ecosystem.simulate_season(
seasons = 10,
turns_for_season = 5
)
for message in ecosystem.logger.get_log():
print(message)
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 mythica-1.0.0.tar.gz.
File metadata
- Download URL: mythica-1.0.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb745bbf3c6778e35aefd6bee0b6d58194b11e3703e870976a201747d987b73c
|
|
| MD5 |
2634543f3b084cdff79059a1d429654b
|
|
| BLAKE2b-256 |
819ef3a7058e5f6e7debe92bfff65f58a3fa79464a4cd90137c7fef0ecc222e6
|
File details
Details for the file mythica-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mythica-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c180c67f3edf3b426460496b674b6aca7392182d8735d5fa507c60dfc0e3ba4f
|
|
| MD5 |
22689e63d43b9ac3b229dbbd548232eb
|
|
| BLAKE2b-256 |
b00f3f2a3444d264c5acf3a8ad72170abd61155371be3f9df9f3117fb4c30aee
|