In several games the AI is designed to give the player an easy time without their knowledge. This can be having a 0% chance to hit the first time you appear, enemy letting you sneak up on them by not turning around, or the lowering of difficulty when the player is hurt or has restarted several times.

I would be offended if at the end of a board game or sport I was told that a human had not tried their hardest.

Does the same ethics exist for an AI?

edit As in the title, my main concern was keeping the handicap hidden from the player, for example, when playing a shooter it is reasonable to expect the player knows the AI has an artificial reaction time and poor aim but my question was about games that hide things such as enemies not using the best weapon or lowering their difficulty when the player is inured.

  • 13
    I feel Ron Gilbert's 1989 Why Adventure Games Suck is an interesting read even if you're working in another genre. Principles such as "the object of these games is to have fun", "the player needs to know that she is achieving", and "as a rule, adventure games should be able to be played from beginning to end without "dying" or saving the game if the player is very careful and very observant" should be very applicable to designing AIs - including ones that "let" the player win. – Tobia Tesan Oct 22 '17 at 5:11
  • 31
    "I would be offended if at the end of a board game or sport I was told that a human had not tried their hardest." But that only is true for opponents of approximately equal strength. AI and humans are so different, it's difficult to compare. Let's take chess. If I would be offended, every time a computer chess algorithm didn't try its hardest, I would lose every single time. – Trilarion Oct 23 '17 at 10:21
  • 16
    You should reconsider which answer is the good one... – Olivier Dulac Oct 23 '17 at 12:34
  • 4
    Most AIs are unrealistically easy to beat. For example, why do enemies in Mario have a preset movement pattern? That makes them much easier to beat! As a player, the key for me is not whether I beat the hardest AI possible; it's whether I was challenged enough and whether I could still win. If the challenge is too small or too great, it's no longer fun. – jpaugh Oct 24 '17 at 17:49
  • 3
    It's not exactly AI, but in the original Minesweeper (and most/all versions after), the mines are not generated until after you click the first square. This makes it literally impossible to click a mine on your very first go. I think this is a perfect demonstration of a good game design philosophy. After that first click, if you click a mine, you lose, game over. But it's simply not fun to lose on the first click before you could do anything. Whether the fun comes from an extreme challenge or another source (ie story), your first priority should always be the enjoyment of the player. – CGriffin Oct 25 '17 at 13:49

20 Answers 20

up vote 41 down vote accepted

What do you want to accomplish with your AI?

If your game is trying to tell a story, then it is reasonable to have the AI adjust so that you get the story you want to tell.

If you want the player to have a sense of accomplishment from overcoming an obstacle or beating an opponent, making the controlling AI throw the game takes away from that — you need the AI to actually be the threat it's presented as.

  • 22
    Though for many board games you pretty much need to gimp the AI, if you didn't insert some artificial errors now and then they'd be literally unbeatable. – Cubic Oct 22 '17 at 16:33
  • 17
    Good chess AI has been beyond grandmaster level for over 20 years. Go bots have been beyond 'normal' professional since 2 years ago, and I believe they have improved since then too, not to speak of comparatively simple games like Reversi, in which human players have been non-competitive for nearly 40 years now. More recently, even action games like Counter Strike or Starcraft II had bots that performed at professional levels. So yeah, it is a problem you should be considering. – Cubic Oct 22 '17 at 17:04
  • 5
    @Cubic: And games like chess and go are the rare exceptions. If you want to release a knockoff of a popular strategy game like Puerto Rico or you're publishing your own brand new TBS, there isn't going to be an off-the-shelf expert level AI to include in your game, and you are unlikely to write one. Heck, even with chess, you're probably not going to beat experts if you write your own AI. – Hurkyl Oct 22 '17 at 17:22
  • 9
    Writing your own AI? That is missing the point. Chess may very be the last game where humans wrote the AI which beat humans. AlphaGo is based on Reinforcement Learning, and there is no reason to assume that RL is unsuitable for other board games. – MSalters Oct 22 '17 at 19:57
  • 3
    @MSalters: It would be great if the latest advances in AI will lead to a world where there are tooks that make it easy for anyone to produce excellent game AI. But that's not the word we're currently living in. Also, IIRC, people said the same thing the last half dozen breakthroughs in AI. – Hurkyl Oct 22 '17 at 21:02

Game AIs are almost always non-competitive, because if the AI would really try its hardest to win, it would often be unbeatable. An AI is not bound to human limitations like reflexes, accuracy, perception, fatigue or computational ability. So when it is seriously playing to win, no human would ever stand a chance.

