File tree 1 file changed +26
-0
lines changed
simple_playgrounds/agents/parts
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,14 @@ def _check_value(self, value):
47
47
def apply_action (self , value ):
48
48
pass
49
49
50
+ @abstractmethod
51
+ def min (self ):
52
+ pass
53
+
54
+ @abstractmethod
55
+ def max (self ):
56
+ pass
57
+
50
58
51
59
class InteractionActuator (Actuator , ABC ):
52
60
@@ -55,6 +63,14 @@ class InteractionActuator(Actuator, ABC):
55
63
def _check_value (self , value ):
56
64
assert value in [0 , 1 ]
57
65
66
+ @property
67
+ def min (self ):
68
+ return 0
69
+
70
+ @property
71
+ def max (self ):
72
+ return 1
73
+
58
74
59
75
class Activate (InteractionActuator ):
60
76
@@ -106,6 +122,16 @@ def _check_value(self, value):
106
122
else :
107
123
assert 0 <= value <= 1
108
124
125
+ @property
126
+ def min (self ):
127
+ if self .centered :
128
+ return - 1
129
+ return 0
130
+
131
+ @property
132
+ def max (self ):
133
+ return 1
134
+
109
135
110
136
class LongitudinalForce (PhysicalActuator ):
111
137
You can’t perform that action at this time.
0 commit comments