Skip to main content

A Sudoku environment for Reinforcement Learning research

Reason this release was yanked:

critical bug

Project description

[!warning] Under active development...Expect frequent code changes....

pip install gymnasium_sudoku
import gymnasium_sudoku
import gymnasium as gym

env = gym.make("sudoku-v0",render_mode="human",horizon=150,eval_mode=True)
env.reset(delay=0.1) # delay param control the update rate of the gui
steps = 100

for n in range(steps):
    env.step(env.action_space.sample())
    env.render() 

And for training :

env = gym.make("sudoku-v0",horizon=150,eval_mode=False)
# It is better not to call .render() during training 

By default, eval_mode is set to False, this is good for training since after each reset() call,the Sudoku board will be changed to add more diversity to the training data and try to prevent memorization, so that the policy learns a more general distribution...At least that is the intuition.

During testing, eval_mode should be set to True to test the generalization capabilities of a trained policy or to test the environment with a random policy.This is important; otherwise,when testing a trained policy,it will be tested on states seen during training which would measure memorization rather than generalization.This makes it an invalid test of the policy's true capabilities.

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

gymnasium_sudoku-0.2.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

gymnasium_sudoku-0.2.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file gymnasium_sudoku-0.2.0.tar.gz.

File metadata

  • Download URL: gymnasium_sudoku-0.2.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for gymnasium_sudoku-0.2.0.tar.gz
Algorithm Hash digest
SHA256 576d233642b6592e07d39849cab10a2a4cffbcd21ae430160ae3391c57a54def
MD5 beeb27b04df3bf18a60116c695f15fb4
BLAKE2b-256 43c793f9de3fcfb035551cde69e31a16d6bdb0beedef8c5e7bd0a03807196246

See more details on using hashes here.

File details

Details for the file gymnasium_sudoku-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gymnasium_sudoku-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10996c272868cb4e15adb0c9c37e98be74d6185c37e37b324009854c4c8acdc8
MD5 f4e21c5782c5188695efdb568843591a
BLAKE2b-256 2e6fc4b8dfe62ed811cdc7f46b02853858e9032a1a66a28dc35d07b568623f0f

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