Crate weiss_core

Crate weiss_core 

Source
Expand description

Weiss Schwarz simulator core.

§Overview

The engine advances until a decision point, then exposes a fixed action space, canonical legal actions, and deterministic replays for RL training and analysis.

§Docs

§Module map

Primary runtime modules:

  • env: Game environment and advance loop
  • legal: canonical legal action generation
  • encode: observation/action encoding and specs
  • pool: batched stepping and parallelism
  • replay: replay types and serialization

Supporting public modules:

  • config: environment/curriculum/reward configuration types
  • db: card database, ability templates/defs, and lookups
  • effects: compiled effect identifiers and payload types
  • error: common error types and diagnostics helpers
  • events: canonical event stream schema
  • fingerprint: stable hashing helpers for config/state/events
  • rules: rules metadata and policy helpers
  • state: core game-state structures
  • util: utility helpers (RNG and small infra)
  • visibility_policy: visibility/sanitization policy helpers

Re-exports§

pub use config::CurriculumConfig;
pub use config::EndConditionPolicy;
pub use config::EnvConfig;
pub use config::ErrorPolicy;
pub use config::ObservationVisibility;
pub use config::RewardConfig;
pub use config::SimultaneousLossPolicy;
pub use db::CardDb;
pub use db::CardId;
pub use env::DebugConfig;
pub use env::GameEnv;
pub use env::StepOutcome;
pub use error::ActionError;
pub use error::ConfigError;
pub use error::EnvError;
pub use error::InvariantError;
pub use error::StateError;
pub use legal::ActionDesc;
pub use legal::Decision;
pub use legal::DecisionKind;
pub use pool::BatchOutDebug;
pub use pool::BatchOutDebugBuffers;
pub use pool::BatchOutMinimal;
pub use pool::BatchOutMinimalBuffers;
pub use pool::EnvPool;

Modules§

config
Environment, reward, and curriculum configuration types.
db
Card database, ability templates/defs, and lookup helpers. Card database types, loading, and validation.
effects
Compiled effect identifiers, payloads, and replay-safe effect schemas.
encode
Observation/action encodings and schema constants. Observation/action encoding and spec helpers.
env
Core game environment and phase/interaction execution. Game environment and advance-until-decision loop.
error
Shared error types used across core, pool, and Python bindings.
events
Canonical event stream structures used by replays and debugging.
fingerprint
Stable hashing helpers for state, config, and event fingerprints.
legal
Legal action generation and decision modeling.
pool
Batched stepping/reset and parallel environment pooling. Batched environment stepping and parallelism helpers.
replay
Replay file format, IO, and supporting data structures.
rules
Rules metadata helpers and policy wiring.
state
Core game state model and turn/phase state machines.
util
Utility helpers shared across modules.
visibility_policy
Observation/replay visibility policy helpers.