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.0.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.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maze_utils-1.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 c404f452760a7250cb59c7a64837387158e7a69aba43aabb67edebdb5a612c34
MD5 6a17b54bdebe59c24d0c1a4e3500316a
BLAKE2b-256 688df1799faca16b39809b5e093e5a0676f61b38b0ffbe855940235994d1c960

See more details on using hashes here.

File details

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

File metadata

  • Download URL: maze_utils-1.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 080de6077d8b072c4bb6c49edca1606b5263a949cbbd59c3d235f45b684995e3
MD5 d15cf4164739923ba51a4f7ad7e0b445
BLAKE2b-256 014016de6007a0196d6a9bb3707032c4915f45067431091838839ec81f125840

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