Skip to content

chinzhening/squaredle-solver

Repository files navigation

squaredle-solver

Solves Squaredle. Written in C++ for performance.
It scrapes the board from the website, preprocesses it, then solves the board using a Trie-based backtracking algorithm.

requirements

installation

  1. Clone this repository:
git clone https://github.com/yourusername/squaredle-solver.git
cd squaredle-solver
  1. Install the dependencies: recommendation is to use a virtual environment
python -m venv venv

.\venv\Scripts\activate

pip install -r requirements.txt
  1. Build the C++ solver using CMake:

Create a build directory, run CMake, and build the project.

.\build.ps1
  1. Run tests

On Windows (Powershell):

.\test.ps1

usage

Run the python script

.\venv\Scripts\activate
python main.py

project structure

.
├── LICENSE
├── README.md
├── CMakeLists.txt
├── data
│   ├── NWL2023.txt
│   └── long_words.txt
├── main.py                # main script
├── requirements.txt
├── src
│   ├── basic_solver.cpp
│   ├── main.cpp           # entry point
│   ├── solver.h
│   ├── trie.cpp
│   ├── trie.h
│   ├── config.h
│   ├── utils.cpp
│   └── utils.h
├── test.ps1               # test script
├── test.sh
└── tests
    └── xp

About

Fun project to learn about C++ development, benchmarking, and parallelization.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors