8000 GitHub - quang14github/ruse-ai-task1: A Python implementation of a maze-solving algorithm for a mouse to find a piece of cheese.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

quang14github/ruse-ai-task1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Mouse and Cheese in a Maze

This project is a Python implementation of a maze-solving algorithm for a mouse to find a piece of cheese. The goal is to find the shortest path possible for the mouse to reach the cheese.

Getting Started

To run the code, follow these steps:

  1. Clone the repository:

    git clone https://github.com/quang14github/ruse-ai-task1
  2. Navigate to the project directory:

    cd ruse-ai-task1
  3. Make sure that you have Python and pip:

    python --version

    or

    python3 --version

    and

    pip --version

    or

    pip3 --version
  4. Install matplotlib library:

    pip install matplotlib
  5. Run the main.py script:

    python main.py

Algorithm

The algorithm used in this project is a modified version of the breadth-first search (BFS) algorithm. It explores all possible paths from the starting point (mouse) to the destination (cheese) in a maze.

Usage

  1. Modify the matrix variable to represent your maze. The maze should be a rectangular grid, where each character represents a cell. Use the following symbols:
  • 1: Wall (impassable)
  • 0: Path (passable)
  1. Modify the start and destination:
  • start = (3,0)
  • dest = (3,3)

About

A Python implementation of a maze-solving algorithm for a mouse to find a piece of cheese.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0