(InflGame.domains.rd)
multi_modal_gaussian_distribution_1D#
- InflGame.domains.rd.multi_modal_gaussian_distribution_1D(bin_points, stds=[0.1, 0.1], means=[0.5, 0.5], mode_factors=[1, 1])#
Compute a 1D multi-modal Gaussian mixture distribution for resources.
Creates a resource distribution as a weighted sum of Gaussian kernels, each with its own mean, standard deviation, and scaling factor. This allows modeling of complex multi-modal resource landscapes.
The distribution is defined as:
\[R(b) = \sum_{i=1}^{k} \alpha_i \cdot \exp\left(-\frac{(b - \mu_i)^2}{2\sigma_i^2}\right)\]where \(k\) is the number of modes, \(\alpha_i\) is the scaling factor for mode \(i\), \(\mu_i\) is the mean of mode \(i\), and \(\sigma_i\) is the standard deviation of mode \(i\).
- Parameters:
- bin_pointsnp.ndarray | torch.Tensor
Points where the distribution is evaluated, typically on the interval [0, 1].
- stdslist[float], optional
Standard deviations \(\sigma_i\) for each Gaussian mode, by default [.1, .1].
- meanslist[float], optional
Mean values \(\mu_i\) for each Gaussian mode, by default [.5, .5].
- mode_factorslist[float], optional
Scaling factors \(\alpha_i\) for each mode, by default [1, 1].
- Returns:
- np.ndarray
Computed resource distribution values at the specified bin_points.
Notes
All three parameter lists (stds, means, mode_factors) must have the same length, corresponding to the number of modes \(k\) in the mixture.
Examples
>>> bin_points = np.linspace(0, 1, 100) >>> resources = multi_modal_gaussian_distribution_1D( ... bin_points, stds=[0.1, 0.15], means=[0.3, 0.7], mode_factors=[1, 1.5] ... )