If someone had asked me this question roughly half a year ago, I would have answered: Of course it has to be as good as possible. A computer opponent can never be a substitute for a human player in a Catan game on a real game board, so it should at least be able to play well.
What’s missing in a game against computer opponents are emotions: the complaints when the robber comes, the noisy haggling over resources or the pointed remarks used to make the game partners turn against the alleged leader.

Catan - Die erste Insel (The First Island)
In the first version of Catan for PC (Catan – The First Island), initially published by Ravensburger Interactive in 1999 and later by USM, an attempt was made to provide the computer opponents with human characteristics. The AIs were nicely animated and contributed their wisecracks in a variety of situations.
They sounded funny in the first few games, but with time they became rather monotonous because the computer opponents’ repertoire was, of course, limited.

Siegfried - 1999
Back then, many players complained that the wisecracks were bugging them, and that they were switching off the sound when playing.

Marlene - 1999
To make up for its flawed “human touch,” an artificial intelligence should at least be able to play a clever game in terms of strategy and tactics and thus be a challenging opponent for the human player.

Catan - Städte & Ritter (Cities & Knights)
In the PC game “Catan – Cities & Knights,” published in December of 2008, we thus focused on developing a good AI. We refrained from including spoken comments made by the computer opponents – the criticism of “Catan – The First Island” was still very fresh in our memory.
I for one put over six months of work into the concept of the AI, the fine tuning of the AI together with programmer Sebastian Mellin, and into countless tests. We published the program with an “easy” mode and a “normal” mode, and we wanted to provide an add-on with a “difficult” mode later. The “normal” mode was designed in such a way that an experienced player should have no problem playing the games. Testing and refining of the “normal” mode continued until the point where we at Catan GmbH lost some Campaign games too; then we were satisfied and also a little proud of our work.

Siegfried - 2009
What made us proud as well was the fact that our artificial intelligence worked completely without tricks. There was no manipulation of the dice roll sequences, and the computer opponents were not targeting the human player. When placing the robber or trading, the AIs only saw opponents and made no distinction between the human player and other AIs.

