I am looking for suitable algorithms I could use in a sports team management simulator (e.g. hockey or soccer). Some features of the simulator:
What algorithms can be used to programmatically and efficiently determine the strongest teams and formations?
If we model your problem by graph and noticing that the number of different formations is small, the problem is maximum weighted bipartite matching, which is solvable by Hungarian Algorithm, ....
To model the problem with bipartite graphs, put players in one part, and positions to the other part (e.g. in soccer), to form a pool of players and 11 positions for them, connect all players to all positions, and set the corresponding edge weights as a corresponding player rating in the position.
Now all you should do is to find a maximum (weighted) matching in this complete bipartite graph. (codes are available in wiki link).
I supposed we have a limited number of formations, for each formation we can find the corresponding matching graph, and its maximum weight matching, finally take maximum value over all possible formations (in all graphs).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With