In this problem, you will work with the Mountain Car environment, a classic reinforcement learning environment. Your goal is to drive a car up a steep mountain by applying forces to the car. The environment returns the state of the car and you need to decide the action to take (left or right force) to drive the car up the mountain. **Example:** Suppose the current state is [0.1, 0.2, 0.3] representing the car position, car velocity, and angle. You need to decide whether to apply a left force (0) or right force (1). **Constraints:** The car position and velocity should be within [-1.2, 0.6] and [-0.07, 0.07] respectively. The angle should be within [-0.2, 0.2] respectively.
Test Cases
Test Case 1
Input:
np.array([0.1, 0.02, 0.1])Expected:
np.array([0.1, -0.0001, 0.1])Test Case 2
Input:
np.array([-1.3, 0.02, 0.1])Expected:
np.array([0, 0, 0])+ 3 hidden test cases