Skip to content
Snippets Groups Projects
  1. Mar 04, 2017
  2. Mar 03, 2017
    • ulif's avatar
      Shorten `get_num_rolls()`. · 7e8bc4f4
      ulif authored
      7e8bc4f4
    • ulif's avatar
      Ensure equal distribution Fixes #35. · 17540205
      ulif authored
      We avoid the modulo operation now, if it comes to small sequences.
      Instead we discard invalud rolls and require new ones.
      17540205
    • ulif's avatar
      Complete get_num_rolls() and use it in choice(). · 7a1a55b7
      ulif authored
      7a1a55b7
    • ulif's avatar
      Expect roll nums following the old procedure. · 7f1bc4c5
      ulif authored
      In order to keep all entropy we could in case of sequence lengths
      unequal to powers of the number of dice sides just discard rolls and
      require further ones, until we get a number in the allowed range. But
      this could potentially require an endless number of rolls.
      
      Instead we implement the following policy:
      If R=log(<sequence_len>) with <number_of_dice_sides> as basis is >= 1,
      we require int(R) rolls. We will ignore elements in the sequence with
      index > int(R).
      
      Sample: For 6 dice sides and a sequence of 215 (= 6**3 - 1) elements R
      would be log_6(215) = 2.9975... but we would pick an element from the
      range [0..35], i.e. (6**2 - 1).
      
      If R is 0, we will require exactly one roll, if <sequence_length> is a
      divisor of <dice_sides>.
      
      In all other cases, <sequence_length> is not a divisor of <dice_sides>
      and <sequence_length> is shorter than the number of dice_sides. In this
      case we will roll dice until we get a result in [1..<sequence_length>].
      Other rolls will simply be discarded.
      7f1bc4c5
  3. Feb 27, 2017
  4. Feb 26, 2017
  5. Feb 25, 2017
  6. Feb 24, 2017
  7. Feb 19, 2017
  8. Feb 18, 2017
  9. Jan 07, 2017
    • ulif's avatar
      Mark that we changed something. · 74afee77
      ulif authored
      Although the changes since last release are not very severe, it
      is a difference to "no changes yet". Trusting the latter can make
      things complicated.
      74afee77
  10. Jan 06, 2017
  11. Dec 24, 2016
Loading