Running gym with python3.5, task FrozenLake-v0, episodes never terminates even when the agent reaches 'H' or 'G'.
It seems there's some problem with python3 str/bytes.
For example, frozen_lake.py line 71:
isd = np.array(desc == 'S').astype('float64').ravel()
Comparison desc == 'S' will return a big pure python False, rather than a numpy array of booleans. Changing it to desc == b'S' works.
Lines 103, 104, 110, 111 also needs modification:
done = bytes(newletter).decode() in 'GH'
rew = float(newletter == b'G')
Running gym with python3.5, task FrozenLake-v0, episodes never terminates even when the agent reaches 'H' or 'G'.
It seems there's some problem with python3 str/bytes. For example, frozen_lake.py line 71:
isd = np.array(desc == 'S').astype('float64').ravel()
Comparisondesc == 'S'
will return a big pure pythonFalse
, rather than a numpy array of booleans. Changing it todesc == b'S'
works. Lines 103, 104, 110, 111 also needs modification: