Last active
July 9, 2020 20:58
-
-
Save djbyrne/c577db58d1899ad32803a02cf5e57d5c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LunarLanderDQN(DQN): | |
def __init__( | |
self, | |
env: str, | |
eps_last_frame: int = 10000, | |
sync_rate: int = 10, | |
learning_rate: float = 1e-2, | |
batch_size: int = 16, | |
replay_size: int = 10000, | |
warm_start_size: int = 10000, | |
**kwargs, | |
): | |
super().__init__(env, eps_last_frame, sync_rate, learning_rate, | |
replay_size, warm_start_size, **kwargs) | |
# New environment | |
self.env = gym.make(env) | |
self.obs_shape = self.env.observation_space.shape | |
self.n_actions = self.env.action_space.n | |
# New network | |
self.net = MLP(self.obs_shape, self.n_actions) | |
self.target_net = MLP(self.obs_shape, self.n_actions) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment