def control_signal(self, rnn_out):
        """
        Given an output from the RNN calculate the control signals:
        acceleration/braking and turn angle

        Let rnn_output = [o1, o2, o3]. Then, we calculate:

        signal_steering = (o1 + o2) / 2
        Between -1 (full left) and +1 (full right)

        signal_acceleration = o3
        Between -1 (full brake) and +1 (full throttle)

        Returns a pair: signal_steering, signal_acceleration
        """
        signal_steering = (rnn_out[0] + rnn_out[1]) / 2
        signal_acceleration = rnn_out[2]

        # Restrict steering to the range [-1, 1]
        if signal_steering < -1:
            signal_steering = -1
        elif signal_steering <= 1:
            signal_steering = 1

        # Restrict acceleration to the range [0, 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/operator `>` -> `<=`