Discuss Scratch

Generator98
New Scratcher
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

TheUltimatum
Scratcher
1000+ posts

Trémaux's Algorithm

This seems like it might be quite simple to implement.
gtoal
Scratcher
1000+ posts

Trémaux's Algorithm

Generator98 wrote:

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

Cool! When you get the code working, would you post it in https://scratch.mit.edu/studios/403013/ please?

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
Scratcher
1000+ posts

Trémaux's Algorithm

PS there's no benefit in posting the same question twice. You'll just bifurcate the answers.
Generator98
New Scratcher
29 posts

Trémaux's Algorithm

TheUltimatum wrote:

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
Scratcher
1000+ posts

Trémaux's Algorithm

Generator98 wrote:

TheUltimatum wrote:

This seems like it might be quite simple to implement.

Its not that easy as it seems…
Sorry I may have assumed… I could try to help you if you'd like.
gtoal
Scratcher
1000+ posts

Trémaux's Algorithm

TheUltimatum wrote:

Generator98 wrote:

TheUltimatum wrote:

This seems like it might be quite simple to implement.

Its not that easy as it seems…
Sorry I may have assumed… I could try to help you if you'd like.
it looks ideally suited to a state machine implementation…
TheUltimatum
Scratcher
1000+ posts

Trémaux's Algorithm

gtoal wrote:

TheUltimatum wrote:

Generator98 wrote:

TheUltimatum wrote:

This seems like it might be quite simple to implement.

Its not that easy as it seems…
Sorry I may have assumed… I could try to help you if you'd like.
it looks ideally suited to a state machine implementation…
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.

Powered by DjangoBB