Skip to main content

A Python library for creating, solving, and visualizing mazes using Depth-First Search (DFS) and Breadth-First Search (BFS) algorithms.

Project description

Maze Solver Documentation

Descripción

Esta biblioteca permite crear, resolver y visualizar laberintos. Incluye métodos para cargar un laberinto desde un archivo, resolverlo utilizando algoritmos como DFS (Depth-First Search) y BFS (Breadth-First Search), y visualizar tanto el laberinto original como el resuelto.

Instalación

Para instalar las dependencias necesarias, ejecuta el siguiente comando:

pip install -r requirements.txt

Uso

Leer un laberinto desde un archivo

import maze

# Leer el laberinto
maze_instance = maze.read("ruta/al/archivo/maze.txt")
maze_instance.show(title="Maze Original", label=True)

Resolver el laberinto

# Resolver el laberinto usando DFS
solved_maze = maze_instance.solve(method="DFS")

# Mostrar el laberinto resuelto
solved_maze.show(title="Solved Maze (DFS)", label=True)

Obtener información sobre la solución

# Número de pasos
print(solved_maze.info())

# Pasos del camino resuelto
print(solved_maze.steps())

Requisitos

Para utilizar la biblioteca, asegúrate de tener instaladas las siguientes dependencias:

  • numpy==1.23.5
  • matplotlib==3.6.2

Estas dependencias se pueden instalar ejecutando:

pip install -r requirements.txt

Créditos

Desarrollado por: Pablo Álvaro Hidalgo

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

pybyrinth-1.2.2.tar.gz (9.0 kB view details)

Uploaded Source

File details

Details for the file pybyrinth-1.2.2.tar.gz.

File metadata

  • Download URL: pybyrinth-1.2.2.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pybyrinth-1.2.2.tar.gz
Algorithm Hash digest
SHA256 bd66eb17b90ad5162d431b558e467d5ed5276d45a9683c31e3800bac6bc8e5df
MD5 e74d482613415a3b57be6bcc13e09d50
BLAKE2b-256 b8fe76011a59ea1998b903e4549afdb43d51b1214189acc7efe9126bb2699420

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