-
Notifications
You must be signed in to change notification settings - Fork 13
/
arguments.py
36 lines (33 loc) · 2.64 KB
/
arguments.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
import argparse
def achieve_arguments():
parse = argparse.ArgumentParser()
parse.add_argument('--gamma', type=float, default=0.99, help='the discount factor of RL')
parse.add_argument('--seed', type=int, default=123, help='the random seeds')
parse.add_argument('--env-name', type=str, default='BreakoutNoFrameskip-v4', help='the environment name')
parse.add_argument('--lr', type=float, default=7e-4, help='learning rate of the algorithm')
parse.add_argument('--value-loss-coef', type=float, default=0.5, help='the coefficient of value loss')
parse.add_argument('--tau', type=float, default=0.95, help='gae coefficient')
parse.add_argument('--cuda', action='store_true', help='use cuda do the training')
parse.add_argument('--total-frames', type=int, default=20000000, help='the total frames for training')
parse.add_argument('--eps', type=float, default=1e-5, help='param for adam optimizer')
parse.add_argument('--save-dir', type=str, default='saved_models/', help='the folder to save models')
parse.add_argument('--nsteps', type=int, default=5, help='the steps to update the network')
parse.add_argument('--num-processes', type=int, default=16, help='the number of cpu you use')
parse.add_argument('--entropy-coef', type=float, default=0.01, help='entropy-reg')
parse.add_argument('--log-interval', type=int, default=100, help='the log interval')
parse.add_argument('--alpha', type=float, default=0.99, help='the alpha coe of RMSprop')
parse.add_argument('--max-grad-norm', type=float, default=0.5, help='the grad clip')
parse.add_argument('--use-gae', action='store_true', help='use-gae')
parse.add_argument('--batch-size', type=int, default=512, help='the batch size to update the sil module')
parse.add_argument('--capacity', type=int, default=100000, help='the capacity of the replay buffer')
parse.add_argument('--n-update', type=int, default=4, help='the update of sil part')
parse.add_argument('--sil-alpha', type=float, default=0.6, help='the exponent for PER')
parse.add_argument('--sil-beta', type=float, default=0.1, help='sil beta')
parse.add_argument('--mini-batch-size', type=int, default=64, help='the minimal batch size')
parse.add_argument('--max-nlogp', type=float, default=5, help='max nlogp')
parse.add_argument('--clip', type=float, default=1, help='clip parameters')
parse.add_argument('--w-value', type=float, default=0.01, help='the wloss coefficient')
parse.add_argument('--log-dir', type=str, default='logs/', help='the log dir')
parse.add_argument('--no-sil', action='store_true', help='check if use the sil')
args = parse.parse_args()
return args