The Gaffer has entered the chat.
We wanted a bot to post the fantasy football scores each week. It turned into The Gaffer: a Slack regular with opinions on our captain choices and a memory for things we’d rather forget.
It started with the scores
We just wanted a bot to post the scores each week and give us a round-up of our fantasy football league. A little thing for the Slack channel. It sounded like a fun thing to make.
As I played around with it, the round-ups gained a bit of personality. That became The Gaffer: a football manager who has heard every excuse, has views on your captain choice and remembers the prediction you were hoping everyone had forgotten.
Once people started answering him back, there was more to play with. He could pick up on the conversation, revisit a bad call and give everyone something else to argue about. A weekly scores update had turned into a character in the channel.
A league of opinions.
Someone to answer back.
A point of view.
Every gameweek.
Giving him something to go on
Underneath all that, he still needed the scores. I used the public Fantasy Premier League API to get the league data, with code working out the table, captain choices, bench points and transfers. The language model turned those facts into a report.
His personality lived in plain-text files: how he talks, recurring league stories and a few different report formats. That meant I could fiddle with his voice without breaking the bit that adds up the points.
I also gave him saved gameweek records and shorter notes from recent conversations. Suddenly a confident prediction had a shelf life longer than its author might have liked.
It grew to include match updates, verdicts and a mailbag. He didn’t reply to every mention straight away, either. People had room to talk, and he could come back later with his verdict. Quite a lot of infrastructure for someone to tell you your captain was a poor choice.
Facts first.
Personality second.
Facts.
Scores, squads and transfers.
Calculated by code.
Voice.
A point of view.
Written into a voice guide.
Memory.
Past gameweeks.
The stories worth keeping.
One recognisable voice.
A report, delivered to Slack.
On a schedule. With something to say.
Very confident. Occasionally wrong.
Of course, giving a bot the confidence of a football manager comes with a few problems. Someone said they’d bought a player and The Gaffer happily repeated it as fact. Their actual squad said otherwise. He’d taken their word for it.
So I added a rule: check the squad before treating a claimed transfer as something that happened. The exchanges here are paraphrased, with identifying details left out.
He also backed a player’s form without paying enough attention to a fitness warning. The league picked him up on that, too. Fair enough. If you’re going to question everyone else’s decisions, you have to take a bit back.
I tightened the checks and worked on how he admitted mistakes. He could still have a hunch or a favourite, but he needed to make it clear when he was guessing. And if he was going to flatter the league leader, he should at least check who was currently top.
Someone said it.
The data gets a say.
A claimed
transfer.
Something to check.
Does it match?
Let the team data decide.
Use it as a fact.
Keep it as a claim.
Everyone had notes
The people in the channel helped shape him just by reacting. A joke wore thin. He kept explaining himself. He remembered an exchange slightly wrong and spoiled his own callback. People pointed these things out, and I went back in for another tweak.
That became part of the fun of building him. People challenged his predictions, corrected him and pulled others into the conversation. There was always another exchange to work from.
The channel got busier, too: 291 human messages in his first 16 days, compared with 67 in the previous 28. That works out at about 7.6 times as many per day. The season had just started and two people joined the channel that week, so he can’t take all the credit. I’m sure he’d try.
I kept the jokes focused on football: transfers, bench decisions and predictions that went badly. There’s plenty to work with there without getting personal.
More to talk about.
And people did.
as many human
messages per day.
Against the 11 days immediately before launch, the daily rate was 5.3× as high.
A bit more than a round-up
We set out to get a weekly update and ended up with a bot people would argue with about fantasy football. I’ve had a lot of fun making him, especially when something someone says in the channel gives me an idea for what to try next.
The scores give him a reason to turn up. The league gives him something to talk about. And every time I think I’ve got his voice right, someone finds another way to wind him up.
Playing around with The Gaffer also led me to build something more practical: a bot that finds information in Basecamp and answers questions in Slack. I’ve written about that in the follow-up.
If you’ve got an idea you’d like to play around with, you can get in touch with the team at RKH, where I work.