Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sudoku): implement environment #125

Merged
merged 61 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
5214c68
feat: add sudoku
Egiob Apr 22, 2023
1c139a4
feat: make generator configurable and add puzzles data
Egiob Apr 27, 2023
72330e6
fix: add sudoku conf
Egiob Apr 28, 2023
2593612
fix: validate board
Egiob Apr 28, 2023
aef828c
feat(sudoku): change default version
Egiob Apr 28, 2023
db3845c
feat(sudoku): update very easy databse
Egiob Apr 28, 2023
521612a
feat(sudoku): update very easy data
Egiob Apr 28, 2023
89299cd
wip: debug train
Egiob Apr 28, 2023
bc61304
wip: debug train
Egiob Apr 28, 2023
7541e4c
wip: debug train
Egiob Apr 28, 2023
5b41051
wip: debug train
Egiob Apr 28, 2023
4bc8677
wip: debug train
Egiob Apr 28, 2023
04c120a
wip: debug train
Egiob Apr 28, 2023
e060543
wip: debug train
Egiob Apr 28, 2023
d156a03
wip: debug train
Egiob Apr 28, 2023
d11dc09
wip: debug train
Egiob Apr 28, 2023
d341e17
wip: debug train
Egiob Apr 28, 2023
0bba8a6
test: add utils test
Egiob Apr 28, 2023
aedccb6
docs: update sudoku versions
Egiob Apr 28, 2023
3248ef2
style: clean useless files
Egiob Apr 28, 2023
0260e82
style: clean notebook
Egiob Apr 28, 2023
9352a4d
fix: data not loadable
Egiob Apr 28, 2023
371f54f
wip: train invariant net
Egiob May 5, 2023
06f4d1f
docs: update README.md
Egiob May 5, 2023
b2d70e5
style: remove leading underscore
Egiob May 5, 2023
7598f50
fix: change signature of reward
Egiob May 5, 2023
2f6d256
fix: matplotlib animation ref
Egiob May 5, 2023
147f4f4
style: remove remaining actions
Egiob May 5, 2023
5ffb46d
wip: train a2c sudoku
Egiob May 5, 2023
81a8aec
wip: train a2c sudoku
Egiob May 5, 2023
770ac87
style: remove blank line
Egiob May 5, 2023
259fb41
style: remove blank line
Egiob May 5, 2023
2550ffa
wip: train sudoku
Egiob May 5, 2023
ccea58b
Merge branch 'feat/add-sudoku-environment' of github.com:Egiob/jumanj…
Egiob May 5, 2023
fc0bf0e
wip: train sudoku
Egiob May 6, 2023
ba99ca5
wip: train sudoku
Egiob May 6, 2023
659ef01
wip: train sudoku
Egiob May 6, 2023
4d30462
wip: train sudoku
Egiob May 6, 2023
ae2d286
wip: train a2c sudoku
Egiob May 9, 2023
098a6a9
style: minor changes
Egiob May 11, 2023
e770149
docs: add reference to paper
Egiob May 11, 2023
18f91ac
refactor: small comments
Egiob May 19, 2023
b8c0d5f
fix: add missing
Egiob May 19, 2023
e2a8b4c
fix: revert notebooks
Egiob May 19, 2023
0c0930c
fix: register env
Egiob May 19, 2023
241af11
style: remove print
Egiob May 19, 2023
61d35d3
style: address PR comments
Egiob May 30, 2023
f5dd0fb
Merge branch 'main' into feat/add-sudoku-environment
clement-bonnet May 30, 2023
81e96dc
Update docs/environments/sudoku.md
Egiob May 31, 2023
e3e21ac
style: add type hint
Egiob May 31, 2023
4af1f13
style: PR review
Egiob May 31, 2023
f6629d9
Merge branch 'feat/add-sudoku-environment' of github.com:Egiob/jumanj…
Egiob May 31, 2023
3d83925
fix: path to sudoku data
Egiob May 31, 2023
090b630
style: minor changes
Egiob Jun 1, 2023
873cb08
docs: add comment
Egiob Jun 1, 2023
83e087f
Merge branch 'main' into feat/add-sudoku-environment
clement-bonnet Jun 1, 2023
d6e98d6
Merge branch 'main' into feat/add-sudoku-environment
clement-bonnet Jun 1, 2023
2df72fd
style: type to jnp type
Egiob Jun 1, 2023
c0ec740
style: small changes
Egiob Jun 1, 2023
12306b0
Merge branch 'feat/add-sudoku-environment' of github.com:Egiob/jumanj…
Egiob Jun 1, 2023
fbc69e9
fix: broken line in
Egiob Jun 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ repos:
args:
- --license-filepath=license_header.txt
- --comment-style=#
exclude: .npy$
Egiob marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<img src="docs/env_anim/cvrp.gif" alt="CVRP" width="30%" />
<img src="docs/env_anim/rubiks_cube.gif" alt="RubiksCube" width="30%" />
<img src="docs/env_anim/game_2048.gif" alt="Game2048" width="30%" />
<img src="docs/env_anim/minesweeper.gif" alt="Minesweeper" width="30%" />
<img src="docs/env_anim/sudoku.gif" alt="Sudoku" width="30%" />
Egiob marked this conversation as resolved.
Show resolved Hide resolved
</p>


