Characters

The café regulars: building opponents with a personality, not just a level

Am Fathi, Hamada and Bu Rashed are more than hard and easy: how we give each regular a way of playing and table talk, and test that hard really is hard.

Open Zezo Café when none of your friends are free and the table does not stay empty. The regulars are in: Hamada, always in a hurry; Hagga Suad, who plays at her own pace; and Am Fathi, who has been sitting at this table for as long as anyone remembers. In the Gulf majlis there is Bu Rashed, the host, Faisal, still learning, and Saud, who cannot stand waiting. These regulars are not decoration. They are your opponents offline, and they fill the empty chairs online when few people are around.

The first question we faced while making them was simple: is it enough to have "easy", "medium" and "hard"? The answer was no.

A level alone is not a personality

If the only difference between opponents is how often they make mistakes, you feel you are playing the same person, sometimes awake and sometimes sleepy. A real café is nothing like that. One player loves to hit every lone checker, even when it is risky. Another never leaves a checker alone and prefers to build points and close you in. A third only wants to race home first. Two of them can be equally strong, and playing them still feels completely different.

A way of playing, in numbers

So every regular has a "style", written as weights. When the opponent considers a move, it gives each resulting position a score. That score is made of several parts: how much the move hits or traps, how much it leaves your own checkers exposed, how much it builds points and walls, and how far it moves you ahead in the race. The style scales each part up or down. A regular with high "aggression" enjoys hitting. One with high "safety" worries about a lone checker. One with high "race" loves to run.

On top of the style there is "noise": a small random amount added to the score, so that an easy opponent sometimes picks a move that is not the best, exactly as a newcomer does. Easy regulars have a lot of noise; the hard ones have none, or almost none.

The Egyptian café

  • Hamada: easy, very noisy, aggressive and careless about safety. Sitting down he says: "This one's easy, boss, watch." When he loses: "The dice aren't with me today."
  • Ziad: easy too, but calm and counting: "One second… let me work it out." When he loses: "I learned something new today."
  • Hagga Suad: medium, very careful, fond of blocking, little aggression. Patient: "Easy does it, dear."
  • Am Sobhy: medium, but very aggressive. "Take that!" and "The tea's getting cold!"
  • Am Fathi: the hardest. No noise at all, a balanced, calculated style. When he wins: "Forty years at this table."

The Gulf majlis

  • Faisal: new and eager: "Hello! I'm new to this."
  • Um Salem: medium, careful, likes to close the game on you: "Please, the coffee is ready."
  • Bu Khalifa: aggressive and sure luck is on his side: "Welcome, welcome! It's my lucky day."
  • Saud: quick and fond of racing: "Come on, come on, don't keep us waiting."
  • Ammi Hamad: hard, no noise, balanced like Am Fathi.
  • Bu Rashed: the host, hard and careful: "God greet you, please sit."

All of them are characters we invented; none of them stands for a real person.

A personality is written in words first

Before any number reaches the code, each regular is described in words in our characters file: level, style of play in one sentence, and way of speaking. Am Sobhy "loves to hit and trap, and is not afraid of leaving a checker alone", and speaks like a needling talker. Hagga Suad "plays defence, closes her points and waits for your mistake", warm but with a pinch. Ziad "counts a lot and sometimes gets muddled". That description is what later becomes weights and noise, and it also guides the lines in the speech bubble and even the face drawn for each of them. Looks, words and play all tell the same story.

The host and the guest

Every café has a host. In the Egyptian café it is Master Zezo in his tarboosh who welcomes you; in the Gulf majlis it is Bu Rashed. The nice twist is that Bu Rashed also appears in the Egyptian café as a guest from the Gulf, hard, calculated and calm: "Fine, but I have a surprise for you." A small detail, but it ties the two cafés together, and a player who moves between them feels they are in the same neighbourhood.

Every game thinks differently

The weights were first built for backgammon, but each game has its own way of thinking. In Baloot, the opponent judges its hand before bidding and counts the cards already played, as any good player does, which tells it when to call trumps and when to pass. Over 400 games, Bu Rashed beat Faisal about 70% of the time. In Jakaroo, the opponent looks one move ahead before choosing; Bu Rashed won about 68%. In Carrom, the opponent works out the shot that sends a piece into a pocket, then tries it with the same physics before shooting. Faisal pockets about 28% of his shots, Saud 59% and Bu Rashed 66%.

Talk is part of the game

Each regular has lines for greeting you, gentle teasing, wincing when you hit them, losing and winning. They are written in the dialect of the café they sit in, Egyptian or Gulf, and nothing in them is hurtful. At big moments, when you capture a pawn in Ludo or clear the last board in Carrom, a regular may also answer with one of the café stickers. A small thing, but it makes playing offline feel like sitting with people.

Regulars online, too

At online tables, if two of you want a four-player game of Baloot, you do not have to wait. The host taps "add regulars" in the lobby, and the empty chairs fill with the regulars of the café you are sitting in: majlis regulars for a Gulf game, Egyptian café regulars for an Egyptian one. The server plays them, with the same personalities and the same way of thinking, so the table goes on as if every chair were taken. When your friend arrives, they can take a seat at the next table.

We test a personality like we test a rule

None of this means much if "hard" turns out to be easy. So we run thousands of matches between the regulars and check that the order makes sense. Over 10,000 matches, Am Fathi beat Hamada about 96 to 97% of the time at backgammon. We also check speed: the average decision takes less than a millisecond, so you never wait. It is part of the same testing approach we use for the rules.

In the end, the goal is for you to say "I'll play Am Sobhy today" instead of "I'll play the medium bot". If you want to see their faces, they are hanging on the Zezo Café wall.

More from the journal

An idea, a partnership, or a question?

Press, collaborations, content, anything about games. We read every message.