sample
abstract fun sample(uniform: GetValueIfc, count: Int, maxAttempts: Int = count * 20): Sequence<DoubleArray>(source)
Up to count feasible actions drawn at random — the only way to search a set that asSequence cannot walk, which on a model with several state-dependent levers is the usual case rather than the exception (§8.2.10: 97% of epochs).
uniform must yield U(0, 1) and should come from a RandomVariable owned by the policy, so that draws reset per replication and honour the model's stream options (§4.5.6, D.12). The set does not own randomness and must not.
The default strategy is rejection, so the yielded count may be fewer than count — with a tight equality constraint it may be zero. acceptanceRate is how a caller finds that out. A constraint-aware sampler may be substituted per constraint kind without changing this signature.