Let's take the first person shooter genre as an example. Most of this answer should be applicable to most other genres. There are exceptions. AIs have difficulties beating humans at very complex strategy games, for example. Many real time and turn-based 4X strategy games cheat a lot in order to make the AI players challenging. But covering every single game genre would make the scope of this answer too large. So let's focus on the FPS genre.

A perfect playing AI would shoot you with perfect accuracy in the first frame where a single pixel of your character is visible to them. You sometimes encounter this in multiplayer when you play against cheaters. They are called aimbots, and nobody likes playing against them, because it's extremely frustrating.

But such a perfect aiming AI is in fact the easiest one to program:

if (lineIsUnobstructed (this.position, player.position)) {
     rotateTowards (player.position);
     shoot();
}

So perfect play is the default behavior. Human weaknesses like inattentiveness, limited perception, delayed reaction and inaccurate aiming are things you as a game developer need to program intentionally. And you usually take a long time to tweak these aspects until the enemy behavior is both plausible and provides the right amount of challenge to the player. How much challenge is "the right amount of challenge"? Very interesting question, but not within the scope of this question.

Also keep in mind that most single-player games are inherently asymmetrical for narrative reasons. Player and AI opponents usually do not have the same goals, have different tools available and are often not even subject to the same game mechanics. It's not uncommon for the sole player-character to face dozens or hundreds of opponents in a single level. When every opponent would be as good as the player, this would be impossible to do. But most games are selling power fantasies. The player is supposed to be a badass action hero who can single-handedly defeat a small army. That's usually the experience the player expects when they buy a first person shooter. That means in order to give the player a "fair" challenge, you need to make the single enemy relatively weak and stupid.

Now regarding the question "Should I make the game easier when the player is losing?". Maybe, maybe not. Lots of players do indeed feel condescended when they repeatedly fail at a challenge and then suddenly the challenge gets taken away by becoming a lot easier. So you might want to avoid that, at least without asking the player if they want help.

