https://github.com/jenson073/cryptarithmetic_puzzle
Program to solve cryptarthimetic puzzles
https://github.com/jenson073/cryptarithmetic_puzzle
ai cryptarithmetic puzzles
Last synced: 7 months ago
JSON representation
Program to solve cryptarthimetic puzzles
- Host: GitHub
- URL: https://github.com/jenson073/cryptarithmetic_puzzle
- Owner: Jenson073
- Created: 2025-03-06T18:34:32.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-03-06T18:36:17.000Z (11 months ago)
- Last Synced: 2025-03-24T04:41:40.381Z (11 months ago)
- Topics: ai, cryptarithmetic, puzzles
- Language: Python
- Homepage:
- Size: 295 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🔢 Cryptarithmetic Puzzle Solver - AI
This project solves **Cryptarithmetic puzzles** using a **brute-force approach with permutations**. Given a puzzle like `"SEND + MORE = MONEY"`, the program finds a valid digit substitution where each letter represents a unique digit (0-9). The solution is displayed in an **interactive HTML page** with a beautifully formatted table and solved equation.
---
## 📌 Features
✅ **Solves Cryptarithmetic puzzles** using brute-force search 🔍
✅ **Ensures no leading zeros** in word values 🚫0️⃣
✅ **Generates an interactive HTML file** with the solution 🌐
✅ **User-friendly table visualization** for letter-to-digit mapping 📝
✅ **Styled output with a gradient background & color-coded results 🎨**
---
## 🏗️ How It Works
1️⃣ **User inputs a cryptarithmetic equation** (e.g., `SEND + MORE = MONEY`). ✍️
2️⃣ The **program finds a valid digit substitution** for each letter using permutations. 🔢
3️⃣ The **sum of words is checked** to match the given result. ✅
4️⃣ The **solution is saved as an HTML file** for easy visualization. 🗂️
5️⃣ Open the generated **HTML file in a browser** to view the solved equation and letter mapping. 🌍
---
## 🚀 Installation & Usage
### 🔧 Requirements
Ensure you have **Python 3.x** installed. No external dependencies are needed.
---
### ▶️ Running the Program
Run the following command in a terminal or command prompt:
```bash
python cryptarithmetic_solver.py