The latest addition to the Parity Extended Universe is an idea that has been bandied about in the dark corners of Parity Slack for years: a fully-automated, artificial intelligence-based general manager. I recently set my sights on the problem and lo! The Franken-GM lives!
Join me, fellow nerds, as we explore the algorithm behind the AI GM and discuss future directions for this line of Parity inquiry. But first…
Why do we need AI GMs?
In short, we don’t. We have always been lucky to have fantastic (human) GMs in this league who do a great job of working together to ensure parity. Indeed, the opportunity to be a GM is a real draw for many people. My preference is to keep running the league with 100% Real People™.
However, GMing can be a lot of work and we have had an increasingly difficult time finding enough players who are both willing and sufficiently experienced to take up the mantle (more than a dozen players declined a GM invitation for this most recent season). That got Parity co-coordinator Kevin and myself thinking about potential uses for AI in the process.
What’s the upside?
AI general managers offer a few unique benefits. They can resolve drafts, trades and waivers quickly, which saves hours of time for human GMs and coordinators. They can be impartial about which trades are in the best interest of the league in a way human GMs sometimes struggle with. They can also be more strategic about trades under certain circumstances, since they may “know” every player in the league better than a GM who hasn’t watched everyone play.
There are still major limits. The AI is making decisions based entirely on the available data, which, as we all know, is far from perfect (and especially unreliable this early in a season). The AI also can’t respect things like pairing requests or personality fits, which human GMs often make an effort to accommodate. Since team chemistry is about more than just the numbers on the page, I’m skeptical that an AI GM will ever make better trades than a set of fair and well-informed GMs.
And then there are the cultural issues. Having algorithms make these decisions may feel icky for some. For others, it will be a relief to take the personalities out of it. I’m very curious to know what people think!
How does the algorithm work?
Step 1: we start by loading the list of players and teams for the current season from the Parity app API (which I do in a Google Sheet using JavaScript). Then we use the available stats data for the current season to construct a profile for each player. There are different ways we could go about it, but for now the algorithm categories each player on the following dimensions:
For example, based on the first two weeks of the current season, the algorithm classifies Emma Beaulieu as a cutter, as a starter and as an offensively-oriented player. It classifies Gabriel Roy as an all-star defensive handler, Steve Bisang as a roleplayer defensive hybrid, Katelyn Fontaine as an all-star balanced cutter, etc.
Step 2: the algorithm constructs a profile for each team based on its current roster to identify player needs and redundancies. It also identifies whether teams are mainly in a position to be buying or selling based on their team salary relative to the salary cap.
For example, this week Team Al(essandro) has an excess of offensively-oriented players, so players that meet that criteria are on the chopping block. On the other hand, Al(essandro) has a lack of handlers and of players that are more defensively-oriented. So the AI will prioritize acquiring those kinds of players through trades. Al(essandro) is also over the salary cap, so the AI will prioritize selling higher salary players to acquire lower salary players.
I shouldn’t have picked Al for my AI example.
Anyway, step 3: determine optimal trades. With 10 teams of 12 players (including blanks, which can be traded), there are 3045 possible trades at any given moment. The algorithm generates this list and then rates each possible trade on two dimensions:
Step 4: the algorithm chooses the highest-rated trade to make. If we want, we can introduce randomness at this stage by having the algorithm choose from among the best options. In this case, the highest scoring trade is Ahmed Aziz (Team Jamie) for Brian Perry (Team Heather). The trade adds $83k to Jamie, who is $143k below the salary floor, while reducing salary by $83k for Heather, who is $106k over cap, so it scores very well on cap impact. It is also relatively desirable, since Heather is flush with offensive all-stars and Jamie really needs an all-star handler. To balance things out, Heather needs some defensive cutters and that’s exactly what Ahmed provides.
Finally, once a trade has been made, step 5: the algorithm goes back and re-profiles all of the teams and re-generates/re-scores the list of possible trades. It continues this iterative process until all the teams are cap compliant.
The output is a list of trades, which I feed into ChatGPT along with some additional context to generate ParityBot’s voice for Slack.
Where can I see the AI GM in action?
I’ll be posting the AI’s trade recommendations in the #parity-league Slack channel on Thursdays. That’s after the trade window for the real GMs has closed so that we’re not influencing their decisions.
If you want access to the back end, let me know and I’ll be happy to share it.
What comes next for the AI GM?
We have no immediate plans to replace real GMs, so the AI will continue to shadow-GM by sharing its suggestions after the real trades have been made. Kevin has made the diabolical suggestion that we could program different personalities for each team. So you could have an AI GM that tries to acquire all the huckers or all the best defenders or what have you. That will be a longer term project.
For now, enjoy the stone-cold realpolitik of ParityBot over on Slack and let us know what you think about this whole idea below!
P.S. Have a more creative name than "Parity AI GM"? We want to hear it!
Justine Price
Thu, 2023-03-16 17:59
Permalink
Parity AI vs Parity Al
Although you initially lost me at, "Join me, fellow nerds,...." I did, in fact, read on. First of all, you and Kevin are my favourite people. Second, I will now be eagerly looking forward to checking out Slack on Thursdays. Thoroughly enjoyed todays AI suggestions and being able to compare them to the actual trades.
Now, can you get the AI to analyze the stats and come up with Keatesian "write ups" like we used to have in the first years? Now that, my friends, may be the ultimate (pun intended) challenge.