diff options
author | sjpark <sjpark@amazon.com> | 2023-10-27 13:55:15 -0700 |
---|---|---|
committer | sjpark <sjpark@amazon.com> | 2023-10-27 13:55:15 -0700 |
commit | 15e32b2b22adbf00e76d9611ecd34be1c97a99e9 (patch) | |
tree | 234158f5c63af07359b4754ce5f957aa081837dc | |
parent | ec80910162e0a9a7f78310641aa4f13acc0c15da (diff) | |
download | damon-hack-15e32b2b22adbf00e76d9611ecd34be1c97a99e9.tar.gz |
ideas/autotune_sim: Set normal error with variable
Signed-off-by: sjpark <sjpark@amazon.com>
-rwxr-xr-x | ideas/autotune_sim/autotune_sim.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ideas/autotune_sim/autotune_sim.py b/ideas/autotune_sim/autotune_sim.py index 877a71e..48605d9 100755 --- a/ideas/autotune_sim/autotune_sim.py +++ b/ideas/autotune_sim/autotune_sim.py @@ -44,6 +44,7 @@ def run_simulation(print_for_plot): answer = random.randint(1, 1024) goal = score_of(answer, a, b, 0) + normal_error_percent = 0.9 target_error = 1 target_in_error = 5 @@ -52,7 +53,7 @@ def run_simulation(print_for_plot): if print_for_plot: print('%d_%d_%d_%d' % (a, b, quota, answer)) for i in range(max_steps): - score = score_of(quota, a, b, 0.9) + score = score_of(quota, a, b, normal_error_percent) if abs(score - goal) / goal * 100 < target_error: nr_consecutive_in_target += 1 else: |