But what many games do very successfully is a technique called rubber banding. Adjust the difficulty of future encounters depending on the player's success in past encounters. Sometimes you can even do that naturally within the fiction of the game.

  • 5
    AI certainly does "try it's hardest to win", but only at the level it was programmed to. A 6 year old playing socker may "try their hardest to win", but won't beat a more advanced player. I can program AI to simulate a squirrel, and it can be brilliantly perfect (as a squirrel), but not be able to beat you at chess. That does not make it failed AI. – Tim Holt Oct 21 '17 at 0:00
  • 1
    You can have an "adaptive difficulty" checkbox in your difficulty-settings setup menu. You could let the player config a range of difficulty so it's not fully adaptive and the player won't always start to lose if they're playing well enough. – Peter Cordes Oct 21 '17 at 1:02
  • 3
    @TimHolt I think there's a distinction being made between programming the best AI -- i.e. an AI that's genuinely trying as hard as computationally feasible to win -- versus a dumbed-down AI, which is still trying just as hard (it's a computer), but not necessarily to win. – Nic Hartley Oct 21 '17 at 1:58
  • 7
    I think the semantic argument about what it means for AI to "try" is meaningless and unproductive. It's clear what the correct interpretation is in context, and the point stands in that interpretation. Reassigning meaning to words the OP already used will just result in arguments over the meaning of a word (in this case, a colloquialism), rather than anything truly insightful. – AlexanderJ93 Oct 21 '17 at 7:50
  • 9
    @AlexanderJ93 I don't. Chapter 2of Norvig's classic textbook explicitly mentions that defining a performance measure for an intelligent agent is non-optional - that is, what the agent needs to maximize. Clearly in games what you're trying to maximize is: fun. – Tobia Tesan Oct 22 '17 at 5:13

A game's AI is a part of a game's overall design. At the end of the day, the AI you create needs to complement the game design.

If your game is designed around creating a challenging, competitive environment, then a "perfect" AI might be a good thing. At the same time, you have to consider something very important:

Humans aren't computers.

Even without cheating, it's not at all difficult in many competitive games to craft an AI that can beat any human without effort. AIs don't have to read player inputs to have faster reaction times than any human. If the player takes an action that has any visual hint, the AI has the right under your "play as best as it can" rule to use even slight visual differences to perfectly react to what is happening.

To make this work, you have to change the nature of the game itself. For human-to-human play, you might have all of the wind-up animations for fast attacks look very different, since human reaction time is being taken into account. But for computers, such a game is trivially easy; they can react instantaneously and perfectly.

So in fighting games, if a perfect computer has a fast move, and you attack with anything that takes more frames than their move, the computer will hit you. What was an intricate guessing game where players have to predict each others' movements turns into the human losing to the computer.

If you want to have a perfect AI, you need to build a game where the AI can play perfectly and still lose. That's not an easy thing, and it wouldn't work in a lot of genres. It could only happen if there are things that the AI has to react to but without enough time to do so. This would be like RTS games where there is hidden information. Truly perfect play would require perfect knowledge, but that is unattainable. Therefore, the computer will have to settle for "perfect, as far as I know, play". And thus, it can be fooled.

But even in such games, the speed of computers gives them an advantage in any situation where there is well-understood information. They can micro perfectly, positioning each unit for maximum effect. And so forth.

Basically, most games made for humans are made for humans, not for computers.

This is not a question of "ethics". It's a question of who the game is made for and what the purpose of the AI opponent is.

  • 4
    If the AI can play perfectly and still lose, then a human who plays perfectly may also lose. That's not ideal either. Rather, you want a game that has sufficient complexity and/or hidden information that determining a perfect strategy is impossible or impractical. This is why humans still beat computers at Chess and Go until recently; the computer can't analyze every possible move fully, and must rely on heuristics, much like the human relies on intuition. – Ray Oct 19 '17 at 17:19
  • 3
    @Ray: "If the AI can play perfectly and still lose, then a human who plays perfectly may also lose. That's not ideal either." "Perfect" here being "within the boundaries of the game in question". I gave RTS's as an example because the genre often uses Fog of War, which prevents you from knowing everything. And without perfect knowledge, you cannot have genuinely perfect play. You can only have "perfect" play within the boundaries of what you know. – Nicol Bolas Oct 19 '17 at 17:22
  • 2
    @Ray That may have been true ten years ago, but it's less so now: we have pre-computed solution tables for all 7 piece and less endgames. Once there are fewer than 8 pieces there is a distinct best move somewhere in those 170TB tables. – TemporalWolf Oct 19 '17 at 21:48
  • 3
    Strategy game AIs are much worse than "perfect as far as i know" though. Yes, they have perfect micro, which turns them into a significant challenge for most players, but they are also very rleiant on their script and don't respond well to unorthodox strategies. E.g. in Warcraft 3, you could defeat the hardest AI with a single worker, becuase the AI cannot handle a tower rush at all. It ignores the worker building the tower until it is too late, then proceeds to waste its units vs those towers, instead of taking the enemy base. – Dulkan Oct 20 '17 at 11:42
  • 6
    Very much this. As an anecdote, my friends and I were playing an RTS (Rise of Nations) against a few computers with no trouble. Then my friend modded it so the population cap went from 200 to 2000, and the same computer slaughtered us, even when it was 3 of us vs one computer. We humans had diminishing returns on controlling more units at a time, while the computer didn't. – Lord Farquaad Oct 20 '17 at 15:37

As a preface, I'm going to correlate ethics with cheating. If you feel cheated, you feel something unethical has happened to you.

In a nutshell, to make your AI's behavior acceptable, make the behavior it mimics believable. People don't feel cheated by believable behavior, they do feel cheated by unbelievable/unrealistic behavior. So be believable, and you won't have the ethics question.

Also, look at what AI stands for when considering your question: it's Artificial IntelliGENCE, not Artificial IntelliGENT. Intelligence is the ability to acquire and apply knowledge and skills. Intelligent is something that has typically has high intelligence. In other words, just because something has intelligence doesn't mean it's smart. A squirrel has intelligence, but it is not (by human standards) intelligent.

Lastly, separate decisions the AI makes from actual game mechanics, and don't let the AI break the rules. That last point is maybe a bit harder to explain, so here is an example...

An Example with Guns and AI

Your AI is not simulating a gun and how it fires, it's simulating a thinking being (or maybe machine) behind that gun.

The gun itself is managed by code that calculates whether a shot hits by taking into account range, weapon accuracy, pattern spread over distance, stance of shooter, whether shooter is moving, skill of shooter, etc. You should never mess with that code as it's simulating mechanical and physical reality. If you do this, you break believability.

But the thing holding the gun? That's managed by AI. It should have no influence on how the gun actually works. Only how the gun is used.

So given the gun's known behavior, ask yourself why the AI might miss on the first shot. Then make your AI behavior reflect what would make that first shot miss. Is it because it's simulating a low-skill opponent who fires from the hip and doesn't aim? Is it because the AI fires the first shot out of panic while moving? Is it because the opponent has a low quality weapon? Is it because the opponent is a long ways away?

If your AI simulates these kinds of "why" things, you've created an AI that behaves believably when it shoots and misses. And nobody will feel cheated by that kind of AI.

A Scenario for Guns and AI Example

Consider a scenario where you sneak up and surprise an AI opponent. They jump up and fire at you wildly while running backwards - and your shot code basically is going to give them a very low chance of hitting on the first shot because of this. And assuming the player knows what makes shots inaccurate, they will find this miss highly believable and acceptable.

But if you want, the AI could say, "OK I need to increase my odds of hitting. What can I do... OK I can stop moving. I can crouch down. I can aim my weapon using sights instead of firing from the hip." And the AI then starts to change how it fires, and the opponent starts getting better. That is intelligence moving towards intelligent.

Of course a very smart version of that opponent won't panic, and will immediately go towards the most effective action. They might quickly drop down on a knee and aim at you with sights, and greatly increase their chance of hitting.

Guns and AI Example Summary/Conclusion

Basically what this says is for AI that involves shooting at something, the "skill level" of the AI centers around how fast can it move towards doing all it can to optimize its accuracy. SUPER dumb AI never figures it out, always shooting from the hip while running and moving. Smarter AI does more and more to optimize accuracy. REALLY smart AI just immediately does everything it can to optimize accuracy.

Yes. An AI should stay at the level that it was set to.

A chess AI will beat all of us every time, and it's up to us to tune it to something we find enjoyable. I would never want the AI to dumb itself down when it sees that it's going to win, or have a pop-up saying "mate in 25, do you want me to be worse at chess?". Just beat me until I get tired of playing at a level that's beyond me.

Let's not think that giving the opponent all queens has anything to do with AI.

  • 10
    @mr23ceec Chess is infinitely less complex than a turn-based strategy game like Civilization.The more variables you introduce, the harder it is for an AI to compete. When you bring, buildings, technologies, unit mixes, map position etc. in, it's just too much to handle for an idea, which can only follow a preprogrammed script. What do oyu have in chess? 64 spaces, 6 different pieces with defined movement patterns. In Civ, there is more going on after 10 turns. I've never heard of that General game you mention, nor does Google find anything about it. Mind sharing a link? – Dulkan Oct 20 '17 at 11:33
  • 1
    Reminds me of Mark Rosewater's Tales from the Pit: i.imgur.com/AvQrRTO.jpg – corsiKa Oct 20 '17 at 15:43
  • 3
    I don't really understand this answer. You seem to be saying that a dynamic difficulty AI is unethical, and that AI difficulty should be fixed. That fixed difficulty doesn't have to be optimal, however, and there should still be different difficulty presets. This just turns into a manual calibration process of finding out how high I should set my ChessBot AI to give me a challenge, but still a chance of winning. Why is automated tuning of difficulty less desirable than manual tuning? It would be more accurate and far less tedious. – Nuclear Wang Oct 20 '17 at 17:26
  • 2
    Very much agree with this answer. Secretly changing AI difficulty is deception, which is unethical. If a player choses difficulty 7 he should always get difficulty 7. Also, this answer is not incompatible with dynamic difficulty. If a player choses dynamic difficulty as per method X he should always get that and only that. What I purchase a product I want to be the one in control of what my purchased goods do. – Jose Antonio Dura Olmos Oct 20 '17 at 18:37
  • 1
    One thing that's probably worth noting is that chess is basically a "symmetric" game; mechanically the chess AI is playing the same role that the human player is. That has some effect on what we should expect from an AI. – Hurkyl Oct 20 '17 at 19:15

I would say no. You see for me games are first and foremost entertainment products. They want to deliver an experience to a specific audience. So it all depends on what experience and to what audience you want to make a experience for. Take a new game for example like Cuphead. This game is made for people who want the game to be hard and unforgiving and so on. That type of player would feel bad if the game dumbed down after they die X times( so far I've died 255). Then again automaticly lowering the difficulty for a more casual audience might help them progress in the game and generally have a better time. So in conclusion: "Know your audience".

  • 7
    Some games I play for a challenge. Some games I play for an immersive story and screw the challenge. Some games I want both. – Wayne Werner Oct 19 '17 at 16:51
  • Even in Cuphead the enemies are not laser-focused on tracking you down and killing you specifically. Instead they attack in predictable patterns you can memorize. – Casey Oct 25 '17 at 19:10

Try to be competitive at a sport with your date, or with your kids. In both cases, you may end up playing that sport alone because you have not made it fun for them.

The term Artificial Intelligence is a bit misleading. By default, the AI is run by the computer which has a complete knowledge of the rules and the state of the game, thus the AI would know exactly what to do and when to do it to beat the player.

This is not fun.

The Intelligence part of the AI has to be turned into dumbness, just enough to give a challenge to the players and keep them playing.

That's a challenge and that's why game designers exist.

  • You can be competitive with children, they don't get a vote in the games you play. – PStag Oct 19 '17 at 14:31
  • 3
    @PStag Agreed, there is a right way of doing it, and a wrong way. I would not try my hardest with my children :) – Alexandre Vaillancourt Oct 19 '17 at 14:36

Ultimately, the role of AI is to help produce a note-worthy, rewarding experience. Dr. Ian Lane Davis talks about this in some of his interviews, that the role of an AI is to lose convincingly. PCAuthority Interview (The mechanics that you mention are examples of the game not being convincing, instead opting for a cheap and easy way to provide victory for the player.)

From the same interview:

Your AI opponents are tools for drama and tension as much as they are intelligent agents.

In movies, books, tv shows, what we want as viewers is for the odds to mount against the protagonist, but only up until a point. Then we want the good guys to win. The closer the enemy came to winning, the greater the payoff.

The goal is always entertainment.

  • 1
    This whole question makes me thing of the original Half-Life. They keep communicating loudly and reveal their "plans" (flanking the player etc), which at the time made the player impressed by the advanced AI, while, in fact, it is quite stupid. :) – JanErikGunnar Oct 20 '17 at 18:04

The goal of your AI should not be to win, it should be to provide an enjoyable game. Part of that enjoyment is in being challenged. My approach to this in Scrabble has been two-fold: Firstly, aim for plays that match the vocabulary level of the human. The level matching will improve over several games but you can also make quite a good estimate on the fly in the early games. In Scrabble you would need a lexicon that is classified by reading age, though as a fallback, using a large corpus to determine word frequency in use is a reasonable approximation. Secondly, use playing constructs that initially mimic the human's - for example a computer would generally make far more parallel plays than an occasional human player (I assume we're not playing world class experts). However as experience against a specific opponent increases, then you start using a few tricks against them that they don't use themselves - but sporadically, with the intention of providing an example for the human to emulate and improve their own play.

The success of your AI will be measured by how often the human comes back for a return match. Your satisfaction with the code should come from how well it manages to play like a human rather than a machine. This is something that can be tested by setting up online competitions where humans do not know if they are playing other humans or machines. (A limited Turing test)

I've always referred to this style of coding as "Artificial Stupidity" rather than AI :)

I don't consider this at all unethical. In contrast, I think that using the full resources of a computer algorithm to beat a human is unethical - just as much so as someone playing Scrabble online using a computer to find the highest-scoring plays.

Another way of 'dumbing down' an algorithm is to place genuine human-level limitations on your AI player's capabilities - again, using Scrabble as an example, instead of providing a fixed vocabulary, you could have your AI player learn its vocabulary from reading internet articles and you could limit its memory capacity so that it would have to make deliberate choices which words were worth remembering. There is absolutely nothing unethical in this and it achieves the goal of making play more human-like - for example, in removing the computer's advantage of perfect knowledge of which words are valid dictionary words and which words should be challenged when played by the human opponent.

There are several reasons why computer opponents need to be dumbed down.

Philipp has mentioned the part of keeping it fun already, but another worth mentioning is balancing for computer opponents‘ unfair advantages.

We are not able to make a true AI that plays like a player. The computer opponents we face today (even when called AI) are not analyzing the rendered game image to find what to shoot, like a human. Neither do they have to move a physical object over a desk surface to indicate they need to turn.

In fact, most computer opponents have the deck stacked in their favor. They know the exact location of every player, how tall they are, where the ideal headshot point is for this enemy type/character model, have a gun they can just tell „shoot at this coordinate“ and it‘s an exact hit, etc. So to make the game fair, you now have to approximate the limitations of a human.

So a big part of this „dumbing down“ is necessary simply to create a fair game for opponents that play by different rules.

If you’re already doing that, it is a small step from there to applying a few more modifications for storytelling effect and to make things more entertaining.

Another aspect is the accelerated timeline on which most games run. There are four-hour games where you are a sniper. It takes much longer to learn how to precisely shoot a gun. It takes longer than that to track an animal through a forest. A good game finds the right balance between making the game trivial to beat and having to attend years of police academy.

So it depends on who and what a game is for, whether these choices are good. For example, many big games really aren‘t a single game. They are more several games merged into one, to appeal to the broadest possible audience and make enough money to recover the huge up-front costs for a professionally acted/mition-captured, voiced, scored and textured game.

So you‘ll have players who want to compete with other players, who only care about the battle mechanics. You have others who only want to experience an interactive story, and find the battles between them a chore, and again others who are mainly looking for a crafting game or a resource management- or trade-simulation.

To find the sweet spot here, you have to provide a challenge for each type of player, but you also have to keep it simple enough that the other player types can either ignore those undesirable (for them) mechanics, or complete the game while doing badly in them.

In single-player games, this is often achieved by allowing to prop up deficits in one mechanic with exceptional skill in another (i.e. craft an awesome armor and the fighting becomes easier), or by having difficulty settings that let you turn on/off the parts that irk you.

In multiplayer, that‘s not really possible, so you match up players with similar rank/gear and adjust difficulty for the whole match.

However, these are all fairly "above the table" tricks. Every player gets the "secret double-damage last bullet" and can take advantage of it. Most peoples' intuitive understanding of how likely a "50% hit chance" really is is wrong, and they will be helped by telling them the percentages "translated" into their "language". What, as you say, about "secret" tricks?

Well, if a game was like chess, and you were told one set of rules, but really those were a lie, that would be cheating.

But none of the games in recent articles I've read on game developers' tricks to make you feel better were actually like that. Most were story-heavy games, or games that are famous for invoking a certain mood or feeling. And in that context, displaying 100% mathematically correct health bars makes the game much less exciting.

It's like a magic trick: Players go in expecting to be served an illusion, so I think it's fair to give it to them. It's also like a magic trick in that some people will still want to believe there is actual magic and will be disappointed when they find out about the trick.

When a human opponent doesn't try their hardest, you're offended because it's condescending. The AI can't be condescending, but you might think that the developer of the AI can. There are two differences here though:

  1. The developer and the player can never be evenly matched, unless it's some NP-hard game that the developer would need deep learning for an AI to match a human, and in that case, the AI is always trying its hardest.
  2. Unless the developer made the game just for you, they're catering to many players (usually certain kinds of players), and therefore can't make assumptions about your individual skill level.

This applies to level design too. You might think it's condescending if the developer babies you with obvious prompts, but that just makes the game boring. Equally, if it's so hard that you need millisecond reflexes, then it can be so frustrating that it's boring.

It reduces to the same problem that is always between humans. If you played a sport called "baby soccer", you don't get offended at the game's inventor, because they're not being condescending to you in particular. Equally "artillery soccer" is just the same in the opposite direction.

There would have to be a human involved, e.g. a multiplayer opponent that lets you win, for the offence to be equivalent IMO.

When creating a game, you want to aim to create an experience, not an AI that is technically/mechanically "fair".

In some games, players are able to take a few more hits than normal when they're very low on health. This mechanic is purposefully implemented to create the experience of narrowly surviving a fight. The game designers want you to have that adrenaline rush, even if you took a hit or two more than you should have. There is absolutely nothing unethical about implementing something similar in your game.

The same concept applies to AI in general. You get to design the rules of your game, but more importantly, you are in full control of the experience. If making AI oblivious to your nearby movement or causing them to miss their first few shots improves the gaming experience, then by all means implement them guilt-free.

If the premise/design of your game revolves around unforgiving AI, you'll want to make sure it's a fun and positive experience for the player. If it's not, you can adjust other mechanics to make it more engaging. Some examples I can think of would be to give the player other advantages over AI, such as more health, speed, damage, or better weaponry. These would offset the skill gap between an unforgiving AI and the player.

You need to step back and ask for purpose

In a competition, the purpose is to find out who is better. That is why not trying your best is the same kind of cheating as performance-enhancing drugs: It spoils the purpose.

The purpose of AI in computer games is to entertain and challenge the player. A perfect AI will make the player feel like he truly accomplished something, so it should feel difficult. This can be done either by tuning the difficulty level so that it is just right - not too easy, not too hard. Or by cheating, by making the AI adaptive, or through some of the many, many tricks we know that players don't notice.

There is no moral question here. The player is no more cheated than he is when he watches a movie with CGI or a stage magician. He expects the game will entertain him, and as long as it delivers, nobody was cheated, even if some of the details are not entirely honest. But neither is the magician, or the movie.

No, it is neither unethical nor necessary

In fact, there are no "ethics" involved here, just fun.

That said, it should not be necessary to make it uncompetitive at all, in the ideal world. Give the AI exactly the same tools that you, as the player have. This means a clear separation in the game code. For example, it should not know anything about its items/actors that you, as a human cannot know.

