Calculating Personality Diversity in The Sims

Viewed 61

Let’s say we’re playing The Sims. We must pick five traits from a list of 10 unique traits (traits A – J), and these 5 traits make up the sim’s personality. How can we calculate a number that represents the level of diversity among multiple sims? Ideally, this number would range from 0 – 1, with 0 representing no diversity, and 1 representing high diversity.

To be clear, let’s imagine the following scenarios and what the resulting diversity index would be.

Scenario One:

  • Sim 1 has traits A, B, C, D, E
  • Sim 2 has traits A, B, C, D, E

Diversity Index = 0

Scenario Two:

  • Sim 1 has traits A, B, C, D, E
  • Sim 2 has traits F, G, H, I, J

Diversity Index = 1

Scenario Three:

  • Sim 1 has traits A, B, C, D, E
  • Sim 2 has traits A, B, C, D, E
  • Sim 3 has traits F, G, H, I, J
  • Sim 4 has traits F, G, H, I, J

Diversity Index = .5 (?)

How could we go about calculating a diversity index with the above information?

1 Answers

You could easily define a distance between Sims (between 0 and 1) and then calculate the average distance in the set of Sims.

In your example, it would give a diversity of 2/3 (each Sim is at a distance 0 of one other Sim, and at a distance of 1 of the two other Sims).

Concerning the distance between two Sims: calculate the number of different traits, and divide by the number of traits affected to each Sim.

Concerning the diversity of a set {S1, S2, ..., Sn}, just calculate

diversity = 2/n(n-1) sum{i = 1 to n} sum{j = i+1 to n} distance (Si, Sj)
Related