implementation of the game & an automated solver
The classic single player game of Peg Solitaire, implemented in Rust for the browser.
This project implements an automated solver that is optimized for the constraints relevant to a WASM application: low RAM and network usage.
Additionally, the techniques that were used to implement the solver are described in a detailed report: projects.pascalsommer.ch/pegsolitaire/precomputing-pegsolitaire-paper.pdf
frontendcontains the Rust code for rendering the game as a web application.precomputecontains Rust code for computing the bloom filters and for running performance evaluations.commonis a Rust library crate containing some shared game logic code.reportcontains the typst source for the paper explaining the method.evaluationcontains some Jupyter notebooks to analyze the measurements and generate plots for the report.
Project tasks such as starting up a local dev server, testing, deploying, etc. are done via the just tool.
Make sure to first set up the .env file before deploying.
cp .env.example .env
# now edit .env in your favourite editor
just dev # starts up a local dev server
just test # runs unit tests
just deploy # builds the application and uploads it to the webserverIf you're just trying to get the application to work locally in dev mode, without having to build the bloom filters yourself, you can download the precomputed version from the server:
cd frontend/bloom-filters/
wget "https://projects.pascalsommer.ch/pegsolitaire/bloom-filters/filter_502115651_1_norm.bin"
just dev