Share your repls and programming experiences

← Back to all posts
Simple maze-solver.
KalleSjoholm1 (36)

A simple program for solving mazes. I added a mini-map in the bottom corner for fun, and it shows travelled path, and marks intersections that does not lead anywhere in yellow. When it finds the goal it will show the final path, and display bad intersections in red and good ones in green.

Commentshotnewtop
DynamicSquid (2673)

When the teacher asks me a question

My brain:

WernerPfennig (2)

@DynamicSquid its my brain guessing and checking answers to 1+1

JosephSanthosh (571)

wow , nice dude. Looks just like my hair!

KalleSjoholm1 (36)

@JosephSanthosh You must have some fabulous hair my guy, congratulations!

JosephSanthosh (571)

thanks dude, sometimes i wonder what i am! @KalleSjoholm1

Warhawk947 (523)

Legend makes complicated maze solver and calls it simple

Ardin16 (6)

awesome job!

will you be making this applicable to games and other things?

KalleSjoholm1 (36)

@Ardin16 Thanks! It would be fun to find some more applikations for it, but we'll see. I'm considering making something for converting images of mazes to solvable mazes for this program, so I'll probably do that first.

Ardin16 (6)

that sounds good, plus it'll give you a base for making other applications, good [email protected]

RayvelArjoon (81)

That's pretty cool! I'm just not a fan of pygame because of how laggy and annoying to use it can be sometimes; but good job!

WernerPfennig (2)

Wow, great! Keep it up

EdwardKazmiersk (5)

Wow nice job! its so fun just watching it! :P

christinefries (2)

wow this is very nice!! great job on the work.

FlameFeather78 (10)

Wow. It is really good!

Programmer567 (46)

this is so awesome that awesome looses its definition and it becomes "KalleSjoholm: Maze-Solver"

KalleSjoholm1 (36)

@Programmer567 Haha, this comment made my day!Thank you so much!

adl212 (119)

My jaw falls quickly. As I try to close it, there is so much pain I must stop!

Barry123 (53)

Cool! Just like spaghetti

studentAlfredAl (451)

Wow, good job! Keep up the great work :D
(also, please nobody upvote this comment. If you do, you will get a deathnote. I want to make a 420 cycle special)

MachineLearner1 (3)

man my computer kind of spazzed out at the end, kind of went insane. Jokes aside, amazing program! Did you use any kind of Machine Learning?

KalleSjoholm1 (36)

@MachineLearner1 Unfortunately it runs a little slow and weird here on Repl, it is much faster if you run it locally. Thanks! Not really, or not intentionally anyways, haha.

MachineLearner1 (3)

@KalleSjoholm1 No worries! It is still great, you are pretty good at python! You know, according to my name, you probably know why I asked about machine learning lol

KalleSjoholm1 (36)

@MachineLearner1 Thank you! I am definitely no expert, by I try to keep learning consistently. Yes, your username checks out!

CodingRobot12 (189)

This is an epic maze solver! Do you want this to be in my upcoming search engine?

firefish (308)

@CodingRobot12 why is your search engine written in python surely you can think of a better language. anyone who codes inn python is untrustworthy

CodingRobot12 (189)

um because I think I am better than python? Anyways, my first search engine version is out and you can see it if you want to @johnstev111

mkhoi (286)

Wow this is nice!

KalleSjoholm1 (36)

@mkhoi Thanks, I appreciate it!

Jackbaklava (16)

This is actually epic! Next Gen Pathfinder

thenullified (145)

nice. very nice i like seeing ai learning

ChristoferK (9)

@thenullified Is it learning ? I didn't see any indication this was A.I.-resembling. I only skimmed the code quickly, and couldn't see anything unusual about it's algorithm that jumps out at me to suggest that the next time it runs the algorithm, it'll do it better than the first. But like I said, it was a skim so might have missed a key block. If this is self-learning, that would be amazing.

KalleSjoholm1 (36)

@ChristoferK I guess the simple answer to this question is no. By the end of the run, it has in a way learned a route from start to finsih, and it has learned which intersections in the maze that do not lead anywhere. It does however not carry any of that into the next time you run it. But if you want to run it through a bunch of different mazes, remembering the best path for the previous one really wouldn't help much since every maze should be different. Hope that answers your question.