[GYM] Minesweeper Environment
A simple minesweeper environment for gym.
Goal
Goal is to reveal all fields without a mine.
Install
PIP
pip install mibexx-gym-minesweeper
Source
pip install -e .
Initialize
import gym
env = gym.make('mibexx_gym_minesweeper:mibexx-gym-minesweeper-v0')
env.reset()
Environment
State
Observation space: (9, 9)
Low: -2
High: 8
[[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]]
Values
| Value | Description |
|---|---|
| -2 | Mine |
| -1 | Empty field, no mine near |
| 0 | Not revealed |
| 1 | Revealed, 1 mine near |
| 2 | Revealed, 2 mines near |
| 3 | Revealed, 3 mines near |
| 4 | Revealed, 4 mines near |
| 5 | Revealed, 5 mines near |
| 6 | Revealed, 6 mines near |
| 7 | Revealed, 7 mines near |
| 8 | Revealed, 8 mines near |
Actions
Action space: [9 9]
Action is a (y,x) tuple.
Example for row 3 col 2:
state, reward, done, _ = env.step((3, 2))
Rewards
win match: 10
empty field: 1
already clicked field: -1
a mine: -10
Release files for mibexx-gym-minesweeper 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mibexx_gym_minesweeper-0.0.5.tar.gz | 2.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mibexx_gym_minesweeper-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.9 kB
Release files / mibexx_gym_minesweeper-0.0.5.tar.gz
| Download URL | mibexx_gym_minesweeper-0.0.5.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4f2f41da5a591d0eaa14d7bc047ea7353a91a338f20e0f75f50fe67a2a271b0
|
|
BLAKE2b-256 checksum How to use checksums |
c99c2a3994c47f726ffea2124fc27849a87186ea77184993e37b2746148eb493
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.10
|
Release files / mibexx_gym_minesweeper-0.0.5-py3-none-any.whl
| Download URL | mibexx_gym_minesweeper-0.0.5-py3-none-any.whl |
|---|---|
| Size | 2.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
beec5e5506704bc2de02bb0b8edc789542a1cc9243258a4ba606bce2dcee9587
|
|
BLAKE2b-256 checksum How to use checksums |
cc40b2c5cb073970316e95e50fca12f3e6d2fe13653e081db26e22d420a43d82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.10
|