WilliamHPNielsen / limnos

Other
0 stars 0 forks source link

Generator excludes lower-right part of the maze #3

Open petterbejo opened 3 years ago

petterbejo commented 3 years ago

After generating around 20 mazes I see a clear pattern where all trails tend to go from the lower-left to the upper-left and then to the upper-right part of the maze. The lower-right part of the maze is thus never included in the trail.

Guess this is somewhere between a bug and a feature...

jeppetrost commented 3 years ago

See if this line is any help https://github.com/WilliamHPNielsen/limnos/blob/f26589fd82e030e01ce68bf06e2cabd368225a72/limnos/generation.py#L286

WilliamHPNielsen commented 3 years ago

What I believe @jeppetrost is suggesting is that a larger number of random transforms will "smear out" the generated routes more evenly over the entire field. That's definitely true. But how large is large enough?

Another thing to do is to modify the starting solution from always going up-up-up-right-right-right to randomly snaking its way from start to end. The relevant lines are: https://github.com/WilliamHPNielsen/limnos/blob/f26589fd82e030e01ce68bf06e2cabd368225a72/limnos/generation.py#L281-L283