-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
28 lines (25 loc) · 766 Bytes
/
Copy pathconfig.py
File metadata and controls
28 lines (25 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""
Contains all hyperparameters and other variable values.
Author: Pietro Paniccia
"""
import torch
class Config:
env_name = "ALE/SpaceInvaders-v5"
render_mode = "rgb_array"
frameskip = 4
num_actions = None
obs_shape = None
# Hyper parameters
learning_rate = 1e-4
gamma = 0.99
batch_size = 32
memory_size = 100000 # Amount of replay memory
epsilon_start = 1.0
epsilon_min = 0.1
epsilon_decay = 1e-6 # Amount of decay for linear epsilon decay
target_update = 1000
num_episodes = 10000
epsilon_decay_steps = 250000
state_shape = (4,84,84)
# Uses cuda if available and if not cpu
device = torch.accelerator.current_accelerator().type if torch.accelerator.is_available() else "cpu"