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)
Metadata
Release files for mythica 1.0.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 | |
|---|---|---|---|
| mythica-1.0.0.tar.gz | 13.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mythica-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.6 kB
Release files / mythica-1.0.0.tar.gz
| Download URL | mythica-1.0.0.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb745bbf3c6778e35aefd6bee0b6d58194b11e3703e870976a201747d987b73c
|
|
BLAKE2b-256 checksum How to use checksums |
819ef3a7058e5f6e7debe92bfff65f58a3fa79464a4cd90137c7fef0ecc222e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Release files / mythica-1.0.0-py3-none-any.whl
| Download URL | mythica-1.0.0-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c180c67f3edf3b426460496b674b6aca7392182d8735d5fa507c60dfc0e3ba4f
|
|
BLAKE2b-256 checksum How to use checksums |
b00f3f2a3444d264c5acf3a8ad72170abd61155371be3f9df9f3117fb4c30aee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|