Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Maze Generators

This is a collection of maze generators in variety of programming languages. Where possible, the same basic maze generation algorithm is used (recursive backtracking). Some of the maze generators include a solver as well. Keep in mind that I wrote these over a span of several years primarily as a way to familiarize myself with new programming languages. For that reason, some of the code could be improved, which I fully intend to do eventually.

Here is a list of the languages:

  • maze.4th Forth
  • maze.adb Ada
  • maze.arm ARM Assembly Language
  • maze.awk AWK
  • maze.bas BASIC
  • maze.c C
  • maze.clj Clojure
  • maze.cob COBOL
  • maze.cpp C++
  • maze.d D
  • maze.dylan Dylan
  • maze.e Eiffel
  • maze.erl Erlang
  • maze.factor Factor
  • maze.f90 Fortran
  • maze.go Go
  • maze.hs Haskell
  • Io
  • Java
  • maze.jcl IBM System/360 Assembly Language
  • maze.jl JL (
  • maze.kt Kotlin
  • maze.lisp Common Lisp
  • maze.lua Lua
  • maze.mips 64-bit MIPS Assembly Language
  • OCaml
  • maze.nim Nimrod
  • maze.pas Pascal
  • Perl
  • Prolog
  • maze.pli PL/1
  • Python
  • maze.r R
  • maze.rb Ruby
  • Rust
  • maze.s x86-64
  • maze.scad OpenSCAD
  • Maze.scala Scala
  • maze.sml SML
  • maze.sno SNOBOL4
  • maze.sparc SPARC64 Assembly Language
  • Smalltalk
  • maze.swift Swift
  • maze.tcl TCL
  • maze.v Coq
  • maze.vim VIM

Some languages in which I have yet to implement a maze generator include:

  • APL
  • Groovy
  • J
  • Joy
  • Julia
  • Vala

There are, of course, many others. I prioritize real programming languages over joke programming languages such as BF, Whitespace, INTERCAL, etc. There are two reasons for this: (1) most of the joke programming languages are very primitive, making the implementation of a maze generator a complex task and (2) there are many real programming languages available that provide interesting targets.