Once I tried to implement soccer team balancer. We made skill points to each player (so everybody had a final score) and I wanted to write a small Django application which balances the teams the most fair way. It turned out it is a really hard mathematical problem. My stupid brute-force solution ran for minutes for 10 players :D Wish this library has been existed back then!