I'm making a little bot to create games, and I would like to figure out the best approach to creating 2 teams based on players ELO and make it a fair match.
Let's say I have the following:
const players = [
{name: 'player1', elo:684},
{name: 'player2', elo:1694},
{name: 'player3', elo:1234},
{name: 'player4', elo:1023},
{name: 'player5', elo:877},
{name: 'player6', elo:789},
{name: 'player7', elo:1000},
{name: 'player8', elo:1300}
];
let team1, team2 = [];
Some how I want to create 2 teams with 4 players each, with balanced elo score on both teams. Is there an algorithm that would help do this? Balance the two teams as much as possible?