Skip to content

ManucianTeam/Sudoku-AI-Solver-Pro-Advanced-Constraint-Solving-Algorithm-Visualization-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧩 Sudoku AI Solver Pro

⚡ Advanced Constraint Solving • 🚀 Visualization • 🤖 AI-Powered Logic


🌟 Overview

Sudoku AI Solver Pro is an advanced system for solving Sudoku using modern AI and constraint-based techniques.

It combines:

  • 🧠 Constraint Satisfaction Problem (CSP)
  • ⚡ Heuristic Search (MRV, Degree, LCV)
  • 🔗 Arc Consistency (AC-3)
  • 💀 Dancing Links (Algorithm X)

More than a solver — a full algorithm visualization system.


🚀 Features

🔥 Core Engine

  • Backtracking Solver
  • CSP Solver (MRV + Degree + LCV)
  • AC-3 Constraint Propagation
  • DLX (Ultra-fast exact cover solver)

🎨 Interactive UI

  • Dynamic Sudoku grid
  • Real-time solving
  • Step highlighting

📊 Performance Analysis

  • Execution time
  • Steps / Backtracks
  • Algorithm comparison (CSP vs DLX)

🧠 Algorithms

Level Technique
Basic Backtracking
Intermediate MRV + Forward Checking
Advanced CSP + AC-3
💀 Expert Dancing Links (DLX)

📸 Demo

Visualization demo (placeholder)


⚙️ Installation

git clone https://github.com/ManucianTeam/sudoku-ai-solver-pro.git
cd sudoku-ai-solver-pro

pip install -r requirements.txt

▶️ Run Backend

uvicorn server:app --reload

Open:
http://127.0.0.1:8000/docs


🌐 Run Frontend

Open file:
web/index.html


🔌 API Example

POST /solve

{
  "board": [[...]],
  "algorithm": "csp"
}

Response:

{
  "success": true,
  "board": [[...]],
  "steps": 123
}

🏗️ Project Structure

sudoku-ai-solver-pro/
│
├── solver/
├── heuristics/
├── utils/
├── web/
│
├── server.py
├── pyproject.toml
├── README.md

🧪 Testing

pytest

🧠 Architecture

Frontend (JavaScript)
        ↓
FastAPI Backend
        ↓
CSP / DLX Engine

⚡ Performance Insight

  • CSP → flexible, explainable
  • DLX → extremely fast (exact cover)

Hybrid approach = speed + intelligence


🔮 Future Improvements

  • WebSocket real-time solving
  • Benchmark dashboard
  • AI explanation system
  • Mobile UI

📄 License

MIT License


⭐ Contributing

Pull requests are welcome. For major changes, open an issue first.


💡 Final Note

This project demonstrates:

  • Algorithmic thinking
  • AI problem solving
  • Full-stack integration

🚀 Built as a portfolio-grade system

About

Xây dựng một hệ thống giải Sudoku thông minh sử dụng các thuật toán Constraint Satisfaction Problem (CSP) kết hợp với Backtracking nâng cao, Heuristics và tối ưu hóa thuật toán.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors