Skip to Content

Board Game AI?

22 replies [Last post]
Lofwyr
Offline
Joined: 02/16/2010

Board Game AI? I see comments, all over the place about the supposed complexity of video game AI. Most recently I have taken stock of designers that simply dismiss (or stop discussing) board game concepts because of some perceived reliance on a “complex” video-game AI. This is usually do to the disheartening words of some other designer. I assure you that electronic AI and board game AI are equal in BOTH simplicity and depth. Indeed, it’s HARDER to deliver these mechanics as code in some cases.

I write this in the hopes that, rather than dismiss some really epic game ideas (I’ve seen a few these past few months) as too complex or convoluted, you will instead push yourself to think like a DESIGNER and head back to what I know are some Inventive, Creative, and Innovative ideas. So, let’s dive right in yeah?

Board games can have AI and, rather often, have the same AI as a computer. I mean that literally.
What? No way Batman!
Yup.
This is how it works, can work, could work, and sometimes, does work.

An AI for any program is just a difference engine; it makes decisions based on a predefined set of requisites. OTHER than complex pathing (walking around n’ stuff), board games use difference engines all the time. Just for the record, most MMO creatures don’t even have an AI, such as boss mobs. These critters act in a predefined “routine”. Something acting in a routine isn’t an AI, it’s a play-list and THAT can be constructed in any board game with almost no thought.

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Let’s grab a wow boss then, and place him in a board game.

So our wow boss is some silly fight that seemed fun when you were playing wow but is about to lose a ton of its complexity. He will however, fight precisely as he did in the game. Our wow boss has 5 abilities (say, on a handy-dandy card) and 4 health.

When the Fight begins our WOW boss uses 3 abilities, in order, from the first to the third and then back to the first again.

Each time our wow boss loses a health he enters a new PHASE and uses new abilities.

(*This is the very definition of video game AI. A change in conditions results in a change in behavior.)

When he enters a new phase add 1 to the number of abilities he uses. So at 4 health he uses abilities 1-3, at 3 health he uses 1-4, at 2 health he uses 1-5.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Yup. Just made a wow boss fight in a board game. Not complicated and certainly just as interesting (from a tabletop gamer perspective) as a wow boss fight. If you want more fluff added you can easily tack on changes to what I showed above and create a nice complicated mess, entirely up to you. My point is that these things can be done, easily.

Alternately you could have the boss use abilities with a preference, based on his current health, his foes health, or the number of stars currently visible to the third player to your right. This could be expressed as a double sided card that changes based on health, an inner and outer WHEEL, or even just a roll preference. It really doesn’t matter how you do it because ultimately you’re just playing with action-reaction. If you sit and stare at some code for a while you’ll start to notice some grade school math….guess what…..code or table-top…. its all the same.

My point in all this is that the AI used in most games is incredibly simple and rarely extends beyond what I have shown above. The only time you will ever run into any complication is with expressing the concept of AGGRO (this also comes up frequently). This is the idea that a creature has decided that one target is preferable to another. This is also NOT AI. Its value driven and runs, in almost all cases, as a literal system. This is to say that if I have 200 agro and someone else has 300, they are now the preferred target simply by having a higher value than me.

Given the simplicity of the system above it should be obvious how an agro system would work for a huge number of creatures with little or no tracking. In fact there are games, right now, that do this with exceptional precision. It should also be clear by this point that many of the hurtles I have seen thrown at you aspiring designers out there can be overcome.

“Leave it in video games where it belongs……”
“Board games simply can’t track that many values….”
“Board games and video games do different things well….”

No…..haha…..no no no no. You want to take the easy way out and say it can’t be done? Great! Just leaves that innovation open to another designer with the insight and motivation to get the job done. Cuz sure as there’s bees to hives, someone WILL get it done.

Stay motivated and keep designing!

E

TwentyPercent
Offline
Joined: 12/25/2012
RE: Board Game AI

Hey Lofwyr

First, let me say that you are correct. AI is just simple logic, whether it's via board games or video games. If you've read some of my recent threads (which I'm inclined to think you have, lol, as this is directly related to my most recent: http://www.bgdf.com/node/12999), then you know that I am in favor of having depth in board game AI, as this lends itself to having more mechanics and strategy.

It's very possible to have a board game boss who's sheet is a full typed-page, which would describe the various scenarios in which he uses his different abilities, as you describe above.

I don't think a lot of people would disagree with you. The issue, though, with having more complicated "AI" in board games is the time and effort it takes to record keep and follow everything. If a fight takes as long to keep track of all the options and abilities as it does for the players to make the fun decisions and actually execute the fight, the game probably won't be that fun. This is where video games do "AI" better. It's not they are more complicated, they simply do all the calculations and record keeping underneath the table, and take no time in doing it. That's why they can have so much more depth and options than a board game.

I don't know if you've played Mage Knight (board game). It's fun, there's lots of options and mechanics in the game, but a lot of time is spent in setting up the game and record keeping (there's seriously like 10 charts and graphs and tables). This turns off a lot of people, but not everyone. Some people like the extra depth, at the expense of extra time to play the game.

Anyways, I do completely agree with you, though. Board game "AI" has all the potential that video games do. The question, though, is the target audience. This is dictated by the designer, who gets to choose how many steps are involved in resolving combat and other "AI" decisions. It's just a balancing issue. I believe that the more depth there is, the smaller the target audience will be.

Great thread! Just my two cents. I'd like to hear yours and other peoples'.

laperen
Offline
Joined: 04/30/2013
amazing post on simplification

amazing post on simplification, it is true that video games can be considered just larger values of a simpler system

although i myself am against AI that is too lengthy to track in a board game, IMO only a chain of command no higher than 3 is satisfactory, for a board game that is

Lofwyr
Offline
Joined: 02/16/2010
I R Lecutus

@TwentyPercent

Your post certainly meets the criteria of a game concept that should not be hastily abandoned. It also happens to be similar to a host of similar (in spirit) game concepts that have all been either abandoned or completely "re-drawn" due to discouraging AI posts. That of course was what drew me into posting at all.

As for the complexity or simplicity level of a given system. You mentioned in some of your other posts that it was "on the designer" to execute well. I assure you that I have executed several kinds of AI systems as board game mechanics that are both speedy as well as compelling.

For me the real trick of good AI was creating player anticipation and adaptation. Forcing my players to think several turns ahead or fear an immediate and unpredictable response guided players to excitement. As with any game mechanic you should always ask "is this fun?"

As for Mage Knight. I have made several posts about "Dinosaur" miniatures products. These are products that followed an old 1980's design-style. The kindest way I can describe this is "antiquated". You can't bring your four-door family sedan to a rally race and expect to win (against rally cars). Nor can you make designs like mage knight and expect them to stack up against video games.

E

TwentyPercent
Offline
Joined: 12/25/2012
RE: I R Lecutus

Hi Lofwyr

Don't worry, I have not abandoned my game at all. It's a big endeavor and will be challenging, but that's what makes it a fun project. Thank you for your words of encouragement, though. I definitely like being challenged and actually want people to challenge my ideas as much as possible (particularly, in a friendly, constructive manner). Your post was well received, and well thought out. Sometimes people just need to have things laid out in front of them.

I definitely think a board game AI system can be incredibly simple yet still have depth, complexity, and fun. In my game, enemies use two combat dice, one that determines the ability to use, and another determines the target. It's as simple as rolling two die and the monster's actions are decided. Additionally, where designed as such, the cards may override or circumvent the dice, to prevent any obvious and erroneous actions (such as the monster healing an enemy). The cards can also dictate a certain ability in a certain situation. For example, the Fire Elemental may use Combustion his first turn with HP less than 5.

You are right that player anticipation and adaptation is key. To help broaden the target audience and keep more people interested, simplicity is also key. You are right, again, that the question should always be "Is this fun?" (As an engineer, the question in my mind, work or non-work related, is "Does this solve the problem?"

Anyways, I would be really happy to see some of your projects and how you have implemented AI mechanics into your games. In return, I would be happy to provide constructive feedback as well.

Thanks for the post, Lofwyr. It's always great to hear other people's ideas and opinions. Enjoy your Labor Day weekend!

TwentyPercent

lewpuls
lewpuls's picture
Offline
Joined: 04/04/2009
I think the OP is misleading.

I think the OP is misleading. Yes, a computer is "dumb as a box of rocks". Yet as has been noted, computers can check for many possibilities very, very rapidly, and keep track of everything for the players. Furthermore, they can hide the decisions from the players.

Any kind of instructions, computer programs or otherwise, consists of three possibilities,
1) Sequences of instructions
2) Conditional choices (If is true, do this, otherwise, do that, or make one choice among several depending on a )
3) Loops (Do Until, Do While, For Next)

When there's an If condition or a Branching condition in the artificial opponent for a boardgame, at least one player must choose which way to go, as there's no computer to evaluate the IF or BRANCH. In most cases a human will be involved in deciding when a loop is done, as well. This not only slows down the game, it reveals information to the player(s) that they probably should not have.

