Skip to content

Releases: HighDiceRoller/icepool

v1.6.1

18 Nov 01:48
Compare
Choose a tag to compare

v1.6.1 - 17 November 2024

  • Add pointwise_max, pointwise_min arguments to take pointwise maximum or minimum of CDFs.
  • Add Die.time_to_sum() method.
  • Fix identification of absorbing states in the presence of extra_args in map_and_time().
  • Add time_limit parameter to map().
  • repeat parameter now uses 'inf' to request the absorbing distribution rather than None.

v1.6.0

21 Sep 16:41
Compare
Choose a tag to compare

v1.6.0 - 20 September 2024

  • Breaking change: outcomes with zero quantities are removed when constructing Die and Deck.
    • Functions and methods relating to zero-quantities are removed: align(), align_range(), Population.has_zero_quantities(), Die.trim(), Die.set_range(), Die.set_outcomes().
    • You can use consecutive() or sorted_union() to get an appropriate superset of sets of outcomes.
  • Breaking change: MultisetEvaluator.alignment() is renamed to MultisetEvaluator.extra_outcomes().
    • MultisetEvaluator.range_alignment() is renamed to MultisetEvaluator.consecutive().
    • The Alignment class is no longer public.
  • Breaking change: Deck.multiply_counts() and Population.scale_quantities() are replaced/renamed to Population.multiply_quantities() etc.
  • Add Deck.sequence() and Die.sequence() method.
  • Add Population.pad_to_denominator() method.
  • Move zero() and zero_outcome() from Die to Population.
  • @ operator now sums left-to-right.
  • Remove old compair evaluation.
  • min_outcome() and max_outcome() free functions can now be called using a single iterable argument.
  • Forward algorithm now has a persistent cache.
  • Add skip optimization for single deals with keep tuples.
  • Pools now only skip dice, not outcomes. This is a bit slower in some cases but provides more consistent iteration order.
  • Add shared evaluator instances for some built-in evaluator for caching.
  • Simplify determination of outcome order for multiset evaluations.
  • Simplify implementation of generator unbinding.
  • Fix extra_args expansion for map_and_time.

v1.5.0

24 Aug 08:34
Compare
Choose a tag to compare
  • 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-tupleized again during Die construction.
  • Add Die.stochastic_round() method.
  • Add Die.reroll_to_pool() method.
  • Add Die.keep() method. This works as MultisetGenerator.keep() with an implicit sum.
  • Add percent option to Population.probability.
  • 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.
  • MultisetExpression.order() is now public.
  • Improved sorting for Symbols; now compares counts in alphabetical order.
  • Experimental sort_match, maximum_match_highest, maximum_match_lowest expressions. sort_match replaces the compair evaluations.
  • Experimental all_straights_reduce_counts and argsort multiset evaluations.
  • Breaking change: nearest, quantity, quantities, probability, probabilities, keep_counts no longer have separate variants for each comparison; instead, they now take a comparison argument. quantities and probabilities now accept a comparison argument but no longer accept a list of outcomes.

v1.4.0

01 Feb 09:01
Compare
Choose a tag to compare

v1.4.0

  • 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__.

v1.3.0

31 Dec 07:51
Compare
Choose a tag to compare

v1.3.0

  • 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.

v1.0.0

22 Jul 22:55
Compare
Choose a tag to compare

v1.0.0

Improve some error messages.

v0.29.0

30 Apr 23:53
Compare
Choose a tag to compare

v0.29.0

  • Add HTML and BBCode options for population formatting.
  • Renamed apply to map and the decorator version to map_function.
  • The above now uses guess_star.
  • Add default of 1 die for Die.pool().

v0.27.1

10 Apr 05:16
Compare
Choose a tag to compare

If this goes well, it may become v1.0.0.

v0.25.3

29 Jan 03:01
Compare
Choose a tag to compare
* Tuple outcomes can now be compared with single outcomes.

* Add `.keep, .highest, lowest, .middle` variants of `apply_sorted`.
* Recommend `multiset_function` be used as a decorator, add `update_wrapper`.
* Add `keep_outcomes, drop_outcomes` methods to expressions.
* Add `any` evaluation to expresions.

0.25.0

23 Jan 08:24
Compare
Choose a tag to compare

0.25.0

Expanded multiset processing with multiset expressions.

  • OutcomeCountGenerator, OutcomeCountEvaluator renamed to MultisetGenerator, MultisetEvaluator.
  • multiset_function is an easy way to create joint evaluators.
  • Pool indexing is now relative rather than absolute.
  • Renamed pool.sorted_roll_counts to pool.keep and pool.keep_tuple.
  • Die versions of sum_highest etc. renamed to just highest; these always return dice.
  • MultisetExpression (including generators like Pool) have highest() returning an expression.
  • Die operators now does mixed vector-scalar binary operations by broadcasting the scalar.
  • Add middle() methods.
  • Remove *generators argument from evaluator.order(), evaluator.final_outcome().
  • *generators argument of evaluator.alignment replaced with the union of all generator outcomes.
  • Removed suits.
  • Stop using __class_getitem__, which is intended for typing only.