Skip to content

About

A browser-based Sudoku puzzle solver that automatically completes any valid Sudoku board using a backtracking algorithm. Created as a fun project to explore algorithm design, problem-solving, and front-end development.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Sudoku Solver - Algorithm Visualization

A real-time visualization tool that demonstrates multiple Sudoku solving algorithms working simultaneously. Watch as different algorithms solve the same puzzle step-by-step with live progress tracking, timing, and performance comparisons.

🚀 Features

  • Real-time Algorithm Visualization - Watch 6 different algorithms solve puzzles simultaneously
  • Step-by-step Progress - See exactly how each algorithm works through the puzzle
  • Performance Tracking - Compare completion times and rankings
  • Interactive Controls - Play, pause, reset, and adjust speed for all algorithms
  • Beautiful UI - Modern, responsive design with smooth animations
  • Puzzle Input - Manual entry or file upload support

🎯 Algorithms Included

  • Backtracking - Classic recursive approach with trial-and-error
  • Constraint Propagation - Rule-based solving with single candidate filling
  • Dancing Links - Donald Knuth's Algorithm X implementation
  • Possibility Sort - Heuristic-based cell selection
  • Heuristic Backtracking - Smart backtracking with intelligent cell selection
  • Brute Force - Exhaustive search approach

🛠️ Technology Stack

  • Frontend: Angular 17, TypeScript, Tailwind CSS
  • Backend: .NET 8, C#, ASP.NET Core
  • Containerization: Docker, Docker Compose
  • Development: Hot reloading, real-time updates

🏃‍♂️ Quick Start

Prerequisites

  • Docker Desktop
  • Git

Running the Application

  1. Clone the repository

    git clone <repository-url>
    cd SudokuSolver
  2. Navigate to Docker directory

    cd docker
  3. Build and run

    .\build-and-run.ps1 -Build -Run
  4. Access the application

📖 Usage

  1. Enter a puzzle - Use the Sudoku board to input your puzzle
  2. Load from file - Upload a puzzle file (CSV format)
  3. Select algorithm - Choose a single algorithm or compare all
  4. Watch visualization - See real-time algorithm solving with step-by-step progress
  5. Compare results - View completion times and rankings

🎮 Controls

  • Play All - Start all algorithms simultaneously
  • Pause All - Stop all animations
  • Reset All - Return all algorithms to start
  • Speed Control - Adjust animation speed (0.5x to 5x)
  • Individual Controls - Control each algorithm separately

📁 Project Structure

SudokuSolver/
├── docker/                    # Docker configuration
│   ├── build-and-run.ps1     # PowerShell build script
│   ├── docker-compose.yml    # Service definitions
│   └── Dockerfile.*          # Container configurations
├── sudoku-ui/                # Angular frontend
│   ├── src/app/
│   │   ├── components/       # UI components
│   │   ├── services/         # Data services
│   │   └── app.module.ts     # Main module
│   └── package.json
└── SudokuSolver.API/         # .NET backend
    ├── Controllers/          # API endpoints
    ├── Services/             # Business logic
    └── Program.cs           # Application entry

🔧 Development

Frontend Development

cd sudoku-ui
npm install
npm start

Backend Development

cd SudokuSolver.API
dotnet run

Docker Development

cd docker
.\build-and-run.ps1 -Build -Run

📝 License

MIT License - see LICENSE file for details

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📞 Support

For issues and questions, please open an issue on the repository.


Built with ❤️ using Angular, .NET, and Docker

About

A browser-based Sudoku puzzle solver that automatically completes any valid Sudoku board using a backtracking algorithm. Created as a fun project to explore algorithm design, problem-solving, and front-end development.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages