forked from orla84/IPaLot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfg.py
58 lines (40 loc) · 1.04 KB
/
cfg.py
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 17 10:30:44 2018
@author: Orlando Ciricosta
"""
# training time in seconds
TRAINING_TIME = 3600*8
# number of moving cars per episode
N_CARS = 4
# number of threads
OPTIMIZERS = 3
ENVIRONMENTS = 8
#-- constants for A3C
import numpy as np
INPUT_SHAPE = (None, 29, 4, 1)
NONE_STATE = [np.zeros((4,)), np.zeros((4,)), np.zeros((29,4,1))]
'''shape for the colliding cars input, there are 29 of them,
each with a rect (4 numbers). The Filled_Lot class in Group_handler.py
is where the total number of cars 29+1 comes from'''
COLLISION_PENALTY = 0.2
NUM_ACTIONS=7 # do not change
MIN_BATCH = 128
LEARNING_RATE = 5e-4
RMSP_DECAY = 0.9
LOSS_V = 0.5 # v loss coefficient
LOSS_ENTROPY = 0.1 # entropy coefficient
GAMMA = 0.999
N_STEP_RETURN = 10
GAMMA_N = GAMMA ** N_STEP_RETURN
EPS_START = 0.8
EPS_STOP = 0.5
EPS_STEPS = 5e6
THREAD_DELAY = 0.001
MAX_FRAMES = 10000
# Epochs between saving the weights
EPOCHS_PER_SAVE = 1000
# bkg color
BACKGROUND_COLOR = (50, 50, 50)
#screen size
WIDTH, HEIGHT = 700, 400