Skip to main content

cosmergon-decider-tree

Rule-based tree decider for Cosmergon api-agents — deterministic, no inference, latency well under 10 ms.

Implements the Decider protocol from cosmergon-agent 0.13.0+. Branch-Logik aus docs/konzepte/konzept-default-entscheidungsbaum-api-agents.md §3 plus Pet-S165-L1-Conditional-Sequences als Schwellen-Inspiration.

Architektur

state (GameState)
   │
   ├─ persona = state.persona_type or "scientist"
   ▼
PERSONA_TREES[persona]   (list of (condition, action_fn) tuples)
   │
   ├─ first matching condition wins
   ▼
(action, params)           ← optional Compass-Modulation

Sechs Persona-Bäume (scientist / warrior / expansionist / trader / diplomat / farmer), gemeinsamer Survival-Header (critical-energy → wait, 0-fields → create_field, empty-field → place_cells block) und gemeinsamer Wachstums-Fallback (fewest-cells, wait).

Usage

from cosmergon_decider_tree import TreeDecider

decider = TreeDecider()  # no config — fully deterministic

# In runner-loop:
async with CosmergonAgent(api_key=..., base_url="https://cosmergon.com") as agent:
    while True:
        await agent.refresh_state()
        action, params = await decider.decide(agent.state)
        await agent.act(action, **params)
        await asyncio.sleep(90)

Vorteile

  • Deterministisch: identischer State → identische Action.
  • Schnell: <10 ms pro decide()-Call (lambda-evaluation, kein Modell-Load).
  • Interpretierbar: Branch-Liste ist lesbar, Debug-fähig.
  • Offline-fähig: kein LLM-Provider, kein Modell-File, läuft auf jedem ARM-Linux mit Python 3.10+.

Begrenzung

  • Lernt nicht: Cosmergon-Mechanik-Änderungen (neue Action-Klassen, geänderte Konditions-Schwellen) brechen Tree → klare Versions-Bindung an SDK + Backend-Stand.
  • Persona-Bäume teils ähnlich: Konzept §3.2 hat das adressiert, Differenzierung muss strukturiert sichtbar sein.

Tests

cd research/decider-cluster/decider-tree
pip install -e '.[dev]'
pytest -q

Metadata

Release files for cosmergon-decider-tree 2.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cosmergon-decider-tree 2.3.1
File Size Uploaded
cosmergon_decider_tree-2.3.1.tar.gz 29.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cosmergon-decider-tree 2.3.1
File Interpreter ABI Platform
cosmergon_decider_tree-2.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 54.9 kB

Release files / cosmergon_decider_tree-2.3.1.tar.gz

Download URL cosmergon_decider_tree-2.3.1.tar.gz
Size 29.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fa73f3e22d293dd630878cf78351b8c20122a5d052d5ce72bff63cd0aa8a2789
BLAKE2b-256 checksum
How to use checksums
b52f09aaf8361a36e226b2a98e0cb8f394ebe959c7db46a66b9efa3ff0830791
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 8, 2026.

Transparency log

Release files / cosmergon_decider_tree-2.3.1-py3-none-any.whl

Download URL cosmergon_decider_tree-2.3.1-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dca42d194e66ee81160bc09488bc9ba4c9c48bb0da6af7f4dbd9eec5fef95cd2
BLAKE2b-256 checksum
How to use checksums
825d45c60749856fb2243be73de17ae8d5c483b5fb7457117b4fffd5b06e03cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 8, 2026.

Transparency log

Release history Release notifications | RSS feed

2.3.8

2 release files

2.3.7

2 release files

2.3.6

2 release files

2.3.5

2 release files

2.3.4

2 release files

2.3.3

2 release files

2.3.2

2 release files

This release

2.3.1 This release

2 release files

2.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page