Skip to main content

A maze generator and solution generator

Project description

maze-utils

Installation

pip install maze-utils

Usage

Maze Generator

from maze_utils import mazes

generator = mazes.KruskalMaze(n_x=20, n_y=20)

# Either step by step
for step in generator.steps:
    print(step)

# Or final
print(generator.maze)

Maze Solver

from maze_utils import mazes, solvers

# first get maze as numpy array
maze_generator = mazes.KruskalMaze(n_x=20, n_y=20)
maze = maze_generator.maze

# Then generate solution
solver_generator = solvers.AStarSolver(maze)

# step by step
for step in solver_generator.steps:
    print(step)

# or final
print(solver_generator.solution)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maze_utils-1.1.1.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maze_utils-1.1.1-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file maze_utils-1.1.1.tar.gz.

File metadata

  • Download URL: maze_utils-1.1.1.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for maze_utils-1.1.1.tar.gz
Algorithm Hash digest
SHA256 4cb216b469ba883fc44313d98a9de7b04fa9ddff5e2a1ecdba5640a9f6d95bcf
MD5 df6e04009cad1cdc66c0ba666037794f
BLAKE2b-256 99ea6f84a9a61f5cd05cd01439e88512f24c18e36f131e98e92fe6754c5bb905

See more details on using hashes here.

File details

Details for the file maze_utils-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: maze_utils-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for maze_utils-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dc0175e7e13d19d843b4181b59620752f4c1c50e8e07a2135a17cc6a53500d6c
MD5 a45cd30907c1e2b58bd99be3e31a914d
BLAKE2b-256 d939087198b4ae924d4a50e52097d7928a5083e9f2e245d88ed36a9312cf6aee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page