Skip to content

Commit

Permalink
chore: update action mask in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
siddarthsingh1 committed Jan 12, 2024
1 parent 3807120 commit 823c632
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 38 deletions.
2 changes: 1 addition & 1 deletion docs/environments/pacman.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ mask `action_mask`.

- `frightened_state_time`: jax array (int32) of shape `()`, number of steps left of the scatter state.

- `action_mask`: jax array (bool) of shape `(4,)`, binary values denoting whether each action is
- `action_mask`: jax array (bool) of shape `(5,)`, binary values denoting whether each action is
possible.
- `frightened_state_time`: (int32) tracking the number of steps for the scatter state.
- `score`: (int32) tracking the total points accumulated since the last reset.
Expand Down
67 changes: 30 additions & 37 deletions examples/training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,24 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/instadeepai/jumanji/blob/main/examples/training.ipynb\">\n",
" <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
"</a>"
],
"metadata": {
"collapsed": false
}
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
},
"ExecuteTime": {
"end_time": "2023-06-14T10:11:33.230999708Z",
"start_time": "2023-06-14T10:11:13.526881698Z"
},
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
Expand All @@ -33,6 +31,12 @@
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"ExecuteTime": {
"end_time": "2023-06-14T10:11:33.245117659Z",
"start_time": "2023-06-14T10:11:33.237735383Z"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -61,26 +65,18 @@
" print(\"A TPU is connected.\")\n",
" else:\n",
" print(\"Only CPU accelerator is connected.\")"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-06-14T10:11:33.245117659Z",
"start_time": "2023-06-14T10:11:33.237735383Z"
}
}
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"ExecuteTime": {
"end_time": "2023-06-14T10:11:33.268137075Z",
"start_time": "2023-06-14T10:11:33.246267189Z"
},
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
Expand All @@ -96,13 +92,12 @@
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"ExecuteTime": {
"end_time": "2023-06-14T10:11:33.279561988Z",
"start_time": "2023-06-14T10:11:33.268947238Z"
},
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
Expand All @@ -114,6 +109,12 @@
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"ExecuteTime": {
"end_time": "2023-06-14T10:11:33.662474073Z",
"start_time": "2023-06-14T10:11:33.281569701Z"
}
},
"outputs": [],
"source": [
"#@title Download Jumanji Configs (run me) { display-mode: \"form\" }\n",
Expand All @@ -139,26 +140,18 @@
"env_url = f\"https://raw.githubusercontent.com/instadeepai/jumanji/main/jumanji/training/configs/env/{env}.yaml\"\n",
"os.makedirs(\"configs/env\", exist_ok=True)\n",
"download_file(env_url, f\"configs/env/{env}.yaml\")"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-06-14T10:11:33.662474073Z",
"start_time": "2023-06-14T10:11:33.281569701Z"
}
}
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"ExecuteTime": {
"end_time": "2023-06-14T10:12:46.061682766Z",
"start_time": "2023-06-14T10:11:33.664132133Z"
},
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [
Expand Down Expand Up @@ -436,7 +429,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
"version": "3.8.10"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 823c632

Please sign in to comment.