In my game, "people" form bonds through common interests. A person can have 1 or more interests and a certain weight (0f – 1f) that is attributed to him. Again, when 2 people are close to each other, relationships are formed based on common interests. For example, if I have interests like "Movies, cheese and art", and you have "Movies and cheese", then we have a strong link.
All this is working very well, and over time, all the people in my game have some kind of link with others.
What I would like to do now is build social groups in a somewhat efficient way (my game has an asynchronous task manager, so if the calculation is a bit heavy, it is not a decisive factor). My current theory is to choose a person, observe their relationships and then try to build a graph slowly to match as many like-minded people as possible.
I'm not 100% sure how to do this. I was thinking about comparing interests with common friends, but I wondered if there was a better way. The current relationships are stored as a person identifier, and then a list of (up to) 5 relationships, containing their identifier, plus the weight.
The final result that I would like, is a group of "groups" of like-minded people, who have fed on this initial map.