original_docstring: 
          Iteratively calculate the probability of each die.
          This builds a quasi tree that collapses any effectively
          identical branches.  Thus a branch that rolled a botch
          and then a success is merged with a branch that rolled a
          success and then a botch.
  
          The leaf nodes are stored as the self tier dict.
  
          The key is a four element tuple:
  
              (numBotches, numFailures, numTorments, numSuccesses)
  
          While botches and torments are respectively failures and
          successes, for the purpose of the key all categories are
          mutually exclusive.
  
          The value is the probability of that outcome.
          
docstring: Iteratively calculate the probability of each die.
  This builds a quasi tree that collapses any effectively
  identical branches.  Thus a branch that rolled a botch
  and then a success is merged with a branch that rolled a
  success and then a botch.
  
  The leaf nodes are stored as the self tier dict.
  
  The key is a four element tuple.
  
  (numBotches, numFailures, numTorments, numSuccesses)
  
  While botches and torments are respectively failures and
  successes, for the purpose of the key all categories are
  mutually exclusive.
  
  The value is the probability of that outcome.
docstring_tokens: Iteratively calculate the probability of each die . This builds a quasi tree that collapses any effectively identical branches . Thus a branch that rolled a botch and then a success is merged with a branch that rolled a success and then a botch . The leaf nodes are stored as the self tier dict . The key is a four element tuple . ( numBotches numFailures numTorments numSuccesses ) While botches and torments are respectively failures and successes for the purpose of the key all categories are mutually exclusive . The value is the probability of that outcome .
code: def populate(self):
          """
          Iteratively calculate the probability of each die.
          This builds a quasi tree that collapses any effectively
          identical branches.  Thus a branch that rolled a botch
          and then a success is merged with a branch that rolled a
          success and then a botch.
  
          The leaf nodes are stored as the self tier dict.
  
          The key is a four element tuple:
  
              (numBotches, numFailures, numTorments, numSuccesses)
  
          While botches and torments are respectively failures and
          successes, for the purpose of the key all categories are
          mutually exclusive.
  
          The value is the probability of that outcome.
          """
          for _ in range(self.pool):
              newTier = {}
              for key, baseProb in self.tier.items():
                  for branch in range(4):
                      newProb = baseProb * self.pDict[branch]
                      if newProb == 0.0:
                          continue
                      newKey = list(key[:])  # make a mutable copy of the key
                      newKey[branch] += 1
                      newKey = tuple(newKey) # make it hashable again
                      newTier[newKey] = newTier.get(newKey, 0.0) + newProb
              self.tier = newTier
              # print(self.tier)
code_tokens: def populate ( self ) : for _ in range ( self . pool ) : newTier = { } for key , baseProb in self . tier . items ( ) : for branch in range ( 4 ) : newProb = baseProb * self . pDict [ branch ] if newProb == 0.0 : continue newKey = list ( key [ : ] ) newKey [ branch ] += 1 newKey = tuple ( newKey ) newTier [ newKey ] = newTier . get ( newKey , 0.0 ) + newProb self . tier = newTier
short_docstring: Iteratively calculate the probability of each die.
short_docstring_tokens: Iteratively calculate the probability of each die .
comment: """
          Iteratively calculate the probability of each die.
          This builds a quasi tree that collapses any effectively
          identical branches.  Thus a branch that rolled a botch
          and then a success is merged with a branch that rolled a
          success and then a botch.
  
          The leaf nodes are stored as the self tier dict.
  
          The key is a four element tuple:
  
              (numBotches, numFailures, numTorments, numSuccesses)
  
          While botches and torments are respectively failures and
          successes, for the purpose of the key all categories are
          mutually exclusive.
  
          The value is the probability of that outcome.
          """$SEP$# make a mutable copy of the key$SEP$# make it hashable again$SEP$# print(self.tier)