-
Notifications
You must be signed in to change notification settings - Fork 4
/
run_cbkb.py
46 lines (39 loc) · 1.32 KB
/
run_cbkb.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
import os
import sys
base_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../..")
base_dir = os.path.dirname(os.path.realpath(__file__))
sys.path.append(base_dir)
import argparse
from datetime import date
today = date.today()
from run import do_single_experiment
def experiment(args):
mu = 0
lbds = [1, 10, 100]
count = 0
c = 1
beta = 1
for lbd in lbds:
for rd in range(3):
settings = {
'agent': 'cbkb',
'T': args.T,
'random_seed': rd,
'mu': mu,
'reg_lambda': lbd,
'projection': 'kors',
'eps': 0.5,
'beta': beta,
'C': c,
'kernel': 'gauss',
'env': args.env,
'expname': 'experiment_cbkb'
}
do_single_experiment(settings)
count += 1
print('Done {} experiments'.format(count))
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Run scripts for the evaluation of methods')
parser.add_argument('--env', nargs="?", type=str, default='bump', choices=['bump', 'step_diag', 'squares'], help='Environment choice')
parser.add_argument('--T', nargs="?", type=int, default=1000, help='Max horizon')
experiment(parser.parse_args())