def performAction(self, action):
        """ adding the option to use an action space of size 5, where 
        we either apply a torque (+/- 2.0), displace the butt (+/- 0.02),
        or do nothing (ala, Lagoudakis).
        """
        if self.five_actions:
            p = 2.0 * np.random.rand() - 1.0
            T = 0
            d = self._butt_disturbance_amplitude * p
            
            self.t += 1
            self.action_history += one_to_n(action[0], self.nactions)
            
            # Map the action integer to a torque and displacement.
            assert round(action[0]) == action[0]
            if action[0] == 0:
                T = -2
            elif action[0] == 1:
                T = 2
            elif action[0] == 2:
                d -= 0.02
            elif action[0] == 3:
                d += 0.02  
                
            super(BalanceTask, self).performAction([T, d])
            
        else:
            BalanceTask.performAction(self, action)
dataset/ETHPy150Open chrisdembia/agent-bicycle/randlov1998/tasks.py/LSPIGotoTask.performAction/original