Giter Site home page Giter Site logo

talhaahussain / maze-solving-algorithms Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.48 MB

Continuous Assessment for ECM2423 - Artificial Intelligence and Applications, set by Prof. Ayah Helal (Year 2, Semester 2). Involves the use of several search algorithms for the problem of solving mazes, as well as comparing performance and an independent extra program for generating new mazes.

License: MIT License

Python 100.00%
maze-algorithms maze-generator maze-solver

maze-solving-algorithms's Introduction

maze-solving-algorithms

Continuous Assessment for ECM2423 - Artificial Intelligence and Applications, set by Prof. Ayah Helal (Year 2, Semester 2). Involves the use of several search algorithms for the problem of solving mazes, as well as comparing performance and an independent extra program for generating new mazes.

This work received a final mark of 85/100.

Please see specification.pdf for specification.

Prerequisites

Python 3.x. Requires the libraries time, itertools and random. All of these should be installed by default.

Usage

In order to supply a maze to any maze solving algorithm provided, a valid .txt file must be used. '#' indicates a wall, and '-' indicates a space. The supplied maze must have a perimeter wall, as well as an entrance and exit (in the first and last line of the text file). bfs.py and dfs.py will reject any files with invalid formatting. maze_generator.py may be used to generate and save a valid maze. I have included some valid mazes as examples.

bfs.py, dfs.py and maze_generator.py all contain an interactive main program, from which instructions on usage and options are provided. bfs.py and dfs.py also contain analysis options, which analyse the performance of the algorithms based on direction biases, which can be used to determine the biases of a given maze.

Limitations

maze_generation.py can only be used to generate square mazes, where the width of the maze is equal to the height.

Footnote

a-star.py is not entirely my code, and is sourced and adapted from https://medium.com/@nicholas.w.swift/easy-a-star-pathfinding-7e6689c7f7b2. All credits go to the respective owners. Comments in a-star.py provide further detail.

maze_generator.py is code from a legacy project of mine, adapted to work with the formatting of this project. Comments in maze_generator.py provide further detail.

maze-solving-algorithms's People

Contributors

talhaahussain avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.