Then go and code your AI so it can deduce everything it needs to know about the current situation by witnessing it like you as human player would. The AI should make its own internal world representation about what it sees. Obiously, at some point you have to make ammends, i.e. it would be nonsensical for the AI to have to do OCR on some textual representation in a simulated UI. But it should be straightforward to allow it to "see" only those facts about entities in the game that you, as a human, can see through the user interface as well.

Obviously the AI can only give the same commands to its entities as you can, and is, in any other aspect, also bound to the same rules. Ideally you would run it through the same net code that your game client also uses (with the added restriction that you make sure that it does not get to "know" about things that your (human-targetted) client had delivered over the network but not just yet displayed through the UI.

I guarantee you that this will make the AI complicated enough to implement that dumbing it down is your least problem. And if you manage to program it so it can play in a meaningful way, it will probably feel awesome.

That will also give you all the tools to tune the AI to a level that is fun for the player. Give it an artificial reaction time, make it so it forgets stuff, or misremembers information (e.g., a slight obfuscation or random jittering of its "remembered" entitie values). Playing against an AI that makes realistic errors would solve your problem as the AI can be very competitive, and through its errors still be beatable.

I saw such an approach once, in the game Angband (descnedant of Moria, in the Nethack genre), many many years ago. Since that game is single-player, it was not an AI playing against a human, but one that simulated human play. The maintainer back then ("Ben" soandso, if I recall correctly) actually did what I described; he simulated the whole data structures of the actual game in a second dataset for the AI. The AI only "knew" things that it had actually witnessed (including monster attributes and such). Very impressive.

And needless to say, I have never seen such an approach ever again, at least not so that I could recognize it - all "AI" in any computer game whatsoever was always stupenduously stupid and unintelligent, predictable, the rules very obvious, with enforced cheating to give it a chance against players, and worse.

TL;DR: in the ideal world, the question should not occur; in the real world getting a fun AI to work is challenge enough (for the programmer).

In essence, the absolute quality of AI as an opponent really depends on the type of game, the amount of time spent on developing the in-game AI and the CPU power/allotted cycles behind the AI.

On a simple board game, like Chess, home computer powered AI would always win because it can crunch the moves better than a human ever can and the algorithms to do so are very well known.

Respectively, on arcade shooters (most FPS games), an AI can have perfect aim (assuming things like projectile speed >>> player speed) and perfect "vision" in which case you can also end up with a situation where AI will just wipe the player out of the game, assuming the in-game resources are even between AI & the player. On the other hand, for example, plug vision recognition into an FPS AI and you'll soon run into real processing problems and the player suddenly is the favourite (for now!).

On RTS, AI running on a normal PC can be superior or inferior regardless of whether it follows the rules or not. The complexities of the game decide whether balancing the AI requires handicapping or whether it has to "cheat" to provide a decent challenge. Same goes for 'complex board games' (turn based strategy games such as Civilizations, but also Go [for a while on home PC]) and certain other genres, such as flight & racing simulators, where the superiorities of AI – near instant reaction times, superior number crunching, perfect memory and full knowledge of surrounding environment – can be overshadowed by the complexities of the game mechanics.

The fact of the matter is that fair playing Standard-Game-AI running on a home computer with similar to human limitations (e.g. AI sees/hears what you would see/hear) will almost always lose to player beyond simple board games (for now!). On the other hand, make the rules simpler, add extra in-game knowledge (e.g. AI knows the environment, including where you are, all the time), crunching power and AI development time and the human might end up losing the game.

Overall, the question of ethics is in my opinion quite irrelevant and misleading. The point of playing a computer game vs AI is not to win or lose, but to enjoy the experience. And to this end, on terms of balancing, adding AI/player handicaps/bonuses is usually much easier to do than making different level AIs.

from Wiktionary:

to err is human

For me, one of the most desirable (and most difficult to achieve) traits of a proper game-AI is the ability to make errors like we (humans) do.

Because we do err, by default. AIs do not, by default. Imbuing game-AIs with this inherently human "quality" would go a long way towards obviating that feeling of being “cheated” (either way, by winning or losing).

This would also be a trait an apt AI would need to master to be able to pass the Turing test: one would not believe an intelligence to be of human origin if it was unable to show the “ability” to make “human” (or human-like) mistakes.

There are more ways an enemy AI makes it easier for you.

Taunting animation after it scores a hit. This lets the player finish the stun animation and get ready for an attack of her own. It would be very easy to turn off taunting and then stun lock the player.

Repeatedly using attacks that can be countered (or dodged and leaving the enemy open for damage). In crappy cover-based shooters this is the enemy coming out of cover to let you hit them. A competitive ai will not select those kinds of attacks. Granted this can be fixed with plot.

Telegraphing moves (the windup) so the player has a chance to react. This windup animation is a very important part of difficulty scaling especially in reaction based combat.

It's very easy to make an enemy difficult to play against. But it's very hard to make it a challenging yet fun enemy. Part of that is making the enemy do dumb stuff and let the player have a winning move at all.

No, in general it's not - as a game developer, you are crafting an interactive experience, and how your AI should behave is determined by the kind of experience you are trying to create. As a counterexample, consider a situation where you are able to implement an AI that would be unbeatable by any human on the planet. Should you do it? Would it be unethical to "dumb down" the AI so that the game is actually playable? An unethical thing would be to take advantage of your players; but this - this is just the usual gameplay design.
Let me open a can of worms for you: please visit this twitter thread.

P.S. Note, though, that some gamers will not see things this way. They might even get angry. But this stems from their misunderstanding of how game development and AI work. This doesn't make the practice unethical.

I would say it rather depends on the player.

Personally I'm used to bots being significantly stupider or unfairly skillful (sometimes even both). It's hard for me to remember a game where bots were at "fair" difficulty and I don't expect them to be such, because I know how limited they are.

Also many such "tweaks" would be noticed in the end if the game gets popular enough.

I'd say it's still better to inform players about "changes to difficulty" and I know games that do so.

Alternate answer that's more about design, motivated by your question edit.

You stated in your edit...

...my main concern was keeping the handicap hidden from the player, for example, when playing a shooter it is reasonable to expect the player knows the AI has an artificial reaction time and poor aim but my question was about games that hide things such as enemies not using the best weapon or lowering their difficulty when the player is inured.

What the real problem is here

The real question here is about design, not ethics. Bad design is what's making something seem "unethical". You're trying to solve here is balancing player skill against opponent challenge of the game.

A game that purposely has "handicapped" the challenge to balance with the player's skill taking an overly simplistic design approach towards trying to balance player skill and opponent challenge. So it's not per se unethical to do this, it's just bad design.

Say the player runs into a big strong opponent who is too difficult for them. That means either the player has gone way deep into the game to an area that's too much for them (think Casadores if you head north out of Goodsprings in Fallout: NV), or the designer has put the player up against challenging opponents when they know the player is not ready.

How do you solve this from the design perspective? Simple. You don't put the player up against an opponent that's too hard for them. And you design clear differentiation between opponents, and part of that differentiation is the opponent's skill. And you make your game progress such that it's harder (but not impossible) for a player to get in over their head too fast.

This is basically what the idea of Flow is all about in game design.

An example with three ogres

Imagine you have 3 kinds of ogres in your game: a little weak ogre who swings at you with a stick, a middle level ogre with a bigger branch, and a huge ogre who with a big log.

If you are a new player who hasn't gained new health, armor, etc., the little ogre would have to hit you 4-5 times to kill you. But once you are higher level, he can't hardly do a thing to you.

The middle level ogre can kill you as a beginner in 1-2 hits, but if you're higher level, it takes 4-5.

The huge ogre can kill you as a beginner in 1 hit, or 4-5 hits if you're higher level.

All the ogres always determine if they hit the same way. How they determine if they hit never changes. There is no artificially low (or high) reaction time, no artificially low (or high) damage. They just are what they are.

The solution

If the player is low level, put them up against only little ogres. Maybe give them a medium level ogre now and then as a challenge. Or several little ogres together. Never put them up against a huge bunch of little ogres, multiple mediums, or a giant, as they will die.

If they are middle level, put them up against middle level ogres with a few low level ogres just for "fun". Maybe have a swarm of little ones to make it more interesting. Never put them up against a bunch of middle level ogres or a giant ogre, as they will die.

Only high level go up against the giant ogre. Maybe give them some medium level ogres now and then, or a giant ogre with a swarm of little ones, or something else to boost the challenge. Never put them up against a bunch of giant ogres, as they will die.

With this approach, uyou never have to "handicap" anything, because the player will never see things that might need to be weakened.

And if a low level player truly is willing to go so deep into the game where they run into giant ogres, let them die - they deserve it.

  • Thank you for your response, but within your orge example that seems to not address the edit you are referring to, Showing the player a large ogre they cannot overcome and letting them fail is transparent. The player will only defeat the large ogres when they are at the correct level. It would be secret for example if instead of the player levelling up, they just become stronger without the player knowing leaving the player to assume they just became a more skilled player. – PStag Oct 31 '17 at 8:27

protected by Josh Oct 20 '17 at 15:35

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.