Skip to main content
Question

Maze generator


james_c_452
Supporter
Forum|alt.badge.img+7

Hi,
A very random question. My son has recently started to like making mazes out of Lego for marbles. I was wondering if there was a way in FME I could perhaps randomly generate a maze?
I know there are a bunch of generators on the internet, however they do not account for a cell size of 2x2, to accommodate a marble, or a wall thickness of 1. I see there is a generator on FME Hub, but it also doesn’t work because it calls a webpage that doesn’t exist anymore. So I thought perhaps I might have a go but I can’t work out a way to use any maze generation algorithms. I don’t know python, but I’m reasonably handy at desktop
If anything glaringly obvious comes to mind I’d love to hear it
Thanks

5 replies

nielsgerrits
VIP

Not wanting to kill a good idea, but when I google “lego marble maze generator” the first hit looks to be what you are asking for.


james_c_452
Supporter
Forum|alt.badge.img+7
  • Author
  • Supporter
  • June 13, 2024

Hi @nielsgerrits ,
Yes of course I saw that in Google. I wasn’t able to open it on my work computer when I posted this, but I was able to when I had a look on my computer before you replied. Seems like age old IT policy issues. However, this webpage also doesn’t quite do what I want. It has a minimum internal wall width of 2, I want to be able to set half of that. Big bricks mean an easier maze!
Sounds like this question is a non starter if there is no easy answer


jkr_wrk
Influencer
Forum|alt.badge.img+28
  • June 13, 2024

I did some maze generation in FME in the past.

I think what i did was create a grid of points and then random offset every point a bit to the west/east and north/south.

Than a neighborfinder to connect all the dots to there closest neighbor and merge all connecting lines with each other. Then I did this multiple times for every result. Connecting all the lines to all other lines.

Then use a shortest path search to find the shortest path from the start to the end of the maze. To create the maze from the lines you buffer the lines to your path width and buffer the boundingbox a bit. Then cut the maze from the boundingbox.


jkr_wrk
Influencer
Forum|alt.badge.img+28
  • June 13, 2024

My result looks a bit like this generator:

https://www.mazegenerator.net/

But then set to “As lines” before i convert the lines to a cut from the boundingbox.

And if you use that generator and buffer the lines to a kwarter of the path width you could get a pretty good lego maze to build.


mark2atsafe
Safer
Forum|alt.badge.img+43
  • Safer
  • June 13, 2024

Maybe it’s another IT issue, but the MazeGenerator transformer works for me. I don’t know how helpful it will be. My outputs look like this:

3D Curvy

 

2D Straight

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings