mirror of
https://github.com/huggingface/deep-rl-class.git
synced 2026-02-02 18:09:24 +08:00
Merge pull request #395 from PierreCounathe/pierrecounathe/unit-2-frozenlake-observation-space
Unit 2 Correct FrozenLake's observation space
This commit is contained in:
@@ -429,7 +429,7 @@
|
||||
"id": "2MXc15qFE0M9"
|
||||
},
|
||||
"source": [
|
||||
"We see with `Observation Space Shape Discrete(16)` that the observation is an integer representing the **agent’s current position as current_row * nrows + current_col (where both the row and col start at 0)**.\n",
|
||||
"We see with `Observation Space Shape Discrete(16)` that the observation is an integer representing the **agent’s current position as current_row * ncols + current_col (where both the row and col start at 0)**.\n",
|
||||
"\n",
|
||||
"For example, the goal position in the 4x4 map can be calculated as follows: 3 * 4 + 3 = 15. The number of possible observations is dependent on the size of the map. **For example, the 4x4 map has 16 possible observations.**\n",
|
||||
"\n",
|
||||
|
||||
@@ -247,7 +247,7 @@ print("Observation Space", env.observation_space)
|
||||
print("Sample observation", env.observation_space.sample()) # Get a random observation
|
||||
```
|
||||
|
||||
We see with `Observation Space Shape Discrete(16)` that the observation is an integer representing the **agent’s current position as current_row * nrows + current_col (where both the row and col start at 0)**.
|
||||
We see with `Observation Space Shape Discrete(16)` that the observation is an integer representing the **agent’s current position as current_row * ncols + current_col (where both the row and col start at 0)**.
|
||||
|
||||
For example, the goal position in the 4x4 map can be calculated as follows: 3 * 4 + 3 = 15. The number of possible observations is dependent on the size of the map. **For example, the 4x4 map has 16 possible observations.**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user