Marianne (Marlene) - 2009
So we were looking forward to feedback from the gamer community regarding our strong AI. The feedback came, but it mostly wasn’t what we had hoped for. Sure, we also received praise, but unfortunately, many players had problems with the strength of our AI. Some of them purportedly needed more than 10 attempts to win the first game of the Campaign. It seemed that many players skipped training in “easy” mode and immediately hurled themselves into the Campaign adventure in “normal” mode.
The following mail is representative for some letters we received:
“The alleged random dice roll in the Catan PC game is anything but random. I’m really asking myself what induces someone to be so – please excuse the expression – antisocial that he writes a program in a way that you simply cannot win.”
In my answer I assured him that I usually do not behave in an antisocial fashion and gave him my word that the dice are not manipulated and the computer opponents don’t gang up against the human player either, and that the computer opponents were just playing well.
The reply was short:
“Do you actually believe the crap you are writing me?”
Also, people often mentioned the predecessor “Catan – The First Island” as the better alternative, although the computer opponents of this original version are very weak. It would appear that players who are repeatedly defeated by a computer doubt the program’s trustworthiness more than their own playing skills. And if someone thinks that the program is “cheating,” he or she feels betrayed and doesn’t like the game. That’s something I can understand.
So, if someone would ask me today how good a “normal” artificial intelligence in a Catan game should be, I would answer: As good as required for an occasional Catan player to win against a computer opponent.
Klaus Teuber
Tags: AI, Artificial Intelligence, Cities & Knights, Computer, Computer Game, Marianne, Marlene, Siegfried, The First Island
Greetings!
Excellent post, and something I have thought a lot about. I worked on Catan for the Xbox Live Arcade (with Brian Reynolds and Big Huge Games). My role was that of Producer and I also co-designed the “learn as you play” tutorial and did the internal usability sessions on the game.
One of the biggest complaints the game receives is about how the “computer” seems to gang up on the player during Normal and Expert difficulty levels. I think there are a couple of reasons for this — and agree that future AI work should take these factors into account:
1. Beginning players who have never played the game socially “in real life” don’t realize that, generally, the end game of Catan often involves targeting the winner for trade embargoes.
2. Even though there are 3 autonomous AI “agents” playing against the player, they are still perceived as one “agent” — the computer.
Although we did try to add “emotionality” (and “rationality”) to the AI by making it use “emotes” to convey happiness/frustration/tactics to the player, they were probably too subtle for beginning players to grasp.
Moreover, because there were no variants and there was no additional context, it seemed like each of the 3 opponents was often saying the exact same thing (“Not now, with you” or “Target the Winner”) over and over again. This probably only added to the illusion that the 3 opponents were colluding.
In conclusion, I’m not sure that making “normal” difficulty feel better by simple calibration methods (ensuring that average players when X% of games) is enough. It seems like additional attention needs to be paid to the AI agents so they appear to act according to their own motivations (and not in collusion with each other) and they communicate with the player about the need to gang up on the winner when another AI opponent is winning.
Cheers,
J
heh heh!! I had to laugh. I compile pub quizzes, and you can get very wound up in your own standard of quizzing and forget to cater for the rank & file. Result, half a pub doesn’t have a clue about the questions, and you feel like a right proper Charlie for asking them what to you is a very reasonable question.
computer games are somewhat different, though. You risk losing the intelligent end of the market if it’s geared towards the sort of people who will recoil in horror at their computer’s unfairness. Why not a much more vast range of skill levels, with incentives in detail and gameplay for people who progress through the ranks?
for my part, the only times I’ve played Catan, I was a little bit stoned, and just didn’t have the deviousness to master it. Got absolutely trounced. Great fun though!!
How would you say either AI compares to the xbox live arcade version?
Well, I’m a bit rusty with my AI (wasn’t as profitable as the other areas I excelled), but it seemed to me that a gaming AI should play to a running average of the quality of its opponents. I’ve seen simple systems score, like in chess, based on wins/losses alone, but I doubt that would be satisfying. I’d picture a rating system on the overall strategy of a player, of course tied into a profile of theirs (and winning would be good too). As they lost, the AI would weaken. When they started winning again, the AI would become better.
I’ve never played your game (the computer version, I’ve played lots of Catan on many a kitchen table), so I don’t know the multi-player support, but I’d generally go with setting the AI to play to the level of the best human player.
[...] Originally posted here: How Good Should an Artificial Intelligence in an Electronic Catan … [...]
I play Catan on the xbox 360 and I actually think the developers did a decent job with the AI. I’m a bit of a Catan veteran so I find the game a bit too easy on the advanced level, but I think the emotes did a good job of giving the AI a limited but expressive vocabulary. It helps that most players don’t use the headset microphone and communicate through emotes too. While playing xbox online I often find myself wishing that *all* games had this emote system, so it must be good!
I think the problem here might better be termed “artificial stupidity”. As a seasoned Catan gamer I can have a good crack at creating an algorithm for my decision process during the game (e.g. cost functions that dictate where to build, when and what to trade, who to target with the robber etc etc). This might be able to play a decent game, apart from a few grey areas that need the human imput of knowing when to break these algorithmic rules. So let’s assume this AI can play a decent game of Catan and challenge a human player, how then do I create an AI that would suit a beginning player? It’s really glaringly obvious on other turn based games on xbox, like “Lost Cities” for example, when the AI makes a completely stupid mistake that no human player would. Perhaps the answer is to observe and interview novice Catan players and try and convert their decision process in to an expert system?
Hello and I really enjoyed your post, Mr. Teuber. I started playing Catan via the Xbox 360 version and eventually signed up for Catan Online World. I also bought the Catan PC C & K game, mostly due to the fact that it had so many variation that I could learn before playing Online. I have never actually played a game off the computer yet “around a table” as must folks I know still don’t know what Catan is yet. I live in Brooklyn, NY, fyi…
All this being said, I really appreciate the fact that so much effort was made to make the AI tough players. I cannot tell you how many computer games I have bought and found the AI completely worthless and thereby the game. I have played Catan for about a year and a half now and I really love the game, especially when playing with live players online. But when I cannot do so or when I am learning one of the variations the PC game solidly holds up and keeps my attention. Anyone who complains just needs to get better. Yes, I do get beat by the occasionally AI, but I find myself beating it more often now then when I first got it. I also do feel there are still a few “holes” in the game, both the PC version and Catan World Online. The major one is dice rolls. In online, you have take care of this with the “cardstack” for the most part and I find myself really only wanting to play this type of game. In both the PC C&K and the online, without cardstack the dice just seem way too often to gravitate toward one or two numbers that randomly they would not. I cannot tell you how many times that number has been “9″ but I have seen it be lessor numbers as well. A number like 4 that should not come up nearly as often. Yes, I believe that what is written is supposed to be random, but despite that it just doesn’t feel the same, especially in the PC game, at times. I would really love to see you add the cardstack option to a PC update. As it’s in online, for me it would make things feel a bit more “random”.
Finally, I would love to see the game in MAC as well, as I am typically a MAC user. I split the hard drive on my Macbook Air two both PC and MAC to keep a copy of the game on my computer. But that means rebooting, etc. So, if you get the time to make a MAC version it would save me that.
I hope this post helps and again, thanks for creating such an amazing game. I can’t tell you how many hours of sleep you have cost me in playing till a late hour. If I can offer any other insight, or perhaps beta testing, let me know. I look forward to hopefully watching the game grow here in the states and actually playing it with live people at some point! I have started to try to corral friends to teach them but it just has not happened yet. In time…
Cheers.
Klaus and Jason – I read or heard that the AI for the XBOX Live Arcade version came from an Excel spreadsheet of what to do in certain situations based on hundreds (or thousands) of real-world games. Is there any truth to this? If so, could you share what it looks like?
I’ve wanted to make a Catan-inspired game for Facebook and the iPhone, but I’ve never been sure I could build an AI that was fun to play. It’s comforting to know that even the pros face this problem too.
(BTW – I work on AddThis which I see you both use, let me know if you have any questions)
It seems nomenclature of the levels makes a difference too. If you had called the “Easy” level “Normal” and the “Normal” level “Difficult” or “Challenging” the expectations of the AI would be very different, and I think you wouldn’t receive such complaints. Plus, those people who managed to win against the “Difficult” level would feel a greater sense of accomplishment.
(You could sell the add-on as a “Master” level.)
The Mac version of “Catan – Cities & Knights” is in final testing. As Apple has published “Java for Mac OS X 10.5 Update 4″, all problems have been solved. – The Mac version of “Cities & Knights” can be expected by next week. Simply follow us on Twitter to be sure to be the first to know.
There was a bug in “AddThis” yesterday – propably on the AddThis server. It resolved by itself – propably you fixed the bug.
Remember in Star Wars when C3PO said “let the wookie win” — even if your AI “can” win – sometimes you should “let” the player win because in the end – its all about the player having fun – not playing “well”.
I dont mean throwing the game, perhaps even in “normal” mode – the ai is starting out to be a little less intense and scale it up. Look at POPCAP games.
I don’t know, but on the PC game (the new one just released a month or so ago) the AI does gang up. With 2vp and everyone else with three, the robber gets sent to me (or Pirate Ship of course) lots more in the opening game than it should if the decision making process bases who gets the robber on VP.
Speaking of AI, when will the Nintendo DS version of Catan be available in America? I saw it for sale on the German Catan store, but I was wondering if there was a way to get it from an American store or a dealer like Amazon or Gamestop?
While Catan for Nintendo DS has been launched in Germany, we do not have an official release date for the English version. We will post an update on catan.com and as well on Twitter as soon as we know the release date!
I ordered the DS version from the german store (tricky stuff), the cartridge includes the English version, so it turned out well. If only the store itself supported English this would be a non-problem for people that want to order it online.
PLS
[...] these links was the Settlers of Catan blog, with a thought provoking piece from Klaus Teuber about how strong AI opponents need to be in a game, take a look, it’s really interesting (his conclusion, “Not as strong as you’d [...]
I am new to the game, but wanted to give my input anyways. I’ve played a handful of games in real life, and about 100 vs. the computer. I have significant experience playing other strategy, turn-based games including RISK and Civilization.
I have the AI set to “Normal”. At first I found it too challenging and could not win a single game. It took me about 25 games to learn some of the more common strategies. Because the board changes, it takes time to learn which strategy to use. I now win about a third of the games vs. 3 computer opponents, which is a good ratio in my opinion. I seem to do worse vs. 2 opponents, but I have only played it about a dozen times.
There are two things I wish the AI did different. When setting the initial roads, both players and the AI point them towards the next settlement location. A player considers the risk of other players getting their first, but the AI does not that I can tell. In this way, the AI sometimes challenges you to get their first more than a player would (unless the settlement site is that significant).
The only change I would make is regarding the perception of who is ahead. The computer goes after the person with the highest score regardless (that I can tell). Often the computer builds 4 roads, leaves a gap, and then continues. In this way, the computer can simply fill in the gap and get two points. This is something a player would recognize and try to block.
Overall I am very satisfied so far.
I think the new players’ frustration comes from a combination of two things:
-perception of ‘ganging up’ by the computer. The AI sometimes sends the robber to you even when you do not posses the most points.
-true randomness of the dice. Because the dice are truly random there will be sequences where the most common roles are in fact not rolled. Combine that with rolls which benefit the AI and it appears unfair.
Overall, it is an excellent implementation of a great board game.
I think the AI is generally good but I would have three criticisms (partially covered above).
Firstly the robber/pirate is played on the human player more than it proportionately should be at the start of the game before additional victory points are added. The detailed stats regularly show that despite having only 2 VP I’ve had more resources stolen than all the other players combined.
Secondly I totally agree with the point about lack of situational awareness. The computer won’t make an extra effort to build a road or settlement to shut you out and quite often will buy yet another progress card instead. Combined with the fact the computer will often trade you the resource you need to jump them it doesn’t feel realistic.
Finally the computer players hoard cards too much and will frequently go bust with 15/20 cards in their hand (especially in C&K). The detailed stats again show just how much this is hurting their chances of winning.
Any news on an online version of Traders and Barbarians?
Great Discussion! I’ve just started playing and I find the AI to be difficult to beat. In 50 games I have only won 13. I am getting better slowly and my win ratio is also improving. I’m curious about the AI programing and feel that understanding the decision tree built into the AI could help me become a better player. Is there anything written about how the AIs were programmed. Whgat is the best way to learn from the AI? Is there anything available online? Do the AIs play differently than each other? In my game Siegfried, Candamir and Louis are the top three ranked AIs. Is this usually the case? Where are these stats tracked?
Thanks Klaus for such a fun game! I just got introduced to Catan C&K by friends about 6 months ago. I bought the mac version to learn to play better. I’ve played probably 200 times by now and beat the best ranked AI’s about 80% of the time. I would love to see you upgrade the program to have a more difficult version. One flaw that I think would be great to see fixed is that the random layout of the numbers is always spaced out with the numbers pretty much opposite of each other. So that no two of the same numbers are near each other. When I play my friends on the board game you often get 8′s next to each other, etc. This makes it difficult for me to learn how to play in real life situations. Any plans to change the layout of numbers to be more random on the computer versions? Thanks again!
@William: If you 8′s next to each other (red numbers) then you are not setting the board up correctly per the instructions.
Sorry, but i have played approx 1000 games against the comp AIs and while i love the game and the frustration it gives me ( i am not married so it adds color to my life ). You can never convince me the AI does not cheat. Its not that 11 or 3 can be rolled 11 times in a row or 14 7s for the 3 comp players but none for me
. It is things like me having 4 points and one AI with 10 points traded to an AI with 12 points (Cities) or watching them trade with out posting a trade even though i have the right resources, they just swap.
.
Do the AIs play on a game to game basis or is this because I got below 3 in my running game score?
Great game by the way, but I detest cheaters, no matter what “flavor they are”. You are to be congratuated on your hard work with the AIs
though as I could never do what you have done
Awesome, thanks for the 1000s of hrs of enjoyment and hehe frustration you have given me
May you proper for the amount of work I see in your efforts,
This is the final roll frequency for my last game in Catan – The First Island: http://tinypic.com/view.php?pic=2a4pl42&s=6
In case it’s too small to see, here are the frequencies for numbers two through ten:
Two: 3
Three: 6
Four: 5
Five: 14
Six: 7
Seven: 19
Eight: 8
Nine: 4
Ten: 6
That’s right, a Five was rolled 14 times, while Six and Eight combined was rolled 15 times. Of the remaining resource numbers, none was rolled more than 6 times.
Guess which was ONLY number between Two and Ten that I didn’t control? Yep, Five.
I also rolled only 2 Sevens. The rest of the AIs combined rolled 17. At least half of the AI rolls were used against me (i.e., stealing my cards), plus at least 4 Knights, even though Jean had a hefty lead throughout almost the entire game.
The AI cheats. This might be a subtler way of doing it, but it does. This doesn’t even address the more blatant cheating:
- They can see your Victory Point cards
- They will Robber you and steal your cards with higher probability than each other unless you’re very far behind
- They refuse to trade with you at 7+ VPs – not even a 3:1 ratio works – but they will happily trade 1:1 with each other even if they have 9 points
It’s not fun.
It is a common misconception that even among a rather small number of dice rolls (3+6+5+14+7+19+8+4+6 = 72), the numbers on the dice have to show up according to the probability distribution. By chance, 72 is exactly twice 6×6, the latter one the is exact number of possible 36 different outcomes when rolling with two dice (1/1, 1/2, 1/3, …, 2/1, 2/2, 2/3, …).
Looking at this naively, one would expect that among 36 dice rolls there should be exactly one “2″ (1/2), exactly one “12″ (6/6), five times “6″ (1/5, 2/4, 3/3, 4/2, 5/1), six times “7″ (1/6, 2/5, 3/4, 4/3, 5/2, 6/1), etc. But this simply isn’t true: This ideal probability distribution works only according to the “law of the large numbers” — that is: when rolling two dice for a near indefinite (!) number of times, 1/36 or the outcomes should be “2″, 1/36 or the outcomes should be “12″, 5/36 of the outcomes should be “6″, 1/6 of the outcomes should be “7″, etc.
72 dice rolls is far from “near indefinite”. With such a small number of dice rolls, anything can happen — and will happen, as you have clearly shown. Having no settlements close to a “5″, and then a lot of “5″s being rolled is no different from having no settlements to a “5″ and almost no “5″s being rolled: It’s both as likely or unlikely, as there are “just” 72 dice rolls.
About the AI cheating: The decision of who wants to trade with whom is not cheating. This could happen at table game with real humans as well. It probably won’t, as human players might see things less serious as a computer algorithm — except when being in a tournament situation. I have seen a lot of bare-knuckle game practice on different occasions.
This strongly underlines the point that Klaus has given in his blog post: How strong should a (non-cheating) AI be? As good as possible to be a tough match for the best human players? Or (quoting) “As good as required for an occasional Catan player to win against a computer opponent.” I can only assume that the AI plays too strong for your taste, and thus it’s no fun. I am really sorry for that.
The point is the AI’s do cheat. They use Progress cards when it shows they have zero in their hand. They do trades so quickly that a human does not have enough time to see it let alone think about it. I have also had situation where it is of no possible benefit for an AI to place the robber on me (massively behind with no cards in my hand). I have also seen at least once an AI build a city and a town even though it only had 7 cards (and did not play the Medicine card).
I’m quite sure that the dice are fair, but the AI’s aren’t.
I’m calling Klauss out on this. there must be a way of demonstrating the AI’s programming (get a dev on this blog or something).
@Tom – thank you for your message. Let me tell you: The game-play has been tested by various beta testers. I won’t say that our software is without program bugs, but such a blatant flaw like an AI playing a development card that it doesn’t actually have would have been noticed, reported, and resolved by now.
Concerning the other game situations, they are indeed hard to analyze without actually sitting in front of your screen. Which benefits or lack or such are involved when the algorithms decide where to put a robber is sometimes less than obvious. All I can say is that strong human players have played against the AIs and have never accused them of playing unfair or of cheating.
Don’t get me wrong: If there are bugs, then they need to be fixed. In such a case, I’d like you to document the situation as good as possible and send it in to us.