Download code/case2/fixed_design.py from harryzhang1018/TestRandomization: direct link, hf CLI and curl.
- Browser
- Download file 2.06 kB
-
https://huggingface.co/datasets/harryzhang1018/TestRandomization/resolve/main/code/case2/fixed_design.py
- Command line
-
hf download hf://datasets/harryzhang1018/TestRandomization/code/case2/fixed_design.py
-
curl -L -o fixed_design.py https://huggingface.co/datasets/harryzhang1018/TestRandomization/resolve/main/code/case2/fixed_design.py
2.06 kB
| """Fixed TR design for the held-out evaluation on goal set B (Sim2Sim). | |
| Fixed before any goal-set-B run and before any evaluation of the held-out policies (seeds 2001-2004). | |
| Chosen from the goal-set-A exploration (see variants.py and results/exploration_report.md). | |
| PRIMARY_TR is the only condition in the primary test. All others are secondary and are reported whatever | |
| their result. Distributions use the same parameter names as rom_batch.DEFAULTS; one trial = one scenario. | |
| Condition names also seed the random streams (run_rom.seed_of), so they are kept unchanged. | |
| """ | |
| from variants import REL | |
| TRIALS = 20 | |
| PRIMARY_TR = 'tr_rate' | |
| BASELINE = 'nominal' | |
| CONDITIONS = { | |
| # baseline: nominal ROM = the training ROM, deterministic, K = 1 | |
| 'nominal': (1, {}), | |
| # PRIMARY TR: noise-only TR (action N(0,0.05) on throttle and steering; tau0 N(1000,50), omega0 N(2600,100)) | |
| # plus a random steering-rate limit, LogUniform(0.05, 0.5) normalized units per 0.1 s control step, one draw per trial | |
| 'tr_rate': (TRIALS, {**REL, 'steer_rate': ('loguniform', 0.05, 0.5)}), | |
| # secondary: noise-only TR (action and powertrain noise, no rate limit) | |
| 'paper_tr': (TRIALS, REL), | |
| # secondary: sensitivity of the primary TR to the range and the shape of the rate-limit distribution | |
| 'tr_rate_half': (TRIALS, {**REL, 'steer_rate': ('loguniform', 0.025, 0.25)}), | |
| 'tr_rate_double': (TRIALS, {**REL, 'steer_rate': ('loguniform', 0.1, 1.0)}), | |
| 'tr_rate_uniform': (TRIALS, {**REL, 'steer_rate': ('uniform', 0.05, 0.5)}), | |
| # secondary: the other actuator family (random delay of 0-3 control steps) with the noise-only TR | |
| 'tr_delay': (TRIALS, {**REL, 'delay': ('choice', [0, 1, 2, 3])}), | |
| # secondary deterministic baselines (not TR): the release Chrono loop's fixed rate limit 0.1; | |
| # the fixed rate limit with the 1 s start hold and the HMMWV wheelbase (3.378 m) | |
| 'det_rate_0.1': (1, {'steer_rate': ('const', 0.1)}), | |
| 'det_calibrated': (1, {'wheelbase': ('const', 3.378), 'steer_rate': ('const', 0.1), 'hold': ('const', 10)}), | |
| } | |