Skip to main content

ai_connect4/
lib.rs

1#![doc = include_str!("../README.md")]
2#![forbid(unsafe_code)]
3
4mod mv;
5mod oracle;
6mod perft;
7mod position;
8mod protocol;
9mod reference;
10mod search;
11
12#[cfg(feature = "wasm")]
13mod wasm;
14
15pub use mv::{Cell, Column, Move, MoveList};
16pub use perft::perft;
17pub use position::{GameResult, HEIGHT, MoveError, Position, Side, Undo, WIDTH};
18pub use protocol::Engine;
19pub use search::{
20    Algorithm, IterationSummary, IterativeSearchReport, RootBranch, SEARCH_PRESETS, Score,
21    ScoreKind, SearchLimits, SearchPreset, SearchReport, SearchStats, iterative_search, search,
22    search_preset,
23};
24
25/// Slow reference code and fixed oracle cases used to verify the engine.
26///
27/// These types favor obvious rules over speed and are useful for differential
28/// tests of alternative Connect Four representations.
29pub mod verification {
30    pub use crate::oracle::{ORACLE_CASES, OracleCase, OracleOutcome, probe_oracle};
31    pub use crate::perft::reference_perft;
32    pub use crate::reference::{ReferencePosition, ReferenceUndo};
33}