From 2d445574131a42bd7a4f1bfc2e9f5106a344add3 Mon Sep 17 00:00:00 2001 From: Niclas Dobbertin Date: Sun, 1 Oct 2023 17:05:36 +0200 Subject: fix and set random condition --- master_thesis/frensch_task.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'master_thesis') diff --git a/master_thesis/frensch_task.py b/master_thesis/frensch_task.py index b680ccd..4bd2839 100644 --- a/master_thesis/frensch_task.py +++ b/master_thesis/frensch_task.py @@ -116,7 +116,9 @@ def run_trial(water_sample, procedure_keys: list, condition): water_sample.print_all() if condition == "random": + overall = procedure_keys.pop() random.shuffle(procedure_keys) + procedure_keys.append(overall) solid = DisplayVariable("Mineralien", [water_sample.solid]) algae = DisplayVariable("Algen", [water_sample.algae]) @@ -223,7 +225,7 @@ results = {} for i in range(TRAIN_TRIALS): print(train_procedures) answer, procedure_keys = run_trial( - all_samples[i], train_procedures, ORDER_CONDITIONS[0] + all_samples[i], train_procedures, ORDER_CONDITIONS[1] ) answer_dict = {} answer_dict["procedure_order"] = procedure_keys -- cgit v1.2.3