Click4Ai

450.

Hard

Curiosity-Driven Exploration is a technique used in Reinforcement Learning to encourage the agent to explore its environment. It works by adding a curiosity bonus to the reward, which encourages the agent to take actions that lead to new experiences. For example, if an agent is trying to reach a goal, but it's not sure how to get there, the curiosity bonus would encourage it to take actions that lead to new experiences. Your task is to implement the curiosity-driven exploration algorithm.

**Example:** Suppose we have a 2D grid world where the agent can move up, down, left, or right. The goal is to reach the target. The agent's experience is stored in a replay buffer, and the curiosity-driven exploration algorithm is used to train the agent.

**Constraints:** The grid size is 5x5, the target is at position (4,4), and the agent starts at position (0,0).

**Note:** This problem requires a good understanding of Reinforcement Learning and the curiosity-driven exploration algorithm.

Test Cases

Test Case 1
Input: [{'state': [0, 0], 'action': 0, 'reward': 0.0, 'done': False}, {'state': [0, 1], 'action': 1, 'reward': 0.0, 'done': False}]
Expected: 1.4142135623730951
Test Case 2
Input: [{'state': [4, 4], 'action': 3, 'reward': 0.0, 'done': False}, {'state': [4, 3], 'action': 2, 'reward': 0.0, 'done': False}]
Expected: 1.0
+ 3 hidden test cases