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:
- Create and activate a Conda environment (if you haven’t already).
- 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 (returnsTrueif successful,Falseif blocked)turn_left()- Turn 90 degrees to the leftturn_right()- Turn 90 degrees to the rightturn_around()- Turn 180 degrees
Sensing Instructions
can_move()- Check if the robot can move forward without hitting a wallhas_reached_end()- Check if the robot has reached the goalget_position()- Get current (x, y) positionget_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 onpaint_forward(color)- Paint the tile in front of the robotget_current_color()- Get color of current tileget_forward_color()- Get color of tile in front
Colors
The MinoBot can paint tiles with the following colors:
red- Light redblue- Light bluegreen- Light greenyellow- Light yellowpurple- Light purpleorange- Light orangepink- Light pinkcyan- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file minobot-0.0.2.tar.gz.
File metadata
- Download URL: minobot-0.0.2.tar.gz
- Upload date:
- Size: 756.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a9dfbb5393d0a440a54db01adc7b8608bc59551929295733f7ddfb77cfe602c
|
|
| MD5 |
4df9883eeb7bbe2b20c9ab4091815b94
|
|
| BLAKE2b-256 |
21866ad46cfaaba280c9118ba0daad5c0d250476047f66762cbd680832bdf2da
|
Provenance
The following attestation bundles were made for minobot-0.0.2.tar.gz:
Publisher:
python-publish.yml on VU-IntroPython/MinoBot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
minobot-0.0.2.tar.gz -
Subject digest:
9a9dfbb5393d0a440a54db01adc7b8608bc59551929295733f7ddfb77cfe602c - Sigstore transparency entry: 663955445
- Sigstore integration time:
-
Permalink:
VU-IntroPython/MinoBot@11bf79f74832ef4fac78118f6da415e296646df6 -
Branch / Tag:
refs/tags/v0.0.2-beta - Owner: https://github.com/VU-IntroPython
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@11bf79f74832ef4fac78118f6da415e296646df6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file minobot-0.0.2-py3-none-any.whl.
File metadata
- Download URL: minobot-0.0.2-py3-none-any.whl
- Upload date:
- Size: 767.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7eea9b22f564cc57f9b996b12d90de33c0cdce7c7cee7890495521421c2d1e8
|
|
| MD5 |
1af23774d92ce91531441873185cfcb6
|
|
| BLAKE2b-256 |
9aae792dfb140bc066e07ad53dd25ae23464fe690fd7c570891cdeff581ef76c
|
Provenance
The following attestation bundles were made for minobot-0.0.2-py3-none-any.whl:
Publisher:
python-publish.yml on VU-IntroPython/MinoBot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
minobot-0.0.2-py3-none-any.whl -
Subject digest:
c7eea9b22f564cc57f9b996b12d90de33c0cdce7c7cee7890495521421c2d1e8 - Sigstore transparency entry: 663955448
- Sigstore integration time:
-
Permalink:
VU-IntroPython/MinoBot@11bf79f74832ef4fac78118f6da415e296646df6 -
Branch / Tag:
refs/tags/v0.0.2-beta - Owner: https://github.com/VU-IntroPython
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@11bf79f74832ef4fac78118f6da415e296646df6 -
Trigger Event:
push
-
Statement type: