academia.utils.models module

Ready-made network architectures to use with agents and environments provided by academia package.

Note

These are just example architectures that allow users to quickly set up simple experiments. Users are encouraged to design their own network architectures that better suit their needs.

Models for BridgeBuilding environment

class academia.utils.models.bridge_building.MLPActor

Bases: Module

Neural network architecture for PPO (actor) compatible with Bridge Building environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

  • obs_type='array'

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.bridge_building.MLPCritic

Bases: Module

Neural network architecture for PPO (critic) compatible with Bridge Building environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

  • obs_type='array'

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.bridge_building.MLPDQN

Bases: Module

Neural network architecture for DQN compatible with Bridge Building environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

  • obs_type='array'

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.bridge_building.MLPStepActor

Bases: Module

Neural network architecture for PPO (actor) compatible with Bridge Building environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

  • obs_type='array'

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.bridge_building.MLPStepCritic

Bases: Module

Neural network architecture for PPO (critic) compatible with Bridge Building environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

  • obs_type='array'

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.bridge_building.MLPStepDQN

Bases: Module

Neural network architecture for DQN compatible with Bridge Building environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

  • obs_type='array'

forward(obs) Tensor

Defines the computation performed at every call.

Models for DoorKey environment

class academia.utils.models.door_key.MLPActor

Bases: Module

Neural network architecture for PPO (actor) compatible with Door Key environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.door_key.MLPCritic

Bases: Module

Neural network architecture for PPO (critic) compatible with Door Key environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.door_key.MLPDQN

Bases: Module

Neural network architecture for DQN compatible with Door Key environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

forward(x) Tensor

Defines the computation performed at every call.

class academia.utils.models.door_key.MLPStepActor

Bases: Module

Neural network architecture for PPO (actor) compatible with Door Key environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.door_key.MLPStepCritic

Bases: Module

Neural network architecture for PPO (critic) compatible with Door Key environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.door_key.MLPStepDQN

Bases: Module

Neural network architecture for DQN compatible with Door Key environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

forward(x) Tensor

Defines the computation performed at every call.

Models for LavaCrossing environment

class academia.utils.models.lava_crossing.MLPActor

Bases: Module

Neural network architecture for PPO (actor) compatible with Lava Crossing environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.lava_crossing.MLPCritic

Bases: Module

Neural network architecture for PPO (critic) compatible with Lava Crossing environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.lava_crossing.MLPDQN

Bases: Module

Neural network architecture for DQN compatible with Lava Crossing environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

forward(x) Tensor

Defines the computation performed at every call.

class academia.utils.models.lava_crossing.MLPStepActor

Bases: Module

Neural network architecture for PPO (actor) compatible with Lava Crossing environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.lava_crossing.MLPStepCritic

Bases: Module

Neural network architecture for PPO (critic) compatible with Lava Crossing environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.lava_crossing.MLPStepDQN

Bases: Module

Neural network architecture for DQN compatible with Lava Crossing environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

forward(x) Tensor

Defines the computation performed at every call.

Models for LunarLander environment

class academia.utils.models.lunar_lander.MLPActor

Bases: Module

Neural network architecture for PPO (actor) compatible with Lunar Lander environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.lunar_lander.MLPCritic

Bases: Module

Neural network architecture for PPO (critic) compatible with Lunar Lander environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.lunar_lander.MLPDQN

Bases: Module

Neural network architecture for DQN compatible with Lunar Lander environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.lunar_lander.MLPStepActor

Bases: Module

Neural network architecture for PPO (actor) compatible with Lunar Lander environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.lunar_lander.MLPStepCritic

Bases: Module

Neural network architecture for PPO (critic) compatible with Lunar Lander environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.lunar_lander.MLPStepDQN

Bases: Module

Neural network architecture for DQN compatible with Lunar Lander environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

forward(obs) Tensor

Defines the computation performed at every call.

Models for MsPacman environment

class academia.utils.models.ms_pacman.MLPActor

Bases: Module

Neural network architecture for PPO (actor) compatible with Ms Pacman environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

  • obs_type='ram'

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.ms_pacman.MLPCritic

Bases: Module

Neural network architecture for PPO (critic) compatible with Ms Pacman environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

  • obs_type='ram'

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.ms_pacman.MLPDQN

Bases: Module

Neural network architecture for DQN compatible with Ms Pacman environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=False

  • obs_type='ram'

forward(x) Tensor

Defines the computation performed at every call.

class academia.utils.models.ms_pacman.MLPStepActor

Bases: Module

Neural network architecture for PPO (actor) compatible with Ms Pacman environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

  • obs_type='ram'

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.ms_pacman.MLPStepCritic

Bases: Module

Neural network architecture for PPO (critic) compatible with Ms Pacman environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

  • obs_type='ram'

forward(obs) Tensor

Defines the computation performed at every call.

class academia.utils.models.ms_pacman.MLPStepDQN

Bases: Module

Neural network architecture for DQN compatible with Ms Pacman environment with the following parameters:

  • n_frames_stacked=1

  • append_step_count=True

  • obs_type='ram'

forward(x) Tensor

Defines the computation performed at every call.