-
Notifications
You must be signed in to change notification settings - Fork 0
/
runc51.py
31 lines (27 loc) · 973 Bytes
/
runc51.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
import gym
import time
import numpy as np
import argparse
from accord.c51.workerC51 import worker
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='Run C51 for K-steps with and without resume')
parser.add_argument('-env', dest='env_str', help="Environment string.")
parser.add_argument('-id',
dest='wid',
type=int,
help="Designated worker id.")
parser.add_argument('-k',
dest='k',
type=int,
help="Training steps in thousands.")
parser.add_argument('-resume',
dest='rflag',
action='store_true',
help="To resume or not to resume")
args = parser.parse_args()
env_str = args.env_str
worker(wid=args.wid,
env_str=env_str,
k_steps=args.k,
resumeflag=args.rflag)