Skip to content

lalitm1004/queen-sweep-old

Repository files navigation

Queen Sweep Logo

♛ QueenSweep

QueenSweep is a high-performance solver for LinkedIn's Queens, featuring a Rust-based depth first search engine, WebAssembly compilation, and a chromium extension for seamless in-browser solving.

Note

Because LinkedIn prohibits automated interaction with its platform, the Chromium extension is only supported on the QueensGame website created by samimsu

📋 Table of Contents

  1. Features
  2. Demo
  3. Architecture
  4. Project Structure
  5. Running Locally

📃 Features

  • 🚀 Blazingly Fast: Solves majority of boards in under 5 milliseconds
  • 🧠 Heuristic-Driven Search: Pluggable, configurable heuristics to aggressively prune the search space
  • 🌐 WebAssembly Runtime: Compiled from Rust for near-native execution speed directly in the browser
  • 🛰️ Integrated Browser Extension: One-click solver injected directly in to the puzzle website

👾 Demo

The chromium extension injects an Apply Solution button once it detects a valid solution for the puzzle curently displayed on the page

QueenSweep Demo GIF

🏗️ Architecture

QueenSweep Architecture

📂 Project Structure

# All major sub-directories
queen-sweep/
├── queen-sweep-benchmark/      # Core engine benchmark 
├── queen-sweep-core/           # Core rust engine
├── queen-sweep-macros/         # Procedural macros for core engine
├── queen-sweep-wasm/           # WASM bindings
└── queen-sweep-web-extension/  # Chromium extension

Each directory contains its own README with detailed information:

💻 Running Locally

Ensure the following prerequisites are available:

Installing the Chromium Extension

  1. Clone the repository
git clone https://github.com/lalitm1004/queen-sweep.git
cd queen-sweep
  1. Build the WASM module
cd queen-sweep-web-extension
npm run build:wasm
  1. Build the extension
npm i
npm run build
  1. Load in Chrome
    • Navigate to brave://extensions/ or your extension manager
    • Enable Developer mode
    • Click Load unpacked
    • Select the queen-sweep-web-extension/dist directory

Running the core engine

cd queen-sweep-core
cargo run --release --features display

Modify the intialize_state() function in main.rs to test different puzzles (samples in sample_levels module in main.rs) or heuristics (in heuristic.rs).

Performance metrics are displayed after each solve:

  • States explored
  • Time elapsed (milliseconds and microseconds)
  • Exploration rate (states/ms)

About

QueenSweep is a high-performance solver for LinkedIn's Queens, featuring a Rust-based depth first search engine, WebAssembly compilation, and a chromium extension for seamless in-browser solving

Topics

Resources

License

Stars

Watchers

Forks

Contributors