Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Trémaux's Algorithm
- Generator98
-
29 posts
Trémaux's Algorithm
Hello community,
I am currently working on Scratch project to solve mazes. To solve them I am planning to use the Trémaux's Algorithm. I know there are other algorithms which are easier to code, but I already coded them in Scratch like the Wall Follower or the Pledge Algorithm. Problem with this Algorithm is that it is not memory Free and I dont know how to code it.
I am not asking for the perfect solution, just for help like how to start or how to think.
Thank you for your help
Kind regards,
Generator98
I am currently working on Scratch project to solve mazes. To solve them I am planning to use the Trémaux's Algorithm. I know there are other algorithms which are easier to code, but I already coded them in Scratch like the Wall Follower or the Pledge Algorithm. Problem with this Algorithm is that it is not memory Free and I dont know how to code it.
I am not asking for the perfect solution, just for help like how to start or how to think.
Thank you for your help
Kind regards,
Generator98
- TheUltimatum
-
1000+ posts
Trémaux's Algorithm
This seems like it might be quite simple to implement. 

- gtoal
-
1000+ posts
Trémaux's Algorithm
Cool! When you get the code working, would you post it in Hello community,https://scratch.mit.edu/studios/403013/ please?
I am currently working on Scratch project to solve mazes. To solve them I am planning to use the Trémaux's Algorithm. I know there are other algorithms which are easier to code, but I already coded them in Scratch like the Wall Follower or the Pledge Algorithm. Problem with this Algorithm is that it is not memory Free and I dont know how to code it.
I am not asking for the perfect solution, just for help like how to start or how to think.
Thank you for your help
Kind regards,
Generator98
btw you'll find plenty of maze generators in there which create a data structure array that you'll be able to use as input to solve…
G
- gtoal
-
1000+ posts
Trémaux's Algorithm
PS there's no benefit in posting the same question twice. You'll just bifurcate the answers.
- Generator98
-
29 posts
Trémaux's Algorithm
This seems like it might be quite simple to implement.
Its not that easy as it seems…
Last edited by Generator98 (July 24, 2017 16:24:55)
- TheUltimatum
-
1000+ posts
Trémaux's Algorithm
Sorry I may have assumed… I could try to help you if you'd like.This seems like it might be quite simple to implement.
Its not that easy as it seems…
- TheUltimatum
-
1000+ posts
Trémaux's Algorithm
That would work… I was thinking of using an array to represent the map and then mark specific parts with numbers to represent the flags that it describes.it looks ideally suited to a state machine implementation…Sorry I may have assumed… I could try to help you if you'd like.This seems like it might be quite simple to implement.
Its not that easy as it seems…
- Discussion Forums
- » Help with Scripts
-
» Trémaux's Algorithm