-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrives.py
66 lines (39 loc) · 1.2 KB
/
drives.py
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
# Drives: Social, Stimuli, Fatigue
# Regimes: 'Overwhelmed', 'Homeostatic', 'Under-stimulated'
class Drive:
#regime = "homeostatic"
def __init__(self):
self.previous_activation = 0
self.activation = self.previous_activation
self.min_activation = -15
self.max_activation = 15
self.regime = "Homeostatic"
def __repr__(self):
return "Activation: {0} \nPrevious_activation: {1} \n Regime: {2}".format(self.activation,
self.previous_activation,
self.regime)
def update_activation(self, new_activation):
self.previous_activation = self.activation
self.activation += new_activation
if self.activation > 15:
self.activation = 15
elif self.activation < -15:
self.activation = -15
#return self.activation
def set_current_regime(self):
if self.activation < -5:
self.regime = "Overwhelmed"
elif self.activation >= -5 and self.activation <= 5:
self.regime = "Homeostatic"
else:
self.regime = "Under-stimulated"
#return self.regime
class Social(Drive):
def __init__(self):
super().__init__()
class Stimuli(Drive):
def __init__(self):
super().__init__()
class Fatigue(Drive):
def __init__(self):
super().__init__()