import torch
import os
import numpy as np
from core.rl.agents.ac_agent import ACAgent
from core.utils.general_utils import ParamDict, map_dict, AttrDict
from core.utils.pytorch_utils import ten2ar, avg_grad_norm, TensorModule, check_shape, map2torch, map2np

class RandomAgent(ACAgent):
    def __init__(self, config):
        super().__init__(config)
        self._hp = self._default_hparams().overwrite(config)

    def _default_hparams(self):
        default_dict = ParamDict({})
        return super()._default_hparams().overwrite(default_dict)

    def update(self, experience_batch):
        return {}

    def add_experience(self, experience_batch):
        pass

    def _run_policy(self, obs):
        return self._act_rand(obs)

