magpie

Crates.iomagpie
lib.rsmagpie
version0.11.2
created_at2020-10-02 16:12:53.306553+00
updated_at2025-03-22 22:23:56.290656+00
descriptionHigh-performance Othello library built with bitboards
homepage
repositoryhttps://github.com/LimeEng/magpie/
max_upload_size
id295433
size119,232
Emil Englesson (LimeEng)

documentation

README

CI status Latest version

Magpie

Magpie logo

Magpie is a high-performance library for the classic board game Othello. It provides both a user-friendly API and a low-level interface suitable for AI engines.

Key Features

  • Built with bitboards: Uses bitboards for extremely fast board operations
  • Zero dependencies: Core functionality has no external dependencies
  • Optional Serde support: Serialization available through an optional feature flag

Furthermore, the library offers two abstraction levels:

  • Game API: Ensures rule compliance, tracks turns, and maintains board consistency
  • Board API: Provides raw board operations without validation, when performance is critical.

Installation

cargo add magpie
# If serialization with Serde is desired, activate the serde feature flag.
cargo add magpie -F serde

Examples

Examples are described here.

Curious to play? One example features a functional Othello game with a random AI opponent. Run cargo run --example human_vs_ai to start a game!

Benchmarks

Benchmarks are described here

Simply run cargo bench to run all benchmarks.

Commit count: 146

cargo fmt