Expand Down Expand Up @@ -81,6 +81,7 @@ problems.
| 🔢 Game2048 | Logic | `Game2048-v1` | [code](https://github.com/instadeepai/jumanji/tree/main/jumanji/environments/logic/game_2048/) | [doc](https://instadeepai.github.io/jumanji/environments/game_2048/) |
| 💣 Minesweeper | Logic | `Minesweeper-v0` | [code](https://github.com/instadeepai/jumanji/tree/main/jumanji/environments/logic/minesweeper/) | [doc](https://instadeepai.github.io/jumanji/environments/minesweeper/) |
| 🎲 RubiksCube | Logic | `RubiksCube-v0`<br/>`RubiksCube-partly-scrambled-v0` | [code](https://github.com/instadeepai/jumanji/tree/main/jumanji/environments/logic/rubiks_cube/) | [doc](https://instadeepai.github.io/jumanji/environments/rubiks_cube/) |
| ✏️ Sudoku | Logic | `Sudoku-v0` <br/>`Sudoku-very-easy-v0`| [code](https://github.com/instadeepai/jumanji/tree/main/jumanji/environments/logic/sudoku/) | [doc](https://instadeepai.github.io/jumanji/environments/sudoku/) |
clement-bonnet marked this conversation as resolved.
Show resolved Hide resolved
| 📦 BinPack (3D BinPacking Problem) | Packing | `BinPack-v1` | [code](https://github.com/instadeepai/jumanji/tree/main/jumanji/environments/packing/bin_pack/) | [doc](https://instadeepai.github.io/jumanji/environments/bin_pack/) |
| 🏭 JobShop (Job Shop Scheduling Problem) | Packing | `JobShop-v0` | [code](https://github.com/instadeepai/jumanji/tree/main/jumanji/environments/packing/job_shop/) | [doc](https://instadeepai.github.io/jumanji/environments/job_shop/) |
| 🎒 Knapsack | Packing | `Knapsack-v1` | [code](https://github.com/instadeepai/jumanji/tree/main/jumanji/environments/packing/knapsack/) | [doc](https://instadeepai.github.io/jumanji/environments/knapsack/) |
Expand Down
8 changes: 8 additions & 0 deletions docs/api/environments/sudoku.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
::: jumanji.environments.logic.sudoku.env.Sudoku
selection:
members:
- __init__
- reset
- step
- observation_spec
- action_spec
Binary file added docs/env_anim/sudoku.gif
Egiob marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/env_img/sudoku.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions docs/environments/sudoku.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Sudoku Environment

<p align="center">
<img src="../env_anim/sudoku.gif" width="500"/>
</p>

We provide here a Jax JIT-able implementation of the
[Sudoku](https://en.wikipedia.org/wiki/Sudoku) puzzle game.


## Observation
The observation given to the agent consists of:


- `board`: jax array (int32) of shape (9,9):
empty cells are represented by -1, and filled cells are represented by 0-8.
Egiob marked this conversation as resolved.
Show resolved Hide resolved
- `action_mask`: jax array (bool) of shape (9,9,9):
indicates which actions are valid.



## Action
The action space is a `MultiDiscreteArray` of integer values representing coordinates of the square
to explore and the digits to write in the cell, e.g. `[3, 6, 8]` for writing the digit `9` in
the cell located on the fourth row and seventh column.


## Reward
Egiob marked this conversation as resolved.
Show resolved Hide resolved
The reward is `1` at the end of the episode if the board is correctly solved, and `0` in every
other case.

## Termination
An episode terminates when there are no more legal actions available, this could happen if the
board is solved or if the agent finds itself in a dead-end.

## Registered Versions 📖
- `Sudoku-v0`, the classic [game](https://en.wikipedia.org/wiki/Sudoku) on
a 9x9 grid, 10000 random puzzles with mixed difficulty are included by default.
- `Sudoku-very-easy-v0`, the classic [game](https://en.wikipedia.org/wiki/Sudoku) on
Egiob marked this conversation as resolved.
Show resolved Hide resolved
a 9x9 grid, only 1000 very-easy random puzzles (>46 clues) included by default.


## Using custom puzzle instances
If one wants to include its own database of puzzles, the `DatabaseGenerator` can be initialized with any collection of puzzles using the argument `custom_boards`.
Some references for databases of puzzle of various difficulties:
- https://www.kaggle.com/datasets/rohanrao/sudoku
- https://www.kaggle.com/datasets/informoney/4-million-sudoku-puzzles-easytohard


## Difficulty level as a function of number of clues
<a href="https://www.researchgate.net/figure/Number-of-clues-for-each-difficulty-level_tbl1_259525699"><img width=400 src="https://www.researchgate.net/profile/Arnab-Maji-2/publication/259525699/figure/tbl1/AS:651874038460436@1532430290710/Number-of-clues-for-each-difficulty-level.png" alt="Number of clues for each difficulty level"/></a>
Adapted from [An Algorithm for Generating only Desired Permutations for Solving Sudoku Puzzle](https://www.researchgate.net/figure/Number-of-clues-for-each-difficulty-level_tbl1_259525699).
42 changes: 18 additions & 24 deletions examples/load_checkpoints.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Load configs"
],
"metadata": {
"collapsed": false
}
]
},
{
"cell_type": "code",
Expand All @@ -56,7 +54,9 @@
"outputs": [
{
"data": {
"text/plain": "{'agent': 'a2c', 'seed': 0, 'logger': {'type': 'terminal', 'save_checkpoint': False, 'name': '${agent}_${env.name}'}, 'env': {'name': 'connector', 'env_kwargs': None, 'network': {'transformer_num_blocks': 4, 'transformer_num_heads': 8, 'transformer_key_size': 16, 'transformer_mlp_units': [512], 'conv_n_channels': 32}, 'training': {'num_epochs': 500, 'num_learner_steps_per_epoch': 100, 'n_steps': 20, 'total_batch_size': 128}, 'evaluation': {'eval_total_batch_size': 5000, 'greedy_eval_total_batch_size': 5000}, 'a2c': {'normalize_advantage': False, 'discount_factor': 0.99, 'bootstrapping_factor': 0.95, 'l_pg': 1.0, 'l_td': 1.0, 'l_en': 0.01, 'learning_rate': 0.0002}}}"
"text/plain": [
"{'agent': 'a2c', 'seed': 0, 'logger': {'type': 'terminal', 'save_checkpoint': False, 'name': '${agent}_${env.name}'}, 'env': {'name': 'connector', 'env_kwargs': None, 'network': {'transformer_num_blocks': 4, 'transformer_num_heads': 8, 'transformer_key_size': 16, 'transformer_mlp_units': [512], 'conv_n_channels': 32}, 'training': {'num_epochs': 500, 'num_learner_steps_per_epoch': 100, 'n_steps': 20, 'total_batch_size': 128}, 'evaluation': {'eval_total_batch_size': 5000, 'greedy_eval_total_batch_size': 5000}, 'a2c': {'normalize_advantage': False, 'discount_factor': 0.99, 'bootstrapping_factor': 0.95, 'l_pg': 1.0, 'l_td': 1.0, 'l_en': 0.01, 'learning_rate': 0.0002}}}"
]
},
"execution_count": 3,
"metadata": {},
Expand All @@ -71,12 +71,10 @@
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Load a saved checkpoint"
],
"metadata": {
"collapsed": false
}
]
},
{
"cell_type": "code",
Expand All @@ -95,12 +93,10 @@
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Rollout a few episodes"
],
"metadata": {
"collapsed": false
}
]
},
{
"cell_type": "code",
Expand Down Expand Up @@ -130,12 +126,10 @@
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Save GIF"
],
"metadata": {
"collapsed": false
}
]
},
{
"cell_type": "code",
Expand All @@ -152,12 +146,10 @@
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Save PNG"
],
"metadata": {
"collapsed": false
}
]
},
{
"cell_type": "code",
Expand All @@ -166,8 +158,10 @@
"outputs": [
{
"data": {
"text/plain": "<Figure size 720x720 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAi0AAAIuCAYAAABzfTjcAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAAsTAAALEwEAmpwYAAAO0klEQVR4nO3dwW1kxxWF4XubhLoYgb1xCnYM3IhJOAyFMWEoifGGMdgheKcI+lHQdHkxBLzxQsAbueYUvy+Bdw+6h/rxBJA95ywAgO/dZfUBAAC/h2gBACKIFgAggmgBACKIFgAggmgBACKIFgAggmgBACKIFgAggmgBACKIFgAggmgBACKIFgAggmgBACKIFgAggmgBACKIFgAggmgBACKIFgAggmgBACKIFgAggmgBACKIFgAggmgBACKIFgAggmgBACKIFgAggmgBACKIFgAggmgBACKIFgAgwuPqAy4P/e95r7+svuOMvtSXea+H1XectcOOH0bdfz02iPFxuddxj95xHeP+dhzRG8YY9yN8Q9UeO3bYULXHjjHGL7fb7c8rnt1zzhXP/e8B3fOfs56XHnHS37pe0zdU7bHjfUO8v3VVzb+vPuOc/rlW/3w5q7vjN1TtsWOHDVV77Hjf0CueHV17AMDHIVoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAjL//YQAPC//av++N+W/9fK+bMC3rQAABFECwAQQbQAABFECwAQQbQAABFECwAQQbQAABFECwAQQbQAABFECwAQQbQAABFECwAQQbQAABFECwAQQbQAABFECwAQQbQAABFECwAQQbQAABFECwAQQbQAABFECwAQQbQAABFECwAQ4XH1AQDA//bXmqtP+K540wIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIAROg51/5dg8tD/zbv9bD0iJP6UjXvq684b4cdP4yqX4/VV3wD41J1ZH8Y1zHq7cj+MMYYdYRvqNpjxw4bqvbYMca43263Jf/dXh4t3T1r/v156RFn9c+v8Ruq9tixw4aqPXb0z6+rf76c1d2VvqFqjx07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ECAEQQLQBABNECAEQQLQBABNECAEQQLQBABNECAEQQLQBABNECAEQQLQBABNECAEQQLQBABNECAEQQLQBABNECAEQQLQBABNECAEQQLQBABNECAEQQLQBABNECAEToOefSA56enr4cxxEdT2OMOo5j9Rmn/VCjfq3sHeM66njL3lC1x3dqhw3Vl6p5X33FN3CpqvQdO2yo2mJHX+7z/uVhyaNXR0t3z9U3nNXdlb6h6uuOzzWfV99xxkv16y6fRfoOG74fO+zYYUPVHjveN/SKZ0e/4QAAPg7RAgBEEC0AQATRAgBEEC0AQATRAgBEEC0AQATRAgBEEC0AQATRAgBEeFx9AMBW+g/+7ebhvwIezvCmBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiPqw8A2Mqcqy+AbXnTAgBEEC0AQATRAgBEEC0AQATRAgBEEC0AQATRAgBEEC0AQATRAgBEEC0AQATRAgBEWP63h8YY9+6OjqcxRnX36jNOu9SlXqpfV99xxrju8Vns8J2y4fuxw44dNlTtsWOMcV/17J6L/7hXd8/VN5zV3ZW+oerrjs81n1ffccZL9esun0X6Dhu+Hzvs2GFD1R473jcsKa/oNxwAwMchWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIggWgCACKIFAIjwuPqAMca9u6PjaYxR3b36jNMudamX6tfVd5wxrnt8Fjt8p2z4fuywY4cNVXvsGGPcVz2755yrnv31gO65+oazurvSN1R93fG55vPqO854qX7d5bNI39Hdlb2gqq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Npjx/uGXvHs6DccAMDHIVoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCIIFoAgAiiBQCI8Lj6gDHGL939p9V3nDHGuHd3fADusGOHDVV77LDh+7HDjh02VO2xY4zxy6pn95xz1bMBAH636NoDAD4O0QIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIARBAtAEAE0QIARPgPmaN27GY/4YUAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 720x720 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
Expand Down Expand Up @@ -199,7 +193,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.15"
"version": "3.10.9"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions examples/training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
},
"outputs": [],
"source": [
"env = \"maze\" # @param ['bin_pack', 'cleaner', 'connector', 'cvrp', 'game_2048', 'job_shop', 'knapsack', 'maze', 'minesweeper', 'rubiks_cube', 'snake', 'tsp']\n",
"env = \"maze\" # @param ['bin_pack', 'cleaner', 'connector', 'cvrp', 'game_2048', 'job_shop', 'knapsack', 'maze', 'minesweeper', 'rubiks_cube', 'snake', \"sudoku\", 'tsp']\n",
"agent = \"random\" # @param ['random', 'a2c']"
]
},
Expand Down Expand Up @@ -105,7 +105,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.15"
"version": "3.10.9"
}
},
"nbformat": 4,
Expand Down
Loading