code: def calculate(self):
          
          self.rating = 0
          for f in self.factors:
              self._update_pref(f.min, f.max, self.world.tax_rate)
docs: calculates the estimated happiness of a person
          living in a world
          self._update_pref(self.person.prefs['tax_min'], self.person.prefs['tax_max'], self.world.tax_rate)
          self._update_pref(self.person.prefs['tradition'], self.person.prefs['tradition'], self.world.tradition)
          self._update_pref(self.person.prefs['equity'], self.person.prefs['equity'], self.world.equity)