Thanks to visit codestin.com
Credit goes to lib.rs

1 unstable release

Uses new Rust 2024

0.1.0 Aug 31, 2025

#2 in #24

36 downloads per month

MIT license

14KB
349 lines

p24

My implementation of a 24 puzzle solver in rust. Currently, this solver stops when it finds the first solution, so it only finds 1 solution.

Installation

You can either clone the repo and run

cargo install --path .

inside the project directory, or run

cargo install p24

to install from crates.io.

Usage

In order to use this solver, please run

p24 <I1> <I2> <I3> <I4>

in the terminal, where <I1>, <I2>, <I3> and <I4> should be integers. This crate now uses i64 as the integer type, so please make sure that the inputs are valid i64s. The reason why this crate uses i64 instead of i128 is to avoid overflow when calculating the sum/product/difference/quotient between i64s, because all calculations are in fact done with i128s.

Dependencies

~1–1.5MB
~28K SLoC