1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
#!/usr/bin/env python3
import random
from modeling import frensch_procedures
class Stimuli:
current_stimulus_id = 0
def __init__(self, condition, training_N=75, test_N=50):
self.condition = condition
self.training_N = training_N
self.test_N = test_N
def generate_stimuli(self):
self.training_stimuli = frensch_procedures.constrained_WaterSample()
self.test_stimuli = frensch_procedures.constrained_WaterSample()
def next_stimulus(self):
self.current_stimulus_id += 1
if self.current_stimulus_id < self.training_N:
return self.training_stimuli[self.current_stimulus_id]
else:
return self.test_stimuli[self.current_stimulus_id - self.training_N]
def update_current_stimulus(self, ):
pass
def generate_environments(self):
envs = []
screen = {}
self.generate_variables(screen)
self.generate_procedures(screen)
envs.append(screen)
return envs
def generate_procedures(self, screen):
procs = ["procs1", "procs2", "procs3", "procs4", "procs5", "procs6"]
screen["Procedure1"] = {"text": procs[0], "position": (0, 100)}
screen["Procedure2"] = {"text": procs[1], "position": (0, 200)}
screen["Procedure3"] = {"text": procs[2], "position": (0, 300)}
screen["Procedure4"] = {"text": procs[3], "position": (0, 400)}
screen["Procedure5"] = {"text": procs[4], "position": (0, 500)}
screen["ProcedureOverall"] = {"text": "proc_overall", "position": (0, 600)}
screen["Answers"] = {"text": "Answers", "position": (100, 100)}
screen["Answer1"] = {"text": 1, "position": (100, 200)}
screen["Answer2"] = {"text": 2, "position": (100, 300)}
screen["Answer3"] = {"text": 3, "position": (100, 400)}
screen["Answer4"] = {"text": 4, "position": (100, 500)}
screen["Answer5"] = {"text": 5, "position": (100, 600)}
screen["AnswerOverall"] = {"text": "proc_overall", "position": (100, 700)}
def generate_variables(self, screen):
# Variables
screen["Algen"] = {"text": "Algen", "position": (400, 100)}
screen["AlgenVar"] = {"text": "3", "position": (400, 200)}
screen["Mineralien"] = {"text": "Mineralien", "position": (500, 100)}
screen["MineralienVar"] = {"text": "9", "position": (500, 200)}
screen["Gifte"] = {"text": "Gifte", "position": (600, 100)}
screen["GifteVar1"] = {"text": "3", "position": (600, 200)}
screen["GifteVar2"] = {"text": "1", "position": (600, 300)}
screen["GifteVar3"] = {"text": "8", "position": (600, 400)}
screen["GifteVar4"] = {"text": "6", "position": (600, 500)}
screen["Sandstein"] = {"text": "Sandstein", "position": (700, 100)}
screen["SandsteinVar1"] = {"text": "3", "position": (700, 200)}
screen["SandsteinVar2"] = {"text": "4", "position": (700, 300)}
screen["SandsteinVar3"] = {"text": "5", "position": (700, 400)}
screen["SandsteinVar4"] = {"text": "6", "position": (700, 500)}
|