Skip to main content

anemone

anemone is a Python library for tree search over valanga game states. It separates structural tree storage, runtime search state, node evaluation, exploration indices, and selector/opening logic so different search policies can share one coherent runtime.

Overview

The main architectural split is:

  • structure: TreeNode and ITreeNode
  • runtime: AlgorithmNode and TreeExploration
  • evaluation: direct evaluation plus backed-up tree evaluation
  • exploration: per-node exploration-index payloads and tree-wide recomputation
  • selection: selectors and opening instructions that decide what to expand next

Installation

Anemone requires Python 3.14 or higher. CPU release validation uses standard CPython 3.14.10 (GIL enabled, PYTHON_JIT=0). Runtime dependencies use the published valanga==0.3.0; test extras use atomheart==0.3.0 and parsley-coco==0.2.0. The neural extra requires Coral 0.2.x.

Run tox --workdir /path/to/private/anemone-tox for complete validation. requirements/validation-py314.txt selects verified public foundation wheels by URL and SHA-256 for both local tox and CI.

Published distribution names:

pip install algorhino-anemone

Optional extras:

pip install algorhino-anemone[nn]
pip install algorhino-anemone[debug]

Debug snapshot export and the debug browser's SVG rendering also require the system Graphviz executable (dot).

See the 0.4.0 release notes for native prepared evaluation and bounded materialization of both sharded checkpoint layouts.

Getting started

The canonical public entry point is anemone.factory.create_search.

  • Use anemone.factory to build a runnable search runtime.
  • Treat anemone._runtime_assembly and anemone.search_factory as internal wiring layers behind that API.
  • Use TreeAndValueBranchSelector only when you want the higher-level one-shot recommendation wrapper instead of driving the runtime directly.
from random import Random

from anemone.factory import SearchArgs, create_search

# Domain-specific collaborators omitted for brevity:
# - YourStateType
# - your_dynamics
# - starting_state
# - your_evaluator
# - your_selector_args
# - your_opening_type
# - your_stopping_criterion
# - your_recommender_rule
args = SearchArgs(
    node_selector=your_selector_args,
    opening_type=your_opening_type,
    stopping_criterion=your_stopping_criterion,
    recommender_rule=your_recommender_rule,
)

runtime = create_search(
    state_type=YourStateType,
    dynamics=your_dynamics,
    starting_state=starting_state,
    args=args,
    random_generator=Random(0),
    master_state_value_evaluator=your_evaluator,
    state_representation_factory=None,
)

result = runtime.explore(Random(0))
print(result.branch_recommendation.recommended_name)

Core concepts

  • TreeNode: the concrete structural node storing state, depth, and links.
  • AlgorithmNode: the runtime wrapper that adds tree evaluation and exploration-index payloads.
  • direct_value: the immediate evaluator output for one node.
  • backed_up_value: the subtree-derived value propagated from children.
  • exploration index: optional per-node search-priority data recomputed across the tree by a configured strategy.

How it works

  • create_search(...) assembles the runtime, direct evaluator, selector factory, tree-evaluation factory, and tree manager.
  • The initial tree is created with a directly evaluated root node.
  • A selector chooses which node or branch to open next.
  • The tree manager expands the structure and creates any new runtime nodes.
  • Direct evaluation fills direct_value on newly created nodes.
  • Upward propagation recomputes backed_up_value, branch ordering, and principal variation.
  • Exploration-index payloads are refreshed for the next iteration.

Documentation

Metadata

Release files for algorhino-anemone 0.4.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 algorhino-anemone 0.4.1
File Size Uploaded Provenance Actions
algorhino_anemone-0.4.1.tar.gz 501.6 kB With provenance Details for algorhino_anemone-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for algorhino-anemone 0.4.1
File Interpreter ABI Platform Actions
algorhino_anemone-0.4.1-py3-none-any.whl Python 3 none any Details for algorhino_anemone-0.4.1-py3-none-any.whl

Total release size: 961.6 kB

Release files / algorhino_anemone-0.4.1.tar.gz

Download URL algorhino_anemone-0.4.1.tar.gz
Size 501.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9ecedfcaa8313e7d8f98e6778bdd2560a5aa89ba985e939d2898d187a9f34f3a
BLAKE2b-256 checksum
How to use checksums
dd4696c70aab74a0ab2267363d4589025d911a72bf2c62a69bd5c135fb7ad77f
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 Nov 15, 2026.

Transparency log

Release files / algorhino_anemone-0.4.1-py3-none-any.whl

Download URL algorhino_anemone-0.4.1-py3-none-any.whl
Size 460.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d8b3e984a2ba3a5f663ee5ce91f9dc9c240d5cb86011b169c63405311482185
BLAKE2b-256 checksum
How to use checksums
ed2edab1293a7cff62beb817bf762fd83e396413d452412029379b8ea8284a4e
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 Nov 15, 2026.

Transparency log

Security for algorhino-anemone 0.4.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for algorhino_anemone-0.4.1.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 Nov 15, 2026.

Transparency log

A 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files Full provenance

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