A pure Python, text-interface clone and solver of the Laby game
Project description
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
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file laby_bot-0.0.tar.gz
.
File metadata
- Download URL: laby_bot-0.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 129fae71c67763fc029bee2753b2562e1492f5b8634bcd2e05b79dbb917595c5 |
|
MD5 | f8c6bcb96b646f3b240f7220f3d04a8c |
|
BLAKE2b-256 | a6bb1ff853436f07a9a1363723860b3e29ba98662f26cd63c909d2755d3fc6c5 |
File details
Details for the file laby_bot-0.0-py3-none-any.whl
.
File metadata
- Download URL: laby_bot-0.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50b6d33b0216be3b85797262518b675c2eaa203c3df9ae130c475c78b0628c7c |
|
MD5 | 477a0c77e6c0b176a169925bda432c37 |
|
BLAKE2b-256 | a544142b451cfc1c1bb977ab3213e8e3d49056646b285e272323b555f299c37f |