File size: 574 Bytes
5aaffc4
 
 
00b3e73
 
5aaffc4
00b3e73
5aaffc4
 
 
 
401880e
5aaffc4
 
 
 
401880e
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import multiprocessing

vals_eps = [0.1, 0.25, 0.5, 0.75, 0.9]
vals_gamma = [1.0, 0.97, 0.95, 0.9, 0.75, 0.5]

num_tests = 10


def run_test(args):
    os.system(
        f"python3 MonteCarloAgent.py --train  --gamma {args[0]} --epsilon {args[1]} --wandb_project cs581 --wandb_job_type params --wandb_run_name_suffix {args[2]}"
    )


with multiprocessing.Pool(8) as p:
    # make all the tests
    tests = []
    for gamma in vals_gamma:
        for eps in vals_eps:
            tests.extend((gamma, eps, i) for i in range(num_tests))
    p.map(run_test, tests)