Computer opponents in video games - I don't use the term "AI" because there's no intelligence involved - are intentionally simple in plan, but the speed and hidden action of a computer make the computer opponent potentially far more sophisticated, and far more practical, than a non-computer artificial opponent can possibly be. No one tries to create an intelligent opponent, they want an approximation of one, but that's much more reachable with a computer than without.

Lofwyr
Offline
Joined: 02/16/2010
Implement with purpose!

Hey Lewpuls!

First and most importantly, great post! I can see how a student of OOP (object oriented programming) could consider the variety of argument types available to a coder as something more complex than a simple board game. So rather than argue over conditionals or logic statements lets first set our sights on the ultimate JOB of the board game designer. To simplify or create abstractions of complex concepts in order to make them more easily digestible. That said, there are many interpretations of the Game Designer "mission statement" and this one is merely my own opinion.

Let's step inside and see what's actually going on!

In a program were going to define a random value, something to hold the random value, then call the random value as its generated to decide if things happen. This a great example of a D-6! A six sided dice certainly won't generate as many values as can be created by a computer but the requisite complexity level dictates the number of values required. The question should be then "how many values do I need?"

When deciding simple things, like "did I hit or not" we really only need enough values to generate the required number of ANSWERS. In this case, knowing if we hit or not, the most basic answer is Yes/No. Realistically, we could flip a coin. If we wanted to reflect one attacker being more accurate than another we could allow him to flip a second time if he missed, or perhaps flip more coins. The point is that a complex system; like hitting a target with cover, that dodged, is using a shield, and tried to parry, can be solved with ;"simplify or create abstractions of complex concepts".

Applying this simple system allows us to offer some really easy to implement and MOST IMPORTANTLY game EHANCEING interpretations of complex systems. I could rant all day about the myriad of great games that do this well but let's take one title and expose some of the genius in the system.

Zombicide!
This excellent title shows of a difficult to tackle and often intimidating mechanic. Aggro!!

Aggro, as defined in my earlier post, is the ability of an "enemy" to show preference for one target over another. In Zombicide the players generate noise by taking certain actions (with the most noise being generated by weapons fire). Each time a player generates noise a number of tokens are placed adjacent to the model. When it comes time for zombies to move about the board they simply move in the direction of the greatest number of noise tokens.

Not only does the designers interpretation of Aggro offer simplicity but it compels the player to take stock of his choices and act accordingly. In some cases the player will fire off a weapon to draw zombies closer in order save allies or force the zombies down a certain path. Clearly, in other situations, the player avoids combat in order to avoid making noise (by firing a weapon) and incurring the wrath of the zombie horde! This system contains the very definition of excellence in mechanics design. Implement with simplicity in mind, while compelling the player.

While I understand your apprehension at the idea that a board game could ever match the value of a computer mechanic I contend that they not only can, but do! Reaching the goal of an intelligent (figuratively speaking) opponent in a board game design is a matter of designer ability, not board game limitation.

"Easy to use, easy to clean. It's the perfect weapon."

E

zmobie
zmobie's picture
Offline
Joined: 11/19/2008
The interesting problem here

The interesting problem here isn't actually designing the set of rules that makes a game AI. As we have seen in this discussion, that isn't overly complicated. The hard work comes in the component and graphic design that helps make tracking all this stuff simple and intuitive.

There are two extremes I can see here when dealing with an interface.

The first is just the wall of text option. You just write out all the rules in a couple of paragraphs, let the players read this, and follow the rules. This monster will attack the player with the least hit points. He will use his ranged attack at x spaces, and move into melee at y spaces. There's nothing inherently bad about this, and with simple enough AI, and a simple rule set, this might even be the preferable option.

The other extreme, and the one I'm interested in exploring, is that the AI is actually dictated by the graphic design and components themselves. For example, a maze like path printed on a card. A tracker moves down the path, and different statistics of the monster open and close different paths through the 'maze' of possible monster actions. The monster loses enough hit points, and the hit point tracker is now covering the path that leads the monsters turn tracker down a path that was more aggressive. Now it leads to heal actions the monster will take.

I hope that makes sense. I have the damnedest time putting stuff like this into words..

Knicksen
Knicksen's picture
Offline
Joined: 05/18/2011
Board Game AI Purpose

I'm intrigued, as recent feedback on my game included "if this could be played solitaire, I'd be all over it".

My game (Magic Maelstrom) has a lot of player interaction, with alternate player actions, so, whilst being grateful for the feedback, I filed it away as 'interesting'.

