

def control_signal(self, rnn_out):
    '\n        Given an output from the RNN calculate the control signals:\n        acceleration/braking and turn angle\n\n        Let rnn_output = [o1, o2, o3]. Then, we calculate:\n\n        signal_steering = (o1 + o2) / 2\n        Between -1 (full left) and +1 (full right)\n\n        signal_acceleration = o3\n        Between -1 (full brake) and +1 (full throttle)\n\n        Returns a pair: signal_steering, signal_acceleration\n        '
    signal_steering = ((rnn_out[0] + rnn_out[1]) / 2)
    signal_acceleration = self[2]
    if (signal_steering < (- 1)):
        signal_steering = (- 1)
    elif (signal_steering > 1):
        signal_steering = 1
    if (signal_acceleration < 0):
        signal_acceleration = 0
    elif (signal_acceleration > 1):
        signal_acceleration = 1
    return (signal_steering, signal_acceleration)

dataset/ETHPy150Open cosmoharrigan/neuroevolution/neuroevolution/policy.py CNNRNNPolicy.control_signal/VarMisuse@34/230 `rnn_out`->`self`