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
- Docs hub: https://github.com/victorwp288/weiss-schwarz-simulator/blob/main/docs/README.md
- RL contract: https://github.com/victorwp288/weiss-schwarz-simulator/blob/main/docs/rl_contract.md
- Encodings: https://github.com/victorwp288/weiss-schwarz-simulator/blob/main/docs/encodings.md
- Replays & determinism: https://github.com/victorwp288/weiss-schwarz-simulator/blob/main/docs/replays_determinism.md
§Module map
Primary runtime modules:
env: Game environment and advance looplegal: canonical legal action generationencode: observation/action encoding and specspool: batched stepping and parallelismreplay: replay types and serialization
Supporting public modules:
config: environment/curriculum/reward configuration typesdb: card database, ability templates/defs, and lookupseffects: compiled effect identifiers and payload typeserror: common error types and diagnostics helpersevents: canonical event stream schemafingerprint: stable hashing helpers for config/state/eventsrules: rules metadata and policy helpersstate: core game-state structuresutil: 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.