-
0.20.1fb263400 · ·
* Added `one_hot` function. * Added experimental suit generator that wraps a generator and produces counts for all suits for each value.
-
0.20.01160cc07 · ·
* Retired `denominator_method`. * Renamed `max_depth` parameters to just `depth`. * Binary operators delegate to `Again`'s behavior. * Only single outcomes implicity convert to `Die`. * `marginals` is now a Sequence, and can be iterated over, unpacked, etc. * `Die.sub()` now expands extra die arguments into their outcomes.
-
-
0.19.0d90b02c5 · ·
New experimental feature: `Again()`, a placeholder that allows to roll again with some modification. * `**kwargs` are forwarded to the constructor of the yielded or returned die for `sub`, `if_else`, `reduce`, `accumulate`, `apply`, `apply_sorted`. * Add optional `final_kwargs` method to evaluators. * Rename `max_depth` parameter of `sub()` to `repeat`.
-
0.18.0a9ab369f · ·
* Rename `Die.reduce()` to `Die.simplify()` to avoid confusion with the free function `reduce()`. * Rename `OutcomeCountEvaluator.direction()` to `order()` and add explicitly named `Order` enums. * Add `is_in`, `count`, and `count_in` methods to dice. * Add built-in evaluators as convenience functions of `OutcomeCountGenerator`.
-
-
-
0.17.25673c9f9 · ·
* `sub()` with `max_depth=None` now handles "monotonic" transitions with finite states. Full absorbing Markov chain calculation still under consideration. * `sub()` no longer accept sequence input. * Some minor formatting fixes.
-
0.17.1610b18e4 · ·
* Standardize outcome count of `bernoulli`/`coin` and comparators. * `standard_pool` now accepts a `dict` argument. * `post_roll_counts` renamed again to `sorted_roll_counts`. * `apply_sorted` can be subscripted to set the `sorted_roll_counts`. * Pools are no longer resizable after creation. * `Die.pool()` now has mandatory argument, now accepts a sequence argument to set `sorted_roll_counts`.
-
0.17.03c486113 · ·
More renaming, experimental `sample()` methods. * Both `Die` and `Deck` now have `quantities` rather than `weight`, `dups`, etc. * Many `Die` methods moved to base class and are now available to `Deck`. * "Eval" is now the full word "Evaluator". * Parameter and method names are no longer prefixed with "num_". * `reduce_weights` renamed back to `reduce`. * `Deck`s can be formatted like `Die`. * Allow formatting 0-1 probability. * Experimental `sample()` methods for `OutcomeCountGenerator` and `OutcomeCountEvaluator`.
-
0.16.1a3cfc6ed · ·
Development of deck API. * Separate `Deal` class from `Deck`, roughly analogous to `Pool` vs. `Die`. * `Deal` can now output multiple hands. The counts for each hand are provided in order to `eval.next_state`. * `comb_row` now uses iterative rather than recursive memoization. This will prevent some stack overflows. * `Pool`s are not permitted to be constructed using a raw `Die` or `Deck` argument. * `reduce` argument of `Die.equals()` renamed to `reduce_weights`.
-
0.16.0323d05c4 · ·
Significant API changes, experimental deck support. * Experimental `Deck` class. API still very unstable. * `Pool`s, `Deck`s, and internal Alignment now have a common base class `OutcomeCountGen`. * `EvalPool` renamed to `OutcomeCountEval`. * `Die` and `Deck` are now proper `Mapping`s with `keys`, `values`, and `items`. * The above view types can also be accessed like sequences. * A `Die` is now always considered not `equal()` to non-`Die`. * `die[]` now works like a dict. Use `marginals[]` to marginalize dimensions. * `Die`, `Pool`, and `Deck` now take a single sequence or mapping argument rather than a variable number of arguments. * `Die`, `Pool`, and `Deck` now all have the same name for the second argument: `times`. * `count_dice` renamed to `post_roll_counts`. No longer accepts `None`, use `[:]` instead. * Linear algorithm for comparators on `Die`. * Improvements to internal `Count` class. * Add `clear_pool_cache` function. * Forward `*extra_args` for `reroll, reroll_until, explode`.
-
0.15.0436b1de0 · ·
Added type hints. Now requires Python 3.10 or later. Other changes: * Add `apply_sorted()` method. * Add `Die.set_range()`. * `standard()` / `d()` argument is now positional-only.
-
-
-
0.14.121dfabe8 · ·
Reinstate alternate internal `EvalPool` algorithm, which provides better performance in some cases.
-
0.14.082877517 · ·
* Added a new `EvalPool.alignment()` method. This allows to specify an iterable of outcomes that should always be seen by `next_state` even if they have zero count. * The free function `d()` is now simply an alias for `standard()`. * Removed `Die.d()`. * The `@` operator now casts the right side to a `Die` like other operators. * Some internal changes to `EvalPool` algorithm.
-
0.13.23703bd73 · ·
The data of a die resulting from `==` or `!=` is lazily evaluated. This saves computation in case the caller is only interested in the truth value.
-
-
0.13.0a5414b72 · ·
Major reworking of pool construction. * Public constructor is now just `Pool(*dice)`. * In particular, no more `truncate_min` or `truncate_max` arguments. * Pools can be of arbitrary dice, though non-truncative sets of dice will have lower performance. There is some performance penalty overall. * `apply()` called with no arguments now calls `func` once with no arguments.