Reward Shaping
===============
In reinforcement learning, reward shaping is a technique used to modify the reward function to guide the agent towards desired behaviors. The goal is to create a reward function that encourages the agent to take actions that lead to a better outcome.
**Example:** Consider a robot arm that needs to pick up a block. A naive reward function might give a reward of 1 for picking up the block and a penalty of -1 for dropping it. However, this might not be enough to encourage the robot to pick up the block efficiently. A shaped reward function might give a reward of 2 for picking up the block and a penalty of -0.5 for each step taken to pick up the block.
**Constraints:** The shaped reward function should still be a valid reward function, i.e., it should be bounded and should not encourage the agent to take actions that lead to an infinite reward.
**Your Task:** Implement a reward shaping function that takes the original reward function and the shaped reward function as input and returns the shaped reward function.
Test Cases
np.array([1, 2])np.array([2, 4])np.array([3, 4])np.array([6, 8])