From 4e38147f15940021b64b3fa9ec157e0776f33944 Mon Sep 17 00:00:00 2001 From: Ariel Kwiatkowski Date: Thu, 26 Aug 2021 21:09:54 +0200 Subject: [PATCH] Taxi-v3 docs fix (#2360) * Changed the docstring of Taxi env * Changed the docs of Taxi env --- docs/toy_text/taxi.md | 4 ++++ gym/envs/toy_text/taxi.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/docs/toy_text/taxi.md b/docs/toy_text/taxi.md index 62f1f3dac97..c9070afc2c6 100644 --- a/docs/toy_text/taxi.md +++ b/docs/toy_text/taxi.md @@ -41,6 +41,10 @@ Observations: There are 500 discrete states since there are 25 taxi positions, 5 possible locations of the passenger (including the case when the passenger is in the taxi), and 4 destination locations. +Note that there are 400 states that can actually be reached during an episode. The missing states correspond to situations in which the passenger is at the same location as their destination, as this typically signals the end of an episode. +Four additional states can be observed right after a successful episodes, when both the passenger and the taxi are at the destination. +This gives a total of 404 reachable discrete states. + Passenger locations: - 0: R(ed) - 1: G(reen) diff --git a/gym/envs/toy_text/taxi.py b/gym/envs/toy_text/taxi.py index e9b729da410..47282f52d9c 100644 --- a/gym/envs/toy_text/taxi.py +++ b/gym/envs/toy_text/taxi.py @@ -27,6 +27,9 @@ class TaxiEnv(discrete.DiscreteEnv): Observations: There are 500 discrete states since there are 25 taxi positions, 5 possible locations of the passenger (including the case when the passenger is in the taxi), and 4 destination locations. + Note that there are 400 states that can actually be reached during an episode. The missing states correspond to situations in which the passenger is at the same location as their destination, as this typically signals the end of an episode. + Four additional states can be observed right after a successful episodes, when both the passenger and the taxi are at the destination. + This gives a total of 404 reachable discrete states. Passenger locations: - 0: R(ed)