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

Release 0.3.0 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).

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

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.3.0
File Size Uploaded Provenance Actions
algorhino_anemone-0.3.0.tar.gz 461.9 kB With provenance Details for algorhino_anemone-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 896.2 kB

Release files / algorhino_anemone-0.3.0.tar.gz

Download URL algorhino_anemone-0.3.0.tar.gz
Size 461.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ffc0b2d751a936e4fd5cacca6b831151c17877810ec6934b99d80799b2d49c1d
BLAKE2b-256 checksum
How to use checksums
f80f4061ec20b1d93d13249398c0ac498e84f76e6f3afdd90652ad1ed1f4c053
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 Oct 27, 2026.

Transparency log

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

Download URL algorhino_anemone-0.3.0-py3-none-any.whl
Size 434.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8dd5e215fcbb7c75b9524fc9d058cbb8fe1eccfc071e21b9d29f0bb00fbd6063
BLAKE2b-256 checksum
How to use checksums
5a15f849fd76a207133721063c7abdde20cadfcb22ef687d425c5f96b3a548b4
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 Oct 27, 2026.

Transparency log

Security for algorhino-anemone 0.3.0

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.3.0.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 Oct 27, 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.3.0 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