Giter Site home page Giter Site logo

erralb / maze-solving-and-generating Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lorem-ipsumm/maze-solving-and-generating

0.0 2.0 0.0 7.72 MB

This is a program I've created that generates and solves mazes using DFS and Randomized Prim's Algorithm

JavaScript 100.00%

maze-solving-and-generating's Introduction

Maze-Solving-and-Generating

This is a program I've created that generates and solves mazes using DFS and Randomized Prim's Algorithm!

After watching one numberphile video on maze solving I decided to jump in and make my own with no prior experience with mazes or algorithms. My first attempt at making a maze solver only worked in extremely specific situation so I had to do some research and look into how these kinds of things are implemented. That's when I came across DFS (Depth First Search) and Recursive Backtracking. It wasn't too long until I was able to get a basic version of that running. After it solved my small 5x5 maze that I made in GIMP I tried making some more mazes by hand, and after a while that because very tedious so I decided to look into maze generation. My first attempt was to just jump right in again with my new found knowledge of DFS. That failed miserably, but it wasn't long until I found out about Randomized Prim's Algorithm. I saw several algorithms, but this one seemed to fit my needs the most. It took quite a bit for me to get it up and running, but eventually it all came together. This is the final product!:

alt tag

For image manipulation I used Jimp, so I could create images and read individual pixels. Other than that the code was purely javascript(node to be specific)

Algorithms Page: https://en.wikipedia.org/wiki/Maze_generation_algorithm

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.