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

Connected

Exercise

Environment and neural network setup

You'll begin by setting up the environment you'll use throughout the course: the Lunar Lander environment, where an agent controls the thrusters for a vehicle attempting to land on the moon.

torch, torch.nn, torch.optim and gym are imported into your exercises.

Instructions

100 XP
  • Initialize the Lunar Lander environment in gym (LunarLander-v2).
  • Define a single linear transformation layer, with input dimension dim_inputs and output dimension dim_outputs.
  • Instantiate the Neural Network for input dimension 8 and output dimension 4.
  • Provide the Adam optimizer with the parameters.