Tags: HighDiceRoller/icepool
Tags
* Providing only a `drop` argument to `lowest()` or `highest()` will … …now keep all other elements rather than just the first non-dropped element. * `depth` argument to `Die.reroll()` is now mandatory. * `tuple` outcomes are now auto-`tupleize`d again during `Die` construction. * Add `Die.stochastic_round()` method. * Add `percent` option to `Population.probability` methods. * Add new `again_count` mode for handling `Again`, which limits the total number of dice. * Improved ability to `keep` from both ends for certain types of multiset expressions. * Rename `func` parameters to `function`. * Experimental `Die.reroll_to_pool()` method. * Experimental `all_straights_reduce_counts` and `argsort` multiset evaluations.
* Rename `keep_counts` to `keep_counts_ge`. Add `le`, `lt`, `gt`, `eq… …`, and `ne` variants. * Add `count_subset` evaluation that counts how many times the right side is contained in the left. * Add `ImplicitConversionError` as subclass of `TypeError`. * Add binary multiset operators to `Deck`. * Add `modulo_counts` / `%` operation on multisets. * Rebind generators and evaluate when fully bound non-generator expressions are given to an evaluator. * Fix `Symbols` intersection. * Fix argument order in `__rfloordiv__`.
* Fix `Symbols` operator priority with `Population`, `AgainExpression`. * Added experimental `map_to_pool` and `explode_to_pool` methods. * Split `compair` into `compare_lt` etc. * Constructing a mixture of dice now effectively uses the old `lcm_joint` method, which reduces the denominator more aggressively.
* Experimental `Symbols` class representing a multiset of characters. * `marginals` now forwards `__getattr__` to outcomes, as long as the attribute name doesn't begin with an underscore. * Operators on expressions now keep negative counts by default. The `keep_negative_counts` argument is retired. * Add unary `-` for `MultisetExpression`. * `MultisetExpression.isdisjoint()` now raises an error for negative counts. * Small performance optimization for `Vector`. * `Population.marginals` is no longer a `Sequence`, since the mixins don't make sense. * `Mapping`s are now properly excluded from `Population.common_outcome_length`. * Fixed quoting in `repr` for populations.
* Add `z(n)`, which produces a die that runs from 0 to `n - 1` inclus… …ive. * Add `Population.to_one_hot()`, which converts the die or deck to a one-hot representation. * Add `Die.mean_time_to_sum()`, which computes the mean number of rolls until the cumulative sum is greater or equal to the target.
* `mean()`, `variance()`, etc. now return an exact `fractions.Fractio… …n` when possible. (Note that `Fraction`s only support float-style formatting from 3.12.) * Rename `disjoint_union` to `additive_union`. * Add `keep_negative_counts` keyword argument to `+, -, &, |` binary operators for multiset expressions (default `False`). * Symmetric difference (`^`) for multiset expressions is now a straight absolute difference of counts. * Add unary `+` operator for multiset expressions, which is the same as `keep_counts(0)`.
PreviousNext