Skip to content

sayanbasu2006/maze-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿญ Rat in a Maze - Python Tkinter Visualizer

An interactive Python project that visually solves the classic Rat in a Maze problem using backtracking and Tkinter. This project allows users to input their own maze, watch the rat traverse it with a smooth animation, and view success or failure messages based on the path availability.


๐Ÿ“Œ Features

  • Input your own maze grid (1 for open paths, 0 for walls).
  • Start cell shown in *green, end cell in *red.
  • Solves the maze using recursion and backtracking.
  • Smooth step-by-step animation of the rat's movement in blue.
  • Responsive UI โ€” auto resizes with window changes.
  • Displays:
    • โœ… โ€œMaze Successfully Solvedโ€
    • โŒ โ€œNo Path Foundโ€ (closes automatically)

๐Ÿง  Algorithm

This project uses backtracking to explore all possible paths recursively. When a valid move is found, it continues; if blocked, it backtracks and tries alternative routes.


๐Ÿ–ผ Screenshots

Add your own screenshots here (drag and drop in GitHub or use alt syntax)


๐Ÿš€ Getting Started

Prerequisites

  • Python 3.x

Installation

git clone https://github.com/your-username/rat-in-a-maze.git
cd rat-in-a-maze

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages