swarmrl.sampling_strategies.gumbel_distribution Module API Reference¶
Module for the Gumbel distribution.
GumbelDistribution
¶
Bases: SamplingStrategy
, ABC
Class for the Gumbel distribution.
Source code in swarmrl/sampling_strategies/gumbel_distribution.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
__call__(logits)
¶
Sample from the distribution.
Parameters¶
logits : np.ndarray (n_colloids, n_dimensions) Logits from the model to use in the computation for all colloids.
Returns¶
indices : np.ndarray (n_colloids,) Indeices of chosen actions for all colloids.
Notes¶
See https://arxiv.org/abs/1611.01144 for more information.
Source code in swarmrl/sampling_strategies/gumbel_distribution.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|