Skip to main content

Crate pons_dds

Crate pons_dds 

Source
Expand description

Pure-Rust double-dummy solver for contract bridge.

Reimplementation of the DDS algorithm (see the C++ vendor in ddss-sys/vendor/src/) with the same alpha-beta + transposition table + heuristic-ordered search at its core, but without the FFI / cc-crate / sanitizer-pain that the existing ddss and dds-bridge wrappers carry.

§v0.1 scope

This release ships the Solver API: a per-strain solver that produces one strain’s row of a TrickCountTable for a FullDeal, plus rayon-parallel solve_deal (single-deal) and solve_deals (batch) helpers that assemble the full 5 × 4 table, and the sequential single-thread solve_deal_on for deterministic profiling. The internal substrate (position state, move generator, search engine, transposition table, and friends) remains crate-private.

§Algorithm reference

For each ported module, the corresponding vendor C++ file is named in the module docs. The canonical reference is ddss-sys/vendor/src/ABsearch.cpp for the search, plus the supporting files documented per-module.

Re-exports§

pub use solver::Solver;
pub use solver::TrickCountTable;
pub use solver::solve_deal;
pub use solver::solve_deal_on;
pub use solver::solve_deals;

Modules§

solver
Public solver API.

Structs§

FullDeal
A full bridge deal — exactly 13 cards per hand, 52 total
SearchStats
Per-search instrumentation counters. All zero unless the crate is built with --features profiling. Two questions drive the layout — the same two that govern double-dummy speed: