Cryptator is a cryptarithm solver using Constraint Programming.
It is based on choco-solver which is an open-source Java library for Constraint Programming.
It is described in the white paper (in French) published at the conference JFPC 2023.
Cryptarithm, or alphametic, is a type of mathematical game consisting of a mathematical equation among unknown numbers, whose digits are represented by letters of the alphabet.
- An Alphametic Page, Mike Keith - a must for alphametic lovers.
- Cryptarithms Online, Jorge A. C. B. Soares - it contains the Sphinx collection, links, books.
- Alphametic Puzzles, Truman Collins - he has solvers and even generators.
- Alphametics, Torsten Sillke - collection, variants, references, and links.
- You can also browse our collection of cryptarithms.
In the following, we distinguish two usages:
- as a standalone application: the jar file includes all required dependencies,
- as a library: the jar file excludes all dependencies.
This project works on 32 bits and 64 bits environment and requires:
- JDK 11+
- Maven 3+
This project uses the Cross-platform Maven build system.
mvn clean package
or to skip unit tests
mvn clean package -DskipTests=true
The jar file contains all required dependencies. The next step is simply to run the console application.
java -cp target/cryptator-*-with-dependencies.jar cryptator.Cryptator send+more=money
There are three console applications and the links below point to demonstration scripts.
- solve a cryptarithm with Cryptator.
- generate cryptarithms with Cryptagen (see the demo output).
- play the game with Cryptamancer.
Execute the main class without argument to display the help message.
The jar file does not contains any dependencies, as of being used as a dependency of another application. The next step is to add the jar file to your classpath of your application and also add the required dependencies.
First, you must build from source and install it into your local .m2 repository.
mvn install
Then, you only have to edit your pom.xml to declare the following library dependency:
<dependency> <groupId>fr.univ-cotedazur</groupId> <artifactId>cryptator</artifactId> <version>1.0.1-SNAPSHOT</version> </dependency>
The tests solve around 150 cryptarithms. By default, the tests are not executed by the regular maven lifecycle test execution. Indeed, their names are outside of the standard maven test runner nomenclature.
Just include it manually by feeding it as a parameter to the runner.
mvn test -Dtest=ExtensiveTesting
Please read CONTRIBUTING.md for details on our how you can become a contributor and the process for submitting pull requests to us.
This project makes use of SemVer for versioning. A list of existing versions can be found in the project’s releases.
See AUTHORS and CONTRIBUTORS files.
This project is licensed under the 3-Clause BSD License - see the LICENSE file for details.