HighDiceRoller/icepool

Revisit sort order

Closed this issue · 1 comments

Originally I had wanted to put everything in ascending order. However, this clashes with the natural ordering of several evaluators.

Favoring ascending order:

  • die.outcomes()
  • Default evaluator order. For mixed standard dice this allows for more favorable caching.

Favoring descending order:

  • Sizes of matching sets and straights.
  • Compair, since RISK uses descending order.

Debatable:

  • pool.keep() and pool[].

In favor of ascending:

  • Follows Python's default.
  • Non-negative indexes = ascending and negative indexes = descending is natural.
    • There is a reverse argument for negative = lowest and non-negative = highest, however, I think this argument is weaker.

In favor of descending:

  • Used by AnyDice. (Though AnyDice is also 1-indexed...)
  • Most games favor higher dice.
  • pool.expand()

Ascending looks more natural to me.

Descending plays better with lexicographic ordering.

Decision: add order option to expand(), but the two debatables stay on ascending.