Skip to content

matfmc/mazegenerator

Repository files navigation

Maze Generator

A maze generator built in R that creates mazes using a random walk algorithm. The generator includes visualization capabilities for both static mazes and animated maze generation processes.

Features

  • Generate mazes of any size
  • Visualize maze generation process through animation
  • Customizable wall thickness and path appearance
  • Option to display node numbers and path progression
  • Export capabilities for both static and animated mazes

Installation

# Required packages
install.packages("magick")

Usage

Basic Maze Generation

# Create a 20x20 maze
source('mazer2.r')
board <- matrix(0, 20, 20)
maze_path <- mazefy(1,1,board , verbose = TRUE)
plot_maze(maze_path, board)

Rplot01

Create Animation

# Create Animation
# Generate an animated visualization of the maze creation process
create_maze_animation(maze_path, board, "maze_animation.gif")
maze.mp4

About

Maze generator built in R

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages