File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
homeworks/hw02_cross_entropy Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 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- " \n " ,
627+ " \n " ,
628628 " \n " ,
629629 " So here's how it works:"
630630 ]
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 {
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 " ,
You can’t perform that action at this time.
0 commit comments