Releases: HighDiceRoller/icepool
Releases · HighDiceRoller/icepool
v1.6.1
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
inmap_and_time()
. - Add
time_limit
parameter tomap()
. repeat
parameter now uses'inf'
to request the absorbing distribution rather thanNone
.
v1.6.0
v1.6.0 - 20 September 2024
- Breaking change: outcomes with zero quantities are removed when constructing
Die
andDeck
.- 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()
orsorted_union()
to get an appropriate superset of sets of outcomes.
- Functions and methods relating to zero-quantities are removed:
- Breaking change:
MultisetEvaluator.alignment()
is renamed toMultisetEvaluator.extra_outcomes()
.MultisetEvaluator.range_alignment()
is renamed toMultisetEvaluator.consecutive()
.- The
Alignment
class is no longer public.
- Breaking change:
Deck.multiply_counts()
andPopulation.scale_quantities()
are replaced/renamed toPopulation.multiply_quantities()
etc. - Add
Deck.sequence()
andDie.sequence()
method. - Add
Population.pad_to_denominator()
method. - Move
zero()
andzero_outcome()
fromDie
toPopulation
. @
operator now sums left-to-right.- Remove old
compair
evaluation. min_outcome()
andmax_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 formap_and_time
.
v1.5.0
- Providing only a
drop
argument tolowest()
orhighest()
will now keep all other elements rather than just the first non-dropped element. depth
argument toDie.reroll()
is now mandatory.tuple
outcomes are now auto-tupleize
d again duringDie
construction.- Add
Die.stochastic_round()
method. - Add
Die.reroll_to_pool()
method. - Add
Die.keep()
method. This works asMultisetGenerator.keep()
with an implicit sum. - Add
percent
option toPopulation.probability
. - Add new
again_count
mode for handlingAgain
, which limits the total number of dice. - Improved ability to
keep
from both ends for certain types of multiset expressions. - Rename
func
parameters tofunction
. 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 thecompair
evaluations. - Experimental
all_straights_reduce_counts
andargsort
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
andprobabilities
now accept a comparison argument but no longer accept a list of outcomes.
v1.4.0
v1.4.0
- Rename
keep_counts
tokeep_counts_ge
. Addle
,lt
,gt
,eq
, andne
variants. - Add
count_subset
evaluation that counts how many times the right side is contained in the left. - Add
ImplicitConversionError
as subclass ofTypeError
. - 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
v1.3.0
- Fix
Symbols
operator priority withPopulation
,AgainExpression
. - Added experimental
map_to_pool
andexplode_to_pool
methods. - Split
compair
intocompare_lt
etc. - Constructing a mixture of dice now effectively uses the old
lcm_joint
method, which reduces the denominator more aggressively.
v1.0.0
v1.0.0
Improve some error messages.
v0.29.0
v0.29.0
- Add HTML and BBCode options for population formatting.
- Renamed
apply
tomap
and the decorator version tomap_function
. - The above now uses
guess_star
. - Add default of 1 die for
Die.pool()
.
v0.27.1
If this goes well, it may become v1.0.0.
v0.25.3
* 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
0.25.0
Expanded multiset processing with multiset expressions.
OutcomeCountGenerator
,OutcomeCountEvaluator
renamed toMultisetGenerator
,MultisetEvaluator
.multiset_function
is an easy way to create joint evaluators.Pool
indexing is now relative rather than absolute.- Renamed
pool.sorted_roll_counts
topool.keep
andpool.keep_tuple
. Die
versions ofsum_highest
etc. renamed to justhighest
; these always return dice.MultisetExpression
(including generators likePool
) havehighest()
returning an expression.Die
operators now does mixed vector-scalar binary operations by broadcasting the scalar.- Add
middle()
methods. - Remove
*generators
argument fromevaluator.order()
,evaluator.final_outcome()
. *generators
argument ofevaluator.alignment
replaced with the union of all generator outcomes.- Removed suits.
- Stop using
__class_getitem__
, which is intended for typing only.