mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-30 01:50:19 +00:00
[Docs] Custom environment tutorial refactoring (#709)
This commit is contained in:
@@ -9,8 +9,8 @@ Frozenlake benchmark
|
||||
# In this post we'll compare a bunch of different map sizes on the
|
||||
# `FrozenLake <https://gymnasium.farama.org/environments/toy_text/frozen_lake/>`__
|
||||
# environment from the reinforcement learning
|
||||
# `Gymnasium <https://gymnasium.farama.org/>`__ using the Q-learning
|
||||
# algorithm.
|
||||
# `Gymnasium <https://gymnasium.farama.org/>`__ package using the
|
||||
# Q-learning algorithm.
|
||||
#
|
||||
|
||||
|
||||
@@ -263,8 +263,8 @@ def postprocess(episodes, params, rewards, steps, map_size):
|
||||
res = pd.DataFrame(
|
||||
data={
|
||||
"Episodes": np.tile(episodes, reps=params.n_runs),
|
||||
"Rewards": rewards.flatten(),
|
||||
"Steps": steps.flatten(),
|
||||
"Rewards": rewards.flatten(order="F"),
|
||||
"Steps": steps.flatten(order="F"),
|
||||
}
|
||||
)
|
||||
res["cum_rewards"] = rewards.cumsum(axis=0).flatten(order="F")
|
||||
|
Reference in New Issue
Block a user