A Sudoku environment for Reinforcement Learning research
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
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
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 gymnasium_sudoku-0.2.1.tar.gz.
File metadata
- Download URL: gymnasium_sudoku-0.2.1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d6f3c7882c2c2f5168be3a582dde1dc9965e48287e22b70126e153e17d1d38a
|
|
| MD5 |
abbdbb6b9503baf5725f30b040f87ded
|
|
| BLAKE2b-256 |
f106b2a01b7a1e2b34e95fcc5e4cf7ac350c5af2dd055e251b23b17c81158a85
|
File details
Details for the file gymnasium_sudoku-0.2.1-py3-none-any.whl.
File metadata
- Download URL: gymnasium_sudoku-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9a18c184351e100878e54b87d67fe762adb6b47bfa5037cb6971c3ea571f647
|
|
| MD5 |
47e75739d9526c7974ae26014a5aee54
|
|
| BLAKE2b-256 |
e6a9be0f74ff9f97d4bc413003b42254f3a3b1c852bde83785b021cabbb858d2
|