Now you are making me reconsider. If the Board Game AI can have some decision making taken by other players then I can see how I could make this work, but for solitaire, I can only see scripted responses, as described by Lew...am I wrong?

Lofwyr
Offline
Joined: 02/16/2010
Robble Robble

@Zmobie

So, clearly, we should avoid any dinosaur approaches to the AI. No gigantic charts or pages of reference material. Even when these implementations work well they carry an unwelcome and easily avoidable intimidation factor. That says nothing for the clunky nature of referencing large tables or “easy reference” sheets.

“The other extreme” is absolutely the right direction to move in. However, your concept for implementation is an interesting variation on Hero Clicks. These models have a wheel at the base that changes ability choices (for the player) based on damage taken. This information moved to a card or even an alternate “base” system would work well to satisfy a simple AI.

@Knicksen

A) I just don’t know the rules of your card game, makes it much more difficult to make an insightful comment, however…..

B) If you have a card system, you have an AI. Creating a single player selection of cards or perhaps a deck specifically for playing solo could be a possible solution. With the variance of a well shuffled deck you really have lots of options available to you.

lewpuls
lewpuls's picture
Offline
Joined: 04/04/2009
In an era when most players

In an era when most players don't even read the rules, someone explains them - yes, there was a time when a large proportion of players actually read the rules - a wall of text artificial opponent is very problematic. Unfortunately, so is anything that uses tables or flowcharts - publishers will usually tell you those are no-nos. It has to be in a deck of cards, pretty much, as in Pandemic. When a computer is used, all those more-complex options are available. No computer, forget it, in the 21st century.

Furthermore, any simple artificial opponent is predictable. Solo or cooperative tabletop games are actually puzzles, where you can calculate a best move once you know the artificial opponent well. That's why co-op games have different levels of difficulty, as players learn to consistently beat the artificial opponent at simpler difficulty.

For that matter, most single-player video games amount to puzzles, as players learn the best solution, which leads to "speed runs" where the player can fire through the game in a few minutes that originally took many hours to play.

I'm afraid I didn't get the point of the Aggro example. First, a simple tabletop aggro mechanic (especially without random factors) can probably be "gamed" by the player(s) to guide what the opponent does. Second, I think aggro is a crutch invented for MMOs so that the computer opponents can be predictable and so contribute to "the grind" - the stupid computer opponent attacks the tanks while the dps guys slaughter it and the healers cure the tanks. That doesn't happen with a good human referee, the badguys go after the dps pukes first. (Or the healers if healing is REALLY important.) Third, does a method of representing aggro even begin to approach what a good computer opponent can do? Not only no, but Hell No.

A major advantage of tabletop games over computer games is that humans are immensely better opponents than any computer opponent, unless the game is essentially a sport depending on perception and reflexes. Some things are better done with a computer, some with tabletop games. A non-player opponent is much better done with computers.

TwentyPercent
Offline
Joined: 12/25/2012
RE: In an era when most players

Just a couple comments:

lewpuls wrote:
Furthermore, any simple artificial opponent is predictable. Solo or cooperative tabletop games are actually puzzles, where you can calculate a best move once you know the artificial opponent well. That's why co-op games have different levels of difficulty, as players learn to consistently beat the artificial opponent at simpler difficulty.

