According to https://www.heroescounters.com/teampicker a Hero has a synergy value with another hero, Heroes of the Storm have 60+ heroes each one with a synergy value for example:
HeroID Synergy.With.HeroID Synergy.Points 1 2 97 1 3 95 1 4 94 45 1 2 45 2 11
A Team in heroes of the storm have 5 heroes, and the full synergy of a team is calculated by the formula:
Team_total_synergy = Synergy_Points(Hero1 with Hero2) + mean(Synergy_Points(Hero3 + Hero1) + Synergy_Points(Hero3 + Hero2)) + mean(Synergy_Points(Hero4 + Hero1) + Synergy_Points(Hero4 + Hero2) + Synergy_Points(Hero4 + Hero3) [And so on... till Hero5]
Explaining the formula: Each Synergy Value after the synergy of Hero 1 and Hero 2 is calculated by the Mean of that Hero with the rest of the team, When Hero5 is added up i got the synergy of the team summing all the values.
My Answer is, How can I find the Team with the greatest possible synergy given that formula, and how can I write the code to find it given the possibility there are 64 Heroes(approximately) without brute-forcing all all 64^5 combinations of heroes.