Andrei Cozma commited on
Commit
82f7820
·
1 Parent(s): 45b1b2a
Files changed (1) hide show
  1. run_tests.py +7 -4
run_tests.py CHANGED
@@ -3,21 +3,24 @@ import multiprocessing
3
  import random
4
 
5
  num_tests = 10
 
 
6
  vals_eps = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]
7
  vals_gamma = [1.0, 0.99, 0.98, 0.97, 0.95]
8
 
9
 
10
  def run_test(args):
11
  os.system(
12
- f"python3 MonteCarloAgent.py --train --gamma {args[0]} --epsilon {args[1]} --wandb_project cs581 --wandb_job_type params --wandb_run_name_suffix {args[2]} --no_save"
13
  )
14
 
15
 
16
  with multiprocessing.Pool(16) as p:
17
  tests = []
18
- for gamma in vals_gamma:
19
- for eps in vals_eps:
20
- tests.extend((gamma, eps, i) for i in range(num_tests))
 
21
  random.shuffle(tests)
22
 
23
  p.map(run_test, tests)
 
3
  import random
4
 
5
  num_tests = 10
6
+
7
+ update_types = ["first_visit", "every_visit"]
8
  vals_eps = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]
9
  vals_gamma = [1.0, 0.99, 0.98, 0.97, 0.95]
10
 
11
 
12
  def run_test(args):
13
  os.system(
14
+ f"python3 MonteCarloAgent.py --train --gamma {args[0]} --epsilon {args[1]} --update_type{args[2]} --wandb_project cs581 --wandb_job_type params --wandb_run_name_suffix {args[3]} --no_save"
15
  )
16
 
17
 
18
  with multiprocessing.Pool(16) as p:
19
  tests = []
20
+ for update_type in update_types:
21
+ for gamma in vals_gamma:
22
+ for eps in vals_eps:
23
+ tests.extend((gamma, eps, update_type, i) for i in range(num_tests))
24
  random.shuffle(tests)
25
 
26
  p.map(run_test, tests)