def test_icm():
    """
    **Overview**:
        This function serves as a testing routine for the Random Network Distillation (RND) model. The test includes the following steps:

        1. Initialization of the RND model with specified dimensions for the states and hidden layers.
        2. Generation of synthetic observations to simulate states.
        3. Training of the RND model using generated observations and the Adam optimizer.
        4. Evaluation of the trained model's performance based on its prediction loss.
        5. Computation of the RND intrinsic reward based on the model's prediction error.

        The function is intended for debugging and performance assessment of the RND model in a controlled setting with synthetic data.
    """
    # Define the dimensions for the observation space and the hidden layers
    obs_dim = 10
    hidden_dim = 20

    # Initialize the RND model and the Adam optimizer
    model = RNDNetwork(obs_dim, hidden_dim)
    optimizer = optim.Adam(model.parameters())

    # Generate some random observations
    obs = torch.randn(100, obs_dim)

    # Train the model and print the final training loss
    train_loss = train(model, optimizer, obs)
    print(f"Train loss: {train_loss}")

    # Evaluate the model and print the final evaluation loss
    eval_loss = eval(model, obs)
    print(f"Eval loss: {eval_loss}")

    # Test the computation of the RND intrinsic reward
    compute_rnd_reward(model, obs)

    **Overview**:
        This function serves as a testing routine for the Random Network Distillation (RND) model. The test includes the following steps:

        1. Initialization of the RND model with specified dimensions for the states and hidden layers.
        2. Generation of synthetic observations to simulate states.
        3. Training of the RND model using generated observations and the Adam optimizer.
        4. Evaluation of the trained model's performance based on its prediction loss.
        5. Computation of the RND intrinsic reward based on the model's prediction error.

        The function is intended for debugging and performance assessment of the RND model in a controlled setting with synthetic data.
    
chapter4_reward/curiosity_rnd.py