def __init__(self, Map, CostPrior, RewardPrior, CostParams, RewardParams, Capacity=-1, Minimum=0, SoftmaxChoice=True, SoftmaxAction=True, choiceTau=1, actionTau=0.01, CNull=0, RNull=0, Restrict=False):
        """
        Agent class.

        Create an agent with a set of costs and rewards.
        If sampling parameters are numbers rather than lists the constructor fixes this automatically.

        Args:
            Map (Map): A map object.
            CostPrior (str): String indicating prior's name. Run Agent.Priors() to see list
            RewardPrior (str): String indicating Reward prior's name. Run Agent.Priors() to see list
            CostParams (list): List of parameters for sampling costs.
            RewardParams (list): List of parameters for sampling rewards.
            Capacity (int): Number of objects agent can carry. If set to -1 Planner adjusts
                            it to the total number of objects in the map.
            Minimum (int): Minimum number of objects must take before leaving.
            SoftmaxChoice (bool): Does the agent select goals optimally?
            SoftmaxAction (bool): Does the agent act upong goals optimally?
            choiceTau (float): Softmax parameter for goal selection.
            actionTau (float): Softmax parameter for action planning.
            CNull (float): Probability that a terrain has no cost.
            RNull (float): Probability that an object has no reward
            Restrict (bool): When set to true the cost samples make the first terrain
                            always less costly than the rest.
        """
        # Check that priors exist.
        Priors = self.Priors(False)
        if CostPrior in Priors:
            self.CostPrior = CostPrior
        else:
            print("WARNING: Cost prior not found! Setting to uniform")
            self.CostPrior = "ScaledUniform"
        if RewardPrior in Priors:
            self.RewardPrior = RewardPrior
        else:
            print("WARNING; Reward prior not found! Setting to uniform")
            self.RewardPrior = "ScaledUniform"
        self.Restrict = Restrict
        self.CostDimensions = len(np.unique(Map.StateTypes))
        # Get dimensions over which you'll build your simplex
        self.RewardDimensions = len(set(Map.ObjectTypes))
        self.Capacity = Capacity
        self.Minimum = Minimum
        self.SoftmaxChoice = SoftmaxChoice
        self.SoftmaxAction = SoftmaxAction
        if SoftmaxAction:
            self.actionTau = actionTau
        else:
            self.actionTau = None
        if SoftmaxChoice:
            self.choiceTau = choiceTau
        else:
            self.choiceTau = None
        if self.RewardDimensions == 0:
            print("WARNING: No rewards on map. AGENT-001")
        if isinstance(CostParams, list):
            self.CostParams = CostParams
        else:
            self.CostParams = [CostParams]
        if isinstance(RewardParams, list):
            self.RewardParams = RewardParams
        else:
            self.RewardParams = [RewardParams]
        self.CNull = CNull
        self.RNull = RNull
        self.ResampleCosts()  # Generate random cost of map
        self.ResampleRewards()  # Generate random rewards for objects