Skip to content

Commit 3e54645

Browse files
committed
few fixes for hw2
1 parent d6a6a1a commit 3e54645

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

homeworks/hw02_cross_entropy/01_crossentropy_method.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,9 @@
622622
"\n",
623623
"In this section you will train a neural network policy for continuous state space game\n",
624624
"\n",
625-
"You can find full description of the environment [here](https://www.gymlibrary.dev/environments/classic_control/cart_pole/).\n",
625+
"You can find full description of the environment [here](https://gymnasium.farama.org/environments/classic_control/cart_pole/).\n",
626626
"\n",
627-
"![CartPole-v0\"](https://www.gymlibrary.dev/_images/cart_pole.gif)\n",
627+
"![CartPole-v0\"](https://gymnasium.farama.org/_images/cart_pole.gif)\n",
628628
"\n",
629629
"So here's how it works:"
630630
]
@@ -684,7 +684,7 @@
684684
"cell_type": "markdown",
685685
"metadata": {},
686686
"source": [
687-
"Update the generate_session function and beat the game!"
687+
"Update the generate_session_cartpole function and beat the game!"
688688
]
689689
},
690690
{
@@ -772,7 +772,7 @@
772772
"sessions_to_send = []\n",
773773
"for session in sessions:\n",
774774
" observations = [x.tolist() for x in session[0]]\n",
775-
" actions = [x.item() for x in session[1]]\n",
775+
" actions = [x.item() if hasattr(x, "item") else int(x) for x in session[1]]\n",
776776
" sessions_to_send.append((observations, actions))\n",
777777
"\n",
778778
"import json\n",

0 commit comments

Comments
 (0)