MazeGenerator

Module that implements a depth-first method that generates a perfect maze. A partfect maze is one with exactly one path between any two locations in the maze. The maze is randomly generated. use -z# at the command line with different numbers for # to get different mazes each time.

Example XML definition

A simple example

  <module
      class = "MazeGenerator"
      name = "MazeGenerator"
      height = "2"
      width = "2"
  />

Parameters

NameDescriptionTypeDefault
classThe class name for the module; must be "MazeGenerator".string
nameThe name of this instance of the module.string
sizeThe size of the maze. The actual matrix width and height will depend on the type of mazeint8
typeThe size of the maze. The actual matrix width and height will depend on the type of mazechoices:
perfect
l-maze
t-maze

0
regenerateWhen to regenerate the maze in ticks (0 = never)int0

Module Connections

Outputs

NameDescription
OUTPUTThe generated maze

Author

Christian Balkenius
christian.balkenius@lucs.lu.se
Lund University Cognitive Science

Files

MazeGenerator.h
MazeGenerator.cc
MazeGenerator.ikc

blog comments powered by Disqus