Skip to main content

Laby Bot

A pure Python, text-interface clone and solver of the Laby game

What's it for?

This package has a couple of purposes:

  • To demonstrate how modeling the environment makes it easy to implement planning and reasoning.
  • To provide a useful toy problem for testing out other AI algorithms.

Installation

Laby Bot can be installed by the command:

pip install laby_bot

NOTE: The modules will still work, but some of the tests will fail without the original Laby levels. You'll need to create a symlink to them. You can find them here.

Quick Start

Playing the Game

The laby_bot.robot submodule is intended as a drop-in replacement for the robot module of the original Laby game. You can test your bot code out on a given level like this:

from laby_bot.robot import *

load_level('<path to laby level>.laby')
show()

# Paste your bot code here, minus the "from robot import *" line
# that would normally appear at the top. All the standard robot
# instructions available in the Laby game are provided. 

When you run the above code, the map will be printed out to the command line after each move is taken by your bot.

Running the Solver

The laby_bot.solver submodule contains a generic solver for any (solvable) Laby level. You can test it out on a randomly generated level like this:

from laby_bot.robot import generate_level, show
from laby_bot.solver import run

generate_level()
show()
run()

Or you can simply run it from the command line:

python3 -m laby_bot

Metadata

Release files for laby-bot 0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for laby-bot 0.0
File Size Uploaded
laby_bot-0.0.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for laby-bot 0.0
File Interpreter ABI Platform
laby_bot-0.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.5 kB

Release files / laby_bot-0.0.tar.gz

Download URL laby_bot-0.0.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
129fae71c67763fc029bee2753b2562e1492f5b8634bcd2e05b79dbb917595c5
BLAKE2b-256 checksum
How to use checksums
a6bb1ff853436f07a9a1363723860b3e29ba98662f26cd63c909d2755d3fc6c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.10

Release files / laby_bot-0.0-py3-none-any.whl

Download URL laby_bot-0.0-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50b6d33b0216be3b85797262518b675c2eaa203c3df9ae130c475c78b0628c7c
BLAKE2b-256 checksum
How to use checksums
a544142b451cfc1c1bb977ab3213e8e3d49056646b285e272323b555f299c37f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page