title: Algorithm to generate a segment maze
body: <p>I want to generate a maze that looks like this:
  <img src="https://i.stack.imgur.com/Pkum6.gif" alt="alt text"></p>
  
  <p>That is, it consists of paths in one direction that are then connected. I have looked for an algorithm to generate mazes like this without success.</p>
  
  <p>Specifically, I <strong>don't</strong> want a maze like this:</p>
  
  <p><a href="https://i.stack.imgur.com/xd6ri.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xd6ri.jpg" alt="Maze"></a></p>
  
  <p>because it doesn't "run" in only one direction.</p>
  
  <p>Also, it would be nice if the solution of this maze required the player to "backtrack" -- i.e. not just move upwards all the time.</p>