Skip to main content

A package for visualizing maze solving intended for students learning programming with Python. Developed at the VU Amsterdam.

Project description

Minobot

An educational Python package for learning programming through maze solving.

For Students

Learn programming concepts by writing code to solve mazes. Watch your robot navigate through mazes in real-time or as videos in Jupyter notebooks.

Quick Start

from minobot import *

# Create a maze
maze = [
    [1, 1, 1, 1, 1], # 1 represents a wall
    [1, 0, 0, 2, 1], # 0 is empty and 2 is the starting position
    [1, 0, 1, 0, 1],
    [1, 0, 0, 3, 1], # 3 is the goal
    [1, 1, 1, 1, 1]
]

# Write your solution
def solve():
    while not has_reached_end():
        if can_move():
            move()
        else:
            turn_left()

# Watch it work
solve_maze(maze, solve)

Installation

pip install minobot

⚠️ Warning:
If you encounter an encoder error when trying to display a video in a notebook, you may need to reinstall OpenCV using Conda. Follow these steps:

  1. Create and activate a Conda environment (if you haven’t already).
  2. Run the following commands:
pip install minobot
pip uninstall opencv-python
conda install -c conda-forge opencv

Robot Instructions

The MinoBot provides simple, intuitive instructions for maze navigation:

Movement Instructions

  • move() - Move forward one step (returns True if successful, False if blocked)
  • turn_left() - Turn 90 degrees to the left
  • turn_right() - Turn 90 degrees to the right
  • turn_around() - Turn 180 degrees

Sensing Instructions

  • can_move() - Check if the robot can move forward without hitting a wall
  • has_reached_end() - Check if the robot has reached the goal
  • get_position() - Get current (x, y) position
  • get_direction() - Get current direction (NORTH, EAST, SOUTH, WEST)
  • get_steps() - Get number of steps taken

Painting Instructions

  • paint_current(color) - Paint the tile the robot is standing on
  • paint_forward(color) - Paint the tile in front of the robot
  • get_current_color() - Get color of current tile
  • get_forward_color() - Get color of tile in front

Colors

The MinoBot can paint tiles with the following colors:

  • red - Light red
  • blue - Light blue
  • green - Light green
  • yellow - Light yellow
  • purple - Light purple
  • orange - Light orange
  • pink - Light pink
  • cyan - Light cyan

Educational Features

  • Visual Learning: See your code execute step-by-step
  • Multiple Environments: Works in Jupyter notebooks and standalone Python
  • Algorithm Practice: Perfect for learning loops, conditionals, and problem-solving

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

minobot-0.0.6.tar.gz (311.2 kB view details)

Uploaded Source

Built Distribution

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

minobot-0.0.6-py3-none-any.whl (322.2 kB view details)

Uploaded Python 3

File details

Details for the file minobot-0.0.6.tar.gz.

File metadata

  • Download URL: minobot-0.0.6.tar.gz
  • Upload date:
  • Size: 311.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for minobot-0.0.6.tar.gz
Algorithm Hash digest
SHA256 7051424ece0ab855b2d9abee6560b72585ec5f3d99502772198be0f273d01073
MD5 57088be5949c93d32b9c4f7fbaf4e4d6
BLAKE2b-256 ea96a32a8f9ff3f2ffe6fee62f97cce82f9e11a76af1cf0d17870aa7bcb32199

See more details on using hashes here.

Provenance

The following attestation bundles were made for minobot-0.0.6.tar.gz:

Publisher: python-publish.yml on VU-IntroPython/MinoBot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file minobot-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: minobot-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 322.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for minobot-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ca249d6885375e0d5329c3c9c9a0f41ad5e4b66f4b817f232c10458501f43375
MD5 89d06184c9c4280ffc422b3221b0d0eb
BLAKE2b-256 e48cc09414f29eefc61b7109c5d231e9f83a3e2ad654abfa496a58706cd05fcf

See more details on using hashes here.

Provenance

The following attestation bundles were made for minobot-0.0.6-py3-none-any.whl:

Publisher: python-publish.yml on VU-IntroPython/MinoBot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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