budget
Budget class for agents.
Classes
Specifications for generating a random budget sample. |
Module Contents
- class budget.Budget
Specifications for generating a random budget sample.
This is used for assigning the agent’s budget in base tokens. Wei in the variables below refers to the smallest unit of base, not to ETH.
- mean_wei: int
- std_wei: int
- min_wei: int
- max_wei: int
- sample_budget(rng: numpy.random.Generator) fixedpointmath.FixedPoint
Return a sample from a clipped normal distribution.
Sample from normal distribution with mean of mean_wei and standard deviation of std_wei. Then clip to between a minimum of min_wei and a maximum of max_wei.
- Parameters:
rng (Generator) – The numpy Generator provides access to a wide range of distributions, and stores the random state.
- Returns:
A sample from a clipped random normal distribution according to the parameters defined at construction
- Return type:
FixedPoint