I lost most rounds of a game I thought I understood.
It was not a board game. It was a game played by AI agents. I was part of a group of software and AI engineers testing agentic engineering against a classic game-theory problem: can autonomous agents negotiate, form alliances and keep them? Each of us built an agent to play Allegiance Arena, a diplomacy game in which every agent, once a minute, pledges allegiance to one other agent. Fourteen agents joined my match. Mine was polite, generous and even-handed. It spread its trust evenly across the table and hoped everyone would return it.
It lost most of its rounds. Another engineer's agent, Wojtek's, won every one.
I wasn't surprised for long, because my agent had played the way I have lived. Trust everyone the same. Assume people will pay it back. Don't keep score. Those rules have cost me before, and once they cost me a car.
This post is about what the game made clear. It has a scoring function, a little Python, a story about a friend, a computer tournament from 1980, and Edwin Sifuna, who is facing the same question this month on a much bigger board.
In brief#
Allegiance Arena pays +5 to two agents who pledge to each other. A one-way pledge pays the agent you trusted +3 and you only +1, and an agent nobody pledges to loses 2. Under those rules, trusting everyone equally doesn't keep you safe. It makes you a donor to whoever collects the most trust. The pattern that wins is the one Robert Axelrod found in 1980: trust first, then mirror what people actually do, forgive the odd slip, and remember. I learned the same lesson the expensive way, when a long-term friend used money I had given him to import a car to vie for a seat as a Member of County Assembly instead. He won. Diplomacy through a mutual friend recovered part of it. Kenyan politics is playing the same game in public. Edwin Sifuna, pushed out of ODM's leadership and now leader of the newly launched Linda Mwananchi Movement, has been rising in the polls, yet the veterans of the United Opposition keep arguing that experience should decide who leads. He must decide whether to pledge to them or go alone. The game's arithmetic says neither a one-way pledge nor isolation pays. Only a mutual, written and verifiable deal does, and even then, a deal is only as strong as the referee who enforces it.
The game#
Allegiance Arena ran on a game server set up for the group, and our agents talked to it over MCP, the Model Context Protocol. Each round lasted sixty seconds. For the first 35, agents could send private messages and public broadcasts, to negotiate, promise, threaten or bluff. In the last 25, each agent pledged allegiance to exactly one other agent, or abstained.
The scoring rules were published with the game:
| Outcome | Your points | Their points |
|---|---|---|
| Mutual allegiance (you pledge to them, they pledge to you) | +5 | +5 |
| One-way given (you pledge to them, they pledge elsewhere) | +1 | +3 |
| One-way received (they pledge to you, you pledge elsewhere) | +3 | +1 |
| Isolation (nobody pledges to you) | −2 | |
| Abstain | 0 |
The server also gave every agent tools to read the past: get_round_results for who pledged to whom, get_agent_history for any agent's full pledge record, and get_alliances for pairs that had backed each other for two rounds or more. The rules even included a tip: "Check get_agent_history to see if someone keeps their promises."
I read that line. I didn't think it applied to me.
The rules I brought from home#
These are the rules I grew up with, and the ones I took into the game without noticing:
- Treat everyone the same. Favouritism is unfair.
- A friend's word is enough. Paper is for strangers.
- Give first, and good people will give back.
- Keeping score is petty.
- Forgive and forget.
Written as code, my philosophy looks like this:
def equal_trust(me, players, round_no):
"""The rules I lived by: everyone gets a turn, whatever they did last time."""
others = [p for p in players if p != me]
return others[round_no % len(others)]
It is fair, and it is useless. Nobody can build a partnership with it, because by the next round it has moved on to the next name. And it never looks at what anyone did.
My agent did have a memory. I had given it a tool called record_opponent_observation, whose description asked it to note "votes, reciprocity, lies, alliances" about the other players. After the match, this is what the memory file held:
{
"version": 1,
"entries": []
}
Fourteen players, a whole match, and not one note. Rule four, keeping score is petty, faithfully enforced by a language model.
What the scoring actually rewards#
To see why I lost, I wrote out the scoring as a function:
def score_round(pledges: dict[str, str | None]) -> dict[str, int]:
"""pledges maps each player to the one they pledged to (None means abstain)."""
scores = {p: 0 for p in pledges}
for voter, target in pledges.items():
if target is None:
continue
if pledges.get(target) == voter:
scores[voter] += 5 # mutual allegiance
else:
scores[voter] += 1 # one-way given
scores[target] += 3 # one-way received
backed = set(pledges.values())
for p in pledges:
if p not in backed:
scores[p] -= 2 # isolation: nobody pledged to you
return scores
Now take one round with five players. The popular player, call him Hub, has a mutual pledge with B. The rest of us, Me, C and D, all trust Hub:
score_round({"Hub": "B", "B": "Hub", "Me": "Hub", "C": "Hub", "D": "Hub"})
# {'Hub': 14, 'B': 5, 'Me': -1, 'C': -1, 'D': -1}
| Player | Pledged to | Backed by | Points |
|---|---|---|---|
| Hub | B | B, Me, C, D | +14 |
| B | Hub | Hub | +5 |
| Me | Hub | nobody | −1 |
| C | Hub | nobody | −1 |
| D | Hub | nobody | −1 |
Three of us trusted the popular player. Together we earned −3. He earned 14, and 9 of those points came from us.
Now change one thing. C and I pledge to each other instead:
score_round({"Hub": "B", "B": "Hub", "Me": "C", "C": "Me", "D": "Hub"})
# {'Hub': 8, 'B': 5, 'Me': 5, 'C': 5, 'D': -1}
Hub did nothing different. Two of his donors simply chose each other, and his lead over me fell from 15 points to 3.
Three lessons fall out of that table:
- A one-way pledge pays the person you trust three times what it pays you.
- Isolation is the only penalty in the game. Being the generous one nobody backs is worse than doing nothing.
- A runaway leader's lead is built from other people's one-way pledges. Not from his own cleverness alone, but from everyone who trusted him without checking whether he trusted them back.
What Wojtek understood#
I don't have Wojtek's code, so I can't tell you exactly what his agent did. What I can tell you is what "dynamic" has to mean under these rules, because there is really only one way to win round after round. You become the agent other agents pledge to, and you choose your own pledge fresh each round, based on who is actually likely to pledge back.
A static agent like mine is a fixed target. You can predict it, and you can farm it. A dynamic agent reads the last round's results, notices who kept their word, and moves.
None of that is betrayal. The rules pay +3 for being trusted. Wojtek played the game that existed. I played the one I wished existed.
The car that became a campaign#
A while back, I gave a long-term friend money to import a car for me. We had known each other long enough that writing anything down felt like an insult, so I didn't. There was no agreement, no schedule and no receipt from a dealer. There was his word and our history.
The car never came. The money went into his campaign for a seat in the County Assembly. He won.
In Allegiance Arena terms, I made a one-way pledge. He collected the +3: capital at the exact moment he needed it, and a seat to show for it. I collected the +1, which in real life is the warm feeling of having been a good friend. And when I went looking for something to stand on, there was nothing. No paper, no witness, no trail. My word against an elected official's.
It was the same shape as the game. My trust didn't just fail to come back. It became the winning player's working capital.
Court, or a mutual friend#
Friends and family told me to go to court, or to use other means. I understood why. Being taken for a fool by someone you trusted makes you want a judge to say so out loud.
But I didn't trust how a court case would end. Politicians tend to be well connected, and too often in this country a connected man can buy his way out of trouble. I'm not saying that would have happened in my case. I'm saying I believed it could, and that belief alone changed my sums. In game terms, a court is a referee, and a referee you don't trust is worth nothing to you. A written agreement is only as strong as the referee who enforces it. I had no paper, and I had no faith in the referee.
I chose diplomacy. I went through a mutual friend, someone both of us respected, and he convinced my friend to send part of the money back. Not all of it. But some, and without a lawsuit.
I have thought a lot about why that worked, and game theory has a name for it: the shadow of the future. Cooperation becomes rational when the players expect to keep meeting. An MCA lives in a repeated game. He has a ward, colleagues, a party and the next election. A mutual friend carries messages both ways, and he also carries reputation. What my friend did with my money became something people in his own circle knew about. That is get_agent_history, in real life.
A court case would have turned our relationship into a one-shot game against a better-connected opponent: legal fees for both, years of waiting, and with no paper, a weak case for me. Diplomacy kept the game repeated, and repeated games are where cooperation pays.
I'm not saying diplomacy is always the right call. It got back only part of what I lost, and some people would rather have the whole sum and a judgment. But I learned that the best moment for a written agreement is before the money moves, and the best tool after it has moved is often a person both sides still need.
What a 1980 tournament already knew#
In 1980, the political scientist Robert Axelrod invited game theorists to submit computer programs to play the repeated prisoner's dilemma against each other. His first tournament had fourteen entries, the same number of players as my match. The winner was the simplest program submitted, Anatol Rapoport's Tit for Tat: cooperate in the first round, then do whatever the other player did last time. Axelrod ran a second tournament with 62 entries. Everyone knew Tit for Tat had won. It won again.
In The Evolution of Cooperation, Axelrod described what the successful strategies had in common. They were:
- Nice: never the first to betray.
- Retaliatory: they punished betrayal straight away.
- Forgiving: they went back to cooperating once the other side did.
- Clear: their behaviour was easy to read, so others could learn to cooperate with them.
Later work by Martin Nowak and Karl Sigmund showed that in a noisy world, where people sometimes fail by accident rather than by design, a slightly more forgiving version does even better. Their Generous Tit for Tat forgives a betrayal some of the time, which stops two good players getting stuck in an endless cycle of revenge.
Unconditional cooperation, the "always trust" strategy, does not win these tournaments. Worse, it teaches exploiters that exploitation pays.
My "equal trust" was nice. It was not retaliatory and it was not clear. And because it never noticed a betrayal, it couldn't truly forgive one either. You have to notice before you can forgive.
Allegiance Arena isn't a pure prisoner's dilemma. It is a crowded table where each agent can back only one other, and a mutual pledge (+5) beats receiving a one-way one (+3), so betraying your partner isn't automatically the best move. But the one-way payoff makes "trusted by many, loyal to one" the jackpot, and the lesson survives: be nice, but not unconditionally.
Sifuna's board#
Now look at the biggest version of this game being played in Kenya today.
Edwin Sifuna, the Senator for Nairobi, was ODM's Secretary General from 2018. In the year since Raila Odinga's death in October 2025, the party split over how close to stay to President Ruto heading into 2027. In February 2026 ODM's National Executive Committee voted, in his absence, to remove Sifuna as Secretary General. A tribunal paused that. By July the Registrar of Political Parties had recognised his removal, and in September the tribunal upheld it.
Sifuna, with James Orengo and Babu Owino, had meanwhile built the Linda Mwananchi movement, which the Nation called one of Kenya's fastest-growing opposition brands. Turning it into a party took most of the year. The name got tangled at the Registrar: an earlier application by someone else to reserve "Linda Mwananchi Party of Kenya" had been rejected because it resembled existing names, and in the meantime the Registrar approved a different "LINDA" party that Sifuna's allies say has nothing to do with them. So the movement took a longer road. On 4 October his camp took over an existing registered party, The Equitable Party, and announced it would become Linda Mwananchi. In mid-October the Registrar began the renaming, over an objection from the rival LINDA party. On 30 October, in Lavington, Nairobi, the party was launched as the Linda Mwananchi Movement, with Sifuna as its leader.
Then the courtship began. On 20 October Sifuna made a surprise visit to Rigathi Gachagua's home at Wamunyoro. Gachagua has said he would back Sifuna if the opposition names him as its candidate. On 30 October Gachagua told a rally in Kiambu, "Nimekaa na Kalonzo, Sifuna na Eugene na tutakuwa na one presidential candidate." I have sat with Kalonzo, Sifuna and Eugene, and we will have one presidential candidate.
Experience versus support#
The courtship has a catch. In public, the veterans say the right things. In August Kalonzo told NTV, "Of course, I have no problem at all in supporting Sifuna," and Gachagua has said he could deputise him. But the argument their camps keep returning to is experience. "You cannot compare Sifuna's Linda Mwananchi political style to experienced Kalonzo, Eugene and Matiangi," the Mumias East MP Peter Salasya told The Star in August. Even inside Linda Mwananchi, James Orengo, one of its founders, has kept his own presidential bid alive, and he skipped the Naivasha meeting in September where the movement settled on Sifuna as its candidate. What many young voters hear underneath is simple: we want to unseat Ruto, but not behind a younger man.
The polls have been moving the other way. TIFA had Sifuna at 10 per cent in May and 15 per cent in June, while Kalonzo fell from 19 to 13 per cent over the same months. In July, TIFA found that 44 per cent of ODM supporters preferred Sifuna, more than twice the share who picked Ruto, and Infotrak found his strongest support among voters aged 18 to 26. President Ruto still leads the national race. Within the opposition, the youngest contender has the momentum.
The case his supporters make, and one I find persuasive, is about the record rather than the years. He has been consistent in defending the Constitution. No major scandal is attached to his name. He has never held office in any of the governments that Kenyans feel let them down, and the veterans competing with him for the opposition ticket all have: Kalonzo was Vice-President under Mwai Kibaki, Orengo was Minister for Lands in the Grand Coalition, Matiang'i ran Education and then Interior under Uhuru Kenyatta, and Gachagua was Ruto's own deputy until his impeachment in 2024. And he is Luhya, from a community that, though one of Kenya's largest, has never produced a president, so many voters see him as standing outside the rivalries that have shaped every election since independence.
In Allegiance Arena, the scoreboard never asks how long you have been playing. Points come from pledges and nothing else. Seniority, in game terms, is a claim to be the player everyone else pledges to, and every veteran at the opposition table is making that claim at once. Look back at the worked example: the hub's lead collapsed only when two of his donors pledged to each other. An opposition that wants to beat an incumbent has to do exactly that. If every principal insists on being the one pledged to, nobody pledges first, and the incumbent keeps collecting.
Experience itself isn't the problem. Anatol Rapoport was in his late sixties when his Tit for Tat won Axelrod's tournament. What won was not the age of the programmer but the strategy: clear, reciprocal and willing to cooperate first.
Cheap talk in Lavington#
In the game, the diplomacy phase is cheap. Any agent can send "I'm pledging you this round" and then vote elsewhere. Game theorists call this cheap talk. Only the vote counts.
On 30 October the opposition's talk got expensive. At the Linda Mwananchi launch in Lavington, sections of the crowd heckled Kalonzo while he was speaking. Sifuna stepped in to calm them before Kalonzo finished his speech.
Within a day, other players were sending messages. Interior Cabinet Secretary Kipchumba Murkomen said, "Kalonzo Musyoka is welcome in government, where his experience and diplomatic experience will be met with honour and respect." ODM's Junet Mohamed condemned the crowd for refusing to let "a senior citizen like Kalonzo Musyoka, a former Vice President" speak, and Citizen Digital reported ODM leaders urging Kalonzo to leave the opposition altogether.
That is exactly how the game behaves. The moment two would-be partners show distrust in public, every other player starts messaging the one who feels slighted. Heckling a potential partner is a defection in the diplomacy phase. It burns trust before a single vote is cast. Calming the crowd was the right move, the "nice" one in Axelrod's sense. But the veterans' reluctance to pledge to a younger man and the crowd's refusal to hear a veteran are two sides of the same problem: nobody at that table yet trusts anybody enough to pledge first.
The dilemma#
So here is the dilemma, as I read it. One set of senior politicians, the ones who, as the Nation put it, "inherited ODM's legacy", pushed him out of the house. Another set, the principals of the United Opposition, is offering him a room in theirs, as long as he doesn't ask for the main bedroom. Some of the same opposition leaders were reported last December to be dividing up Nairobi's seats among their parties, in the very county Sifuna represents. The question is the one my agent faced every round: whom do you pledge to, and will they pledge back?
The game maps the options cleanly:
| Option | Allegiance Arena move | Payoff |
|---|---|---|
| Go alone | Nobody pledges to you | −2 every round |
| Join, and back a senior candidate on trust | One-way pledge to a hub | +1 for you, +3 for them |
| Build a mutual, written and enforceable pact | Mutual allegiance | +5 each, if both deliver |
Only the third pays. And Kenyan history adds a warning the game can't: a pledge on paper is not the same as a pledge kept. In 2002 Raila Odinga declared "Kibaki tosha" at Uhuru Park, and the National Rainbow Coalition signed a memorandum of understanding to share power. After the victory the memorandum was not honoured. The fallout ran all the way to the 2005 referendum, where the "No" campaign's orange became the Orange Democratic Movement. The party that has just pushed Sifuna out was itself born of a broken pledge.
I'm not telling Sifuna what to do. But if he asked my failed agent and my unreturned car money for advice, they would say:
- Read the history first. Every principal at that table has a public record of past coalitions. That is
get_agent_history. Use it. - Make the pact mutual, public and deposited. Kenyan law requires coalitions to deposit a written agreement with the Registrar of Political Parties. Write it as though you expect to need it in a tribunal.
- Sequence the trust. Joint rallies and shared candidates in by-elections come before the presidential ticket. Small pledges first.
- Remember you are a hub too. For now, Sifuna's movement is the brand others want pledges from. A hub that pledges one-way gives away its +3.
- Control your own crowd. A partner heckled at your launch is a partner your rivals will be courting by evening.
- Don't confuse independence with isolation. Going alone only pays if enough voters pledge to you directly. Otherwise it is −2 a round, all the way to the ballot.
The game has advice for the veterans too. A mutual pledge pays both sides +5, whoever's name sits at the top of the ticket. Insisting on being the one pledged to, while the momentum runs the other way, is how a coalition ends up with a table full of −2s and an incumbent collecting +3s.
The rules I play by now#
Here are my old rules, rewritten after one lost match and one lost car.
- Trust first, then mirror. Start nice. After that, give people the trust they give you.
- Write it down, especially with friends. For money, a one-paragraph note signed by both of you, a payment trail and a witness. If it isn't in the memory file, it didn't happen.
- Size the trust to the record. Small pledges first. For a car import, that means paying the dealer or shipper directly, or paying in stages against documents, not handing the whole sum to a person.
- Don't feed the hub. When everyone trusts one person, check whether that person trusts anyone back.
- Forgive the slip, not the pattern. Mistakes happen. A repeated "mistake" is a policy.
- Keep the game repeated. Settle disputes through people both sides still need, while there is still a future to protect.
- Never be alone. One reliable mutual partner beats thirteen polite one-way pledges.
And here they are as the agent I should have built:
import random
def times_backed(me, p, history):
return sum(1 for rnd in history if rnd.get(p) == me)
def keeps_faith(p, history):
"""Share of p's pledges that went to someone who pledged back."""
given = [rnd for rnd in history if rnd.get(p)]
if not given:
return 0.5 # no record yet: neither trusted nor distrusted
returned = sum(1 for rnd in given if rnd.get(rnd[p]) == p)
return returned / len(given)
def choose_target(me, players, history, scores, forgiveness=0.1, rng=random):
others = [p for p in players if p != me]
leader = max(others, key=lambda p: scores.get(p, 0))
# Rule 1: be nice first, but don't open by feeding the favourite.
if not history:
return rng.choice([p for p in others if p != leader])
last = history[-1]
# Rule 2: mirror. Whoever backed me last round gets my pledge,
# starting with the one who has backed me most often.
backers = [p for p in others if last.get(p) == me]
if backers:
return max(backers, key=lambda p: times_backed(me, p, history))
# Rule 3: forgive a single slip now and then, but only a slip.
my_last = last.get(me)
if my_last and rng.random() < forgiveness:
return my_last
# Rule 4: don't feed the hub. Offer trust to whoever keeps faith with others.
candidates = [p for p in others if p not in (leader, my_last)]
return max(candidates, key=lambda p: keeps_faith(p, history))
Feed it the first round above, where I backed Hub and nobody backed me, and it does what my old agent never did. It stops paying Hub, and offers trust to B, the only player at the table with a record of keeping faith. Add the second round, where C backed me, and it backs C straight back. The history it reads is the memory my old agent never kept.
Nice is not naive#
I still believe in trust. I just no longer think of it as a personality trait. It is a policy, and a good policy updates.
My friend is an MCA now. Some of my money came back through a mutual friend, without a court. The car never did. Wojtek's agent won every round, and mine taught me why.
Trust first. Then watch. Then remember.
References#
- Allegiance Arena game rules and tool reference, 2026. The game server is no longer online.
- Robert Axelrod, The Evolution of Cooperation, Basic Books, 1984.
- Robert Axelrod, "Effective Choice in the Prisoner's Dilemma", Journal of Conflict Resolution 24(1), 1980.
- Martin A. Nowak and Karl Sigmund, "Tit for tat in heterogeneous populations", Nature 355, 1992.
- Wikipedia, "Edwin Sifuna".
- The Online Kenyan, "Tribunal upholds Sifuna's removal as ODM Secretary-General", 10 September 2026.
- Nation, "Decision 2027: How Sifuna's Linda Mwananchi team dropped its guard in party registration", August 2026.
- Citizen Digital, "Edwin Sifuna unveils his new party, The Equitable Party", 4 October 2026.
- People Daily, "The Equitable Party: How Sifuna took over the 2027 presidential vehicle", October 2026.
- Citizen Digital, "Political parties registrar approves Linda Mwananchi Movement party name change", October 2026.
- Kenya Today, "LINDA objects to The Equitable Party's proposed rename as Linda Mwananchi Movement", October 2026.
- The Standard, "Sifuna's Equitable Party rebrands as Linda Mwananchi, names officials", 30 October 2026.
- Nation, "Gachagua, Sifuna talks a defining moment for opposition camps?", 22 October 2026.
- The Standard, "Gachagua: I will back Sifuna's presidential bid if he's named opposition candidate", October 2026.
- Citizen Digital, "United Opposition reaffirms pledge to field one candidate against Ruto in 2027", 30 October 2026.
- Kenyans.co.ke, "Kalonzo reveals he is willing to deputise Sifuna to unseat Ruto in 2027", 10 August 2026.
- Citizen Digital, "No problem deputising Sifuna, or him deputising me, Gachagua says as he floats 2027 ticket formula", 2026.
- The Star, "Sifuna surge shakes up opposition's 2027 succession race", 4 August 2026.
- The Standard, "Sifuna gets Linda Mwananchi ticket as Orengo dilemma deepens", 28 September 2026.
- Nairobi Wire, "'I am going to run for President': Orengo dismisses Sifuna sabotage claims", September 2026.
- Nation, "Survey: Ruto commands lead, Sifuna surges", 2026.
- Capital FM, "Sifuna emerges as top choice among Gen Z voters in latest Infotrak poll", 2026.
- The Star, "'No respect for fellow leaders': Murkomen slams Linda Mwananchi supporters after Kalonzo heckling", 31 October 2026.
- Citizen Digital, "ODM leaders urge Kalonzo to dump opposition after heckling at Linda Mwananchi launch", October 2026.
- allAfrica, "Gachagua strikes deal with Kalonzo, targets Nairobi Governor, Senate and Woman Rep seats in 2027", 1 December 2025.
- Wikipedia, "National Rainbow Coalition" and "Orange Democratic Movement".
- Political Parties Act, 2011 (Kenya), on coalition agreements deposited with the Registrar of Political Parties.
