MAZE GENERATOR

 INTRODUCTION

I'm just gonna dive right into this one, So I was just reading on data structures and there exists a concept named DFS(Depth First Search)

This pretty much summarizes depth first search.

WHY?

Why am I talking about DFS. Well, one of the uses of DFS is to generate mazes of course.

I will not go into much detail about HOW this maze is generated so I went out in search of coding this out visually.

After some bits and bobs of hopping around youtube I came across this bit of code which allows you to actually generate a maze using DFS, visualize it and then try to solve it using basic js functions.

Watch me solve this normal maze..


\
Well that was really beautiful, well this would be because again this uses javascript canvas, so pygame (python library), you lose once again.

Anyway, I decided I am going to come up with something on my own for this maze generator.

Well , we already have our maze generated via DFS, I wanted to make a path finding algorithm for it.

Now since it's DFS, I could just trace out the final traversal and still get the path for the maze, but that would be too easy, so I set out, finding ways to generate more mazes and building path finding algorithms for the same.


PATH FINDING

Well I wanted to spend more time on path finding algorithms because I wanted to refine it, compare it with all the other algorithms and then come up with a good version of it, I will aim not to use javascript canvas too much because I have been relying a lot on it lately and I do not want to be addicted to it.

So, this blog is just like a intro post to the BIG path finding blog which I will be doing out sooner or later, anyway. 

I hope you had a good read, please take care.

Have a nice day...

BYE.



Comments