-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathparameters.py
More file actions
41 lines (36 loc) · 782 Bytes
/
parameters.py
File metadata and controls
41 lines (36 loc) · 782 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
29
30
31
32
33
34
35
36
37
38
39
40
41
# COLORS
SNAKE_C = (209, 204, 192)
APPLE_C = (192, 57, 43) #(255, 195, 18) #(255, 177, 66)
BG = (44, 44, 84) # background
APP_BG = (240, 240, 240)
GRID_BG = (44, 44, 84)
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
GREY = (113, 128, 147)
GREY2 = (189, 195, 199)
GREY3 = (87, 96, 111)
# GUI
PIXEL = 100
WIDTH_HEIGHT = 800
APP_WIDTH = 800
APP_HEIGHT = 600
TRAIN_HEIGHT = 500
TIME_DELAY = 40
TIME_TICK = 280
LOAD = True
# Env
ROW = 10
# Q-learning
GAMMA = 0.99 # discount
BATCH_SIZE = 3
REPLAY_SIZE = 10000
LEARNING_RATE = 1e-4
SYNC_TARGET_LOOPS = 1000
REPLAY_START_SIZE = 10000
# + epsilon -> chance for random action
EPSILON_DECAY_LAST_FRAME = 10**5
EPSILON_START = 1.0
EPSILON_FINAL = 0.00001
# Neural network
INPUT_SIZE = 28
N_ACTIONS = 4