Skip to content
← Back to Community
Pathfinder II
Profile icon
h
has Hacker Plan
kaldisberzins

An improved version of my first path finding algorithm. This time it notes down each intersection and makes a choice there. If it later runs into a dead end it will jump back to that intersection and make a different choice. The dead end paths are marked in blue. The red path is the way to the end. It also will first pick a way that leads down because the end is at the bottom. Only if that is a dead end will it chose anther. I also switched out the maze for something a lot bigger because it would solve the smaller maze so fast that you did not get to see it. I recommend you open it in a new tab to see the whole maze. I hope you like it! Post any recommendations in the comments.

Voters
Profile icon
AbbasJamali
Profile icon
BestBerry
Profile icon
Dededecent
Profile icon
GrantKeo
Profile icon
Nanowrimoijk
Profile icon
SecretMom
Profile icon
Babbel
Profile icon
OmniShift
Profile icon
CONNORAHRENS
Profile icon
SuryanshSingh
Comments
hotnewtop
Profile icon
kaldisberzins

Just timed it, it takes 2min and 22sec to complete the entire thing. With a pen and paper this could take you an hour.

Profile icon
tommydagun4

this sucks it kept my attention and left me deeply unsatisfied

Profile icon
kaldisberzins

@tommydagun4 what left you unsatisfied?

Profile icon
shadowelite7

this is so cool, I would like to have something similar to this for my own screensaver

Profile icon
Reader8765

This is awesome! The biggest problem is that the Pathfinder is going back into areas it has already surrounded. It needs to learn to take more types of turns.

Profile icon
kaldisberzins

@Reader8765 yeah, there is a problem with that.

Profile icon
BestBerry

@Reader8765 Also, when I zoomed out and/or changed tabs, this happened:

This file cannot be displayed: https://storage.googleapis.com/replit/images/1544059202064_e35d52309e2ed192f7fd1b8812a77b24.pn

Profile icon
XavierDD

It seems to very for time for me because I close the tab then reopen the pathfinder and it takes a different route some times. It gets longer or shorter depending on the route.

Profile icon
kaldisberzins

@XavierDD really? I made it so that it would always take a certain direction first so I assumed that it would take the same path every time. Hmm, wierd.

Profile icon
XavierDD

@kaldisberzins not always programs work in differant ways in diffrent operating systems and browsers.

Profile icon
kaldisberzins

@XavierDD you may be right, arrays though should have a resonably universal behavior. Maybe it is something else.

Profile icon
BestBerry

@XavierDD I found that happening for me, too. Also, if I zoom out, the program runs faster.

Profile icon
ChandlerMorell

This is insane! Congratulations! Is there any way you could add a timer??

Profile icon
kaldisberzins

@ChandlerMorell i can and will add one but at this stage where there is only one maze it will always have the same time - 2:22.

Profile icon
ChandlerMorell

@kaldisberzins Great! Yeah, that's true. Maybe you could a make an algorithm for a random maze? A new one each time.

Profile icon
kaldisberzins

@ChandlerMorell an improvement I could make. If I have the time I could do something like that. Right now i can't but later I might make a new version of pathfinder.

Profile icon
ChandlerMorell

@kaldisberzins I'm very intrigued, and I'd be happy to see it!

Profile icon
kaldisberzins

@ChandlerMorell currently I am writing up a tutorial fot the competition. I might get around to another pathfinder after that.

Profile icon
ChandlerMorell

@kaldisberzins Awesome! Good luck! Could you check out my tutorial? No where near as cool as yours though!

Profile icon
kaldisberzins
Profile icon
ChandlerMorell

@kaldisberzins I'll definitely check it out!

Profile icon
nsedler

This is so cool! I like how it changes the color to blue once it rules out that's not a correct path.

Profile icon
kaldisberzins

@894238 thanks for the review!

Profile icon
XavierDD

A__mazing__ work!

Profile icon
kaldisberzins

@XavierDD thanks