Skip to main content

Awesome padlock_env created by cyprienc

Project description

Padlock Gymnasium Env

Padlock Gymnasium Env is a simple gymnasium environment that models a padlock with 4 discs, each with 4 symbols. The agent's goal is to find the secret combination of symbols to unlock the padlock.

The action space is a MultiDiscrete space with 2 dimensions, representing the selected disc and symbol. The observation space is a Box space of shape (4, 2) representing the current combination and a valid mask, where the valid mask is a binary array of shape (4,), with 1 indicating that the corresponding symbol in the current combination is correct and 0 indicating otherwise.

Install it from PyPI

pip install padlock_env

Install it locally

pip install -e .

Usage

Here's an example of how to use the environment:

import gymnasium
import padlock_env

env = gymnasium.make("PadlockEnv-v0")
observations, _ = env.reset()

done = False
while not done:
    action = env.action_space.sample()
    observations, reward, done, _, _ = env.step(action)
    print(f"Observations: {observations}, Reward: {reward}, Done: {done}")

Development

Read the CONTRIBUTING.md file.

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

padlock_env-0.1.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

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

padlock_env-0.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file padlock_env-0.1.0.tar.gz.

File metadata

  • Download URL: padlock_env-0.1.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for padlock_env-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2cc652081f22c373614daaae649c2ac87f827a10ffedb5fc7cc9c8b89ff1d523
MD5 aabf810617499884aa88b18dd13cce0f
BLAKE2b-256 2da7f19a2bda9d6b5f119aa4b20098e068e9382a2037fa9a3cff253298b8a6ce

See more details on using hashes here.

File details

Details for the file padlock_env-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: padlock_env-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for padlock_env-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6dafa424ab2467e34b2488e04e28d4ddea348ac86371fd9e3db11bf9dc8e41cd
MD5 07401d25c52e1b76ef82f5963ef3a83e
BLAKE2b-256 7bb4676035ca3a3bfeddadb24e4a447e4ba62be996698b1715d2c0432514cf1b

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