1. Learn
  2. /
  3. Courses
  4. /
  5. Deep Reinforcement Learning in Python

Connected

Exercise

Training the A2C algorithm

Time to train our Lunar Lander using the A2C algorithm! You have all the building blocks, now it's about putting it all together.

The actor and critic networks have been instantiated as actorand critic, as have their optimizers actor_optimizer and critic_optimizer.

Your REINFORCE select_action() function and the calculate_losses() function from the previous exercise are also available for you to use here.

Instructions

100 XP
  • Let the actor select the action, given the state.
  • Calculate the losses for both actor and critic.