Maybe, at this point, I am getting confused as to the terms and key words everyone is using, but simple "AI" (I mean it as automated NPC actions, not actual intelligence, or "strategy") do not have to be predictable. To go back to the mechanic I'm using for my game, monster's actions are determined by two dice; one which determines the action the monster takes (could be he heals himself, cast a paralyzing spell, or melee attack, and the other determines the target. It's completely random and not predictable. This keeps combat from being a puzzle, where you can plan out the next 4 turns. Instead, it requires the players to strategically decide their own actions based on balancing their own output (damage, healing, abilities) vs the probabilities of what actions the monster might take and which player character may be an "available target" (for the monster).

lewpuls wrote:
A major advantage of tabletop games over computer games is that humans are immensely better opponents than any computer opponent

You are completely right; a human player has the ability to use strategy. This could technically be done in video games via long coding and lengthy algorithms, but this just doesn't fly in the board game industry. It can be dumbed down (but still moderately effective strategy), as mentioned above, via lengthy paragraphs describing the various scenarios in which "AI's" actions would be decided. Again, though, this just doesn't bode well among players. The point, then, is that no "AI" in a board game has the ability to come close to reaching the strategic ability of the human player, and thus is flawed "intelligence." This lack of true AI or NPC-strategy can be compensated by randomness and/or simply making them more difficult.

My "AI" mechanics definitely aren't a true "artificial intelligence". However, it is simple, streamlined, requires minimal time to execute, and is unpredictable while still forcing players to strategize. It is definitely a good compromise for the lack of real AI strategy.

lewpuls
lewpuls's picture
Offline
Joined: 04/04/2009
If the players are rolling

If the players are rolling the dice for the artificial opponent, then they know the odds, which makes the AO predictable if not entirely controllable. In computer opponents, randomization is often unused, making the opponent highly predictable and ultimately controllable.

Of course, "it depends".

TwentyPercent
Offline
Joined: 12/25/2012
Hey Lewpuls I'm not quite

Hey Lewpuls

I'm not quite sure I understand your message. Can you clarify what you mean?

Perhaps I need to clarify some. Yes, the players in my game would know the odds that a certain monster would use a certain attack against a certain enemy, but there would normally be a number of possibilities. The players' strategy would be a balance of damage and ability output vs survival against monsters. For example, the mage may be able to cast a widely explosive fireball that deals more damage to multiple enemies, but doing so would put him in range of 3 monsters. His frailty would lead him to potentially taking way more damage, as opposed to him staying back and using a protective spell on the warrior or an curse on the nearest monster as a distance much further back.

This is the strategy I am referring to. Yes, the monsters are predictable, to a degree, but there are many possibilities; I more so meant their abilities are not predetermined (via if/then rules or circumstantial scenarios). If you mean the players can "control" the monsters by playing around the probabilities and forcing them to only have one available target, then I guess you are right. That's hardly "controlling" them, though. In fact, that only really controls the target, not the action.

I'm not sure what you are referring to about computer opponents. I'd like to know what basis you have for saying they don't utilize randomization; they definitely do. Not all the time, though, because they don't want the boss of a video game to start with his strongest move, or use his weaker ability five times in a row when he's almost dead. There is a combination of both random and circumstantial AI actions in video games, and my game will be likewise.

Hopefully this clarifies what I was discussing. Maybe you can shed some light on what you meant, otherwise I don't think I'm not sure what you are referring to.

larienna
larienna's picture
Offline
Joined: 07/28/2008
Big thread, I'll try not to

Big thread, I'll try not to repeat what has already been said.

Of course, some game/mechanic can be AIed more easily than other. The RPG example is one of the easiest one. That is exactly what I did for my Wizardry Legacy video game, you build up an action table with various probability and select an entry randomly. Simple and usable in board games, the D&D dungeon crawl did it.

Now there are other games that even if the calculation is simple, there is so many calculation that a human mind cannot do it.

For example, in Reversi the board could be evaluated by counting the number of pieces of a players color afer a certain move and then calculate all the possible move of the opponent after each of those move and select the move with the best scenario (least worst move). If a player can play in 30 different position, you end up with 30x29 board evaluation to do which is simply impossible to do. Add up important position worth more points (like corners) and you simply complexify the calculation.

I also did an AI for playing Starcraft board game as solitaire. It works, but there are still many situation that occured that I did not consider in the rules, so it's hard to anticipate all possibilities and assign an AI action.

Finally, the worst AI I have seen are for 4X video games (Civ and company), even today most of them sucks. Mostly because the game depends on different micro AI that needs to communicate with each other. There could be ways to simplify the game design to avoid the need of AI. For example, instead of moving individual unit on hexes, you could make all unit stay in cities and move from cities to cities. That simplify the path finding AI and avoid bad maneuvers.

I tried using an AI in a 4X board game of mine. The results were pretty limited, and I ended up rather using a system where those AI kingdoms could be manipulated by the players.

I am even thinking about designing some board game like games as a video game and the biggest threat for me is AI.

So yes, Board Game and Video Game AI are different in the amount of calculation in a given time it can do, in an amount of information it can remember (including the possibility to learn while playing). These are 2 important variable that determines what could be possibly implemented in a board game.

Lofwyr
Offline
Joined: 02/16/2010
AI R AO? Yarrrr!

@Lewpuls

So then there are definitely two kinds of computer opponents, not just one and certainly tons of randomization in many of those out there. Let’s define the two most common opponent types in a computer game.

I believe I mentioned this above, perhaps I was unclear.

The play-list is a computer foe that activates abilities based on conditions; these often follow an extremely linear path. Addressing your concerns about predictability here is incredibly simple since, they are absolutely predictable, and, players rarely seem to care. An example of this would be MMO bosses that use a play-list during a battle. Rather than worry about the predictable nature of boss phases players instead develop strategies to defeat these entirely predictable and outwardly mundane battles.

The Randomized play-list is less often seen in MMO and more often seen in standard console RPGs especially those of the 90’s. Examples would include and indeed revolve around Final Fantasy titles. These “AO” are randomly selecting abilities from a play-list but, at certain times or during certain fights, still fall back into the predictable play-list as seen in the first example.

Both of these examples can be extended to reflect more complex opponents than those seen in the “comparatively” simple RPG/MMO siblings. A fun example would be a “Gears of War” or other 3-d shooter opponent. I’m certain it SEEMS like these opponents are doing something complex. If you feel this way, that the opponent is intelligent, then the programmer did his job well in establishing this illusion.

So breaking this down is simpler than it may appear. First, we tell our AI foe to travel along a predefined area called a “path”. We then offer him a play-list of actions (just like an RPG foe) based on some conditions. These intelligent seeming foes are as simple minded as a card and a D-6 and, more often than not, have less intelligence.

Here are my AI commands. This defines literally everything I need my GOW AI foe to do. As always, following the predefined pathing locations makes this insanely easy.
****Move toward foe until damaged. (Runs at you to get closer)
****Seek cover if damaged. (When hit he seeks cover)
****Attack with highest damage weapon unless taking damage. (Pops in and out of cover shooting, this also means that he attacks with a knife/giant axe when close or a rifle while at range.)

With just those three rules we covered literally half the AI foes you have ever seen in video games. There are, of course, more complex versions of these ideas. You could ask the question “What about guys that dive away from grenades? Or a foe that tackles a grenade to save his allies?” Again, these AI are just “running the numbers”. Dive from a grenade? Move to a nearby location that either includes cover, or doesn’t, to avoid grenade damage. The great illusion that makes all this seem so interesting is the AI yelling “Grenada!” These little tricks of immersion make things seem a great deal more interesting than they really are.

Again, the point in all of this is that the AI is no more complex or interesting than a Dice and card system. A little innovation, some interesting mechanics and BOOM, it’s like the damn thing is alive!

Spooner: Human beings have dreams. Even dogs have dreams, but not you, you are just a machine. An imitation of life. Can a robot write a symphony? Can a robot turn a... canvas into a beautiful masterpiece?

Sonny: Can *you*?

"I ROBOT"

E

pelle
pelle's picture
Offline
Joined: 08/11/2008
not so easy

Sorry, a bit late, but can't resist.

What OP (and others) say, to summarize, is actually "some types of very simple game AI, like RPG-enemies or zombies, you can make that in a boardgame by just drawing a card or rolling some dice".

That is not very controversial, or interesting. What is interesting is trying to push the limits of how interesting and fun and surprising you can make boardgame enemy AI without making the game an unplayable mess of lookup-tables. Yes, the player could do any computation that the computer could, but as noted even a very simple program will take ages for a human to process, when a computer can do so in less than a millisecond. Also to make anything interesting the AI is going to have to save some state, and you not only have to save that, but also keep the player as ignorant as possible about what the state means (usually using numbered codes or code-words) (it is not very fun to know all the enemy plans, so they are ideally encoded in some way that makes the player have to try really hard (ie cheat) to figure out what they are).

There are some boardgames that do a very good job at including unpredictable but clever AI opponents (eg Ambush!) but I have not seen one that can do that while also be playable by average (21st century) boardgame players. To retain the amount of intelligence that the opponents in Ambush! have, but still be playable, THAT is a difficult and interesting problem, and no small tricks that works to simulate a WoW boss is of much help. I can think of (and have to some extent implemented) a few shortcuts that try to keep as much as possible of what Ambush! can do, but I can't claim that in doing so I also had to remove some fun parts. There are probably some very playable, elegant solution waiting to be found.

Making zombies decide what character to eat next, or script a semi-random RPG boss is lowest level of AI to figure out. Look beyond that to find the real problems, and then we can discuss (board)game AI and how complex it is (or not, if you still claim that).

lewpuls
lewpuls's picture
Offline
Joined: 04/04/2009
clarification?

@twentypercent: Some video game players want to feel that they succeed only through their skills. They despise randomization. So when they shoot at something, they don't want a randomizer to be added to the resolution, they want everything determined purely depending on where they aim. (Is this realistic? Of course not.) So there are computer opponents that do not randomize.

Take an old example. There is no randomizer in the computer opponent controlling the ghosts in arcade Pac-Man. And someone finally figured out the patterns and played through the whole game, eating all the goodies and killing all the ghosts without losing a life, 255 levels worth. Years later someone wrote an article on Gamasutra reverse engineering and explaining exactly how the programming works. http://www.gamasutra.com/view/feature/3938/the_pacman_dossier.php?print=1

@larienna The reason computer opponents suck for Civ and 4X is that those are games of strategy and grand strategy, and even most humans suck at strategy and grand strategy, so of course the computer does. Computers (and people) are better at tactical stuff. Computer chess-playing programs are fine at tactics but, until recently, demon tactics couldn't defeat human strategy, even though chess is mostly a tactical game. Computer checker-playing programs are now nearly infallible, perhaps in part because there's even less strategy in checkers than in chess.

McTeddy
Offline
Joined: 11/19/2012
@Lewpuls Some people

@Lewpuls
Some people prefer it, myself included. But non-randomizing AI isn't used nearly as often as it was in the old days.

Modern game developer's usually implement a number of randomized factors into their AI to make them feel more a living being. Enemies usually don't "Move Up" because of a set state... but because a random number is less than their aggression level.

Even Valves "Director" in Left4Dead is little more than a fancy RNG. While the developers tell stories about it watching you and studying your moves... its not actually doing that. It is just a hidden threat rating that goes up over time and drops when you take a hit. Every frame a random number is rolled... if it's lower than your threat they spawn a powerful enemy.

Valve's real success was that they make people think it was more than that. Player's don't know what is happening internally, which means appearance is everything.

Developers use a number of tricks to make the AI look more human. Part of this is using randomization to create an unpredictable "Living" opponent.

*My source... I used to write AI for games.

pelle
pelle's picture
Offline
Joined: 08/11/2008
That L4D example was very

That L4D example was very good. That is also something computer games can do easier than a boardgame, to provide some suspension of belief just enough so that you think there is actual intelligence behind it. In a boardgame you will know exactly what is going on, how random it is etc (well, in a paragraph-driven game like Ambush! you can be somewhat confused and not know quite what the AI is planning for you, but the illusion is limited compared to computer games).

I would also add that the optimal strategy even in many completely non-random games involves using random decisions. Simplest example is playing rock-paper-scissors. A non-random AI will be very easy to beat, despite that the game involves no random elements. The same is true for many more complex games as well (or parts of games). Being unpredictable is good. I know that some players dislike randomness in games, but that does not rule out that any AI for their favorite non-random games can need randomness to play well.

McTeddy
Offline
Joined: 11/19/2012
Crazy as this sounds, thats

Crazy as this sounds, thats also one of the biggest weaknesses in computer AI. The hidden calculations and randomizing means that players often argue that the AI is "Cheating". If a manual die roll has 2 critical hits in a row it's bad luck, but if an AI does it the game was clearly cheating.

Something that is becoming increasingly common in games is to actually cheat in the players favor. I've seen everything from:
- Enemies have excellent accuracy while the player is at full health, but can't hit a dying one.
- Enemies can't shoot a player in the back.
- Enemies refuse to use cover while flanking because to a player who didn't see him... the enemy teleported behind him.
- Dungeons of Dredmore fudges dice rolls to ensure that the player doesn't encounter too many bad things in a row.
- The new X-Com fudges dice rolls in the players favor (About +15% I think) on Easy and Normal. Funny note on this... do a bit of research and you'll note that many players think that classic mode where the AI is cheating.
- My own personal computer version of Cards Of Cthulhu features "EZ Dice" where rerolls are less likely to be worse than their original value. Even knowing the code in and out... I felt like the game was BSing me sometimes.

To be fair, I do prefer games with set patterns rather than random. I'm an old-school gamer and I like my levels being a puzzle rather than a twitch-fest.

The only major problem with patterns is that they suck for re-playability*. Speed Runs, Pacifist Runs, etc are part of the video game world. It's an accepted part of video gaming.
Very few players keep playing Arkham Horror to see if they can win faster. They play it for the challenge of overcoming the challenge each time.

Ian

* Each enemy having a pattern is fine as long as the freshness comes from elsewhere. A book of custom puzzle maps, random enemies every game, etc.

pelle
pelle's picture
Offline
Joined: 08/11/2008
McTeddy wrote:Crazy as this

McTeddy wrote:
Crazy as this sounds, thats also one of the biggest weaknesses in computer AI. The hidden calculations and randomizing means that players often argue that the AI is "Cheating".

As long as it does it well, I don't mind. Some boardgames cheat as well, eg how enemies are spawned in Fields of Fire. Unseen enemy units are not tracked, and the "AI" do not have to carefully move them into position, they just randomly spawn in places that makes sense. I don't mind, and would not if a computer game did the same to conserve on CPU and save on development time. Cheating is only a problem when it can be noticed, eg if the enemy clearly reacts to knowledge it could not have, or if it spawns units in places behind your line they can't possibly have infiltrated to.

Quote:
If a manual die roll has 2 critical hits in a row it's bad luck, but if an AI does it the game was clearly cheating.

Yup. I even read an article for game programmers (I think it was in the Game AI Wizdom 2 book) about how to make a random number generator that appears more random to humans, because if you make it as random as possible players will spot patterns and claim it is bad (happens all the time if you look at forums for playing digital boardgames; players roll three 6s in a row and assume the computer random number generator is broken). Hate to think that some games I play might contain such code, but maybe they do.

Quote:
Something that is becoming increasingly common in games is to actually cheat in the players favor. I've seen everything from:

Funny, almost every example you list was in a game AI article in the same book as the randomness article. Enemies deliberately not doing their best to make the player happier. Also something it is better to not know about as a player.

Quote:
To be fair, I do prefer games with set patterns rather than random. I'm an old-school gamer and I like my levels being a puzzle rather than a twitch-fest.

I like randomness, figuring out how to handle the unexpected, and try to prepare for it. Of course if the computer is deliberately less random than it could be that is making the game inferior. Something should not suddenly become more or less probably because some meta-AI in the game decides that the player would like it better that way. I should be able to rely on a 25 % to-hit being 25 %, and lucky hits should be lucky, not tricking me to think I was.

Quote:
Very few players keep playing Arkham Horror to see if they can win faster. They play it for the challenge of overcoming the challenge each time.

There are some solitaire boardgames that you can play to beat your score, but I can never motivate myself to play once I have won a solitaire game (or when I have figured out the "puzzle" and it feels like I am just replaying waiting for better die rolls).

Lofwyr
Offline
Joined: 02/16/2010
Sonny

It certainly wasn’t my intention to create such a far reaching and “rolling” discussion but I am certainly glad I did! What a fun and insightful collection of posts!

All of this wonderful AI talk inspired me to construct a system of my own. Although I have worked with a multitude of game play types in the past I thought creating a singular AI system would be both stimulating and possibly rewarding. Please forgive me for withholding the bulk of the work, my own results differ greatly from what I presented here, honestly, I would prefer to be the first to use it in a product. What I CAN offer are the general design concepts I used to construct it. I feel as though these are the ideas that let me draw my own conclusion (mechanics).

Perhaps the bulk of you will be able to come up with your own set of rules based on the notes I used to generate mine.

I wanted a SINGLE intelligent enemy that would act unpredictably but still show intelligence. My enemy needs to challenge me and present me with a sensible set of actions that reflect the common sense and sometimes stupid choices a human foe would make.

So a complex AI (departing from SIMPLE AI as discussed above) needs to be able to make decisions much like those already shown (simple). The real trick is that each decision must have some WEIGHT when making its next (simple) decision. This collection of simple choices that all have WEIGHT based on each other will generate a seemingly complex strategy.

Breaking it down (Phunky).

Start with a simple decision. A roll of a D-6 to decide how the creature acts based on health.

After this initial action generate a secondary action, modify the roll based on the last action.

An example of this theme working:
Player rolls a D-6 to generate the creatures first action, this action is based on a die roll and the creature’s current health. During the following turn we disqualify some actions using a modifier. Since a D6 has a minimum roll of a 1 we can apply a modifier to ensure that a 1 (or more) cannot be generated. Bob rolls with a +4 modifier. Bobs new range is now 5 to 10 (1+4 =5), (6+4 =10).

By disqualifying certain actions through the use of a modifier we ensure that only SOME actions are available to the AI. This limits the possibility of the AI doing something weird like suddenly running (a possible action) from a fight it’s winning.

My own conclusions to these notes took me down a very different path than what is presented here so please do not feel as though using what I have provided would generate any level of replication. I walked a very different path using similar themes. Please feel free to use these concepts to achieve your own results!

After completing my initial AI design I adapted it to run with my current product. While the system was not specifically designed to work with my current product it DID offer some fairly intelligent seeming results. Thanks, at least in part, to these lengthy and interesting discussions I may take this new AI mechanics to its own game system or perhaps adapt it to fit in with my existing work.

THIS is a wildly constructive thread, thank you to everyone that contributes/contributed!

E

Syndicate content


forum | by Dr. Radut