On AI and Appropriate Challenge

AI is a pretty broad concept. It seems silly to suggest that making any grand statements on what AI is or should be will be easy or simple. And yet, based on the AI systems I have seen and worked on, I often feel that it is. The range of approaches to architecting an AI are wide and varied, but the fundamental objective of game AI is not. Understanding why an AI is being made, and what it’s ultimate purpose as part of a game is, can and should be clear.

In my view, the ultimate objective of any AI in any game is: to provide appropriate challenge.

The AI is there to serve as an opponent for the player to endeavor to defeat. At first this probably seems blindingly obvious, but it’s not as straightforward as it appears. It’s easy to define “good AI” as one that is an expert — a fiendishly-clever master of the game that will demand the highest skill and commitment from a player. But is that really the case? Many games are, frankly, not that difficult to defeat. Does that mean they don’t have very good AI? Actually the opposite, most likely.

A well-designed AI has been authored to provide an appropriate level of challenge to the player — whatever that may be — no more or less. The AI must be carefully composed to play competently and well until the proper point, and then elegantly and believably falter so that the player can overcome it. It is just as critical that an AI be fallible, predictable, and vanquishable than that it be masterful, resilient, and adept. Designing an AI that has this mixture of excellence and deficiency is, as you might expect, somewhat more delicate that simply designing one that is always superb or always terrible at the game. Authoring this is the source of much of the challenge — and the reward — of designing AI.

To appreciate the perspective that arises when AI is viewed in this way, consider the case of an AI designed for new or inexperienced players. Right away we must make the distinction between poor AI and weak AI. Poor AI is not simply bad at the game, it is incompetent: incapable of skilled play except by accident. Weak AI is competent, but plays in such a way that it exposes exploitable weaknesses — predictable patterns, poor judgement, myopic goal prioritization, and others — that enable a player to analyze and unravel its strategy. While both may adequately result in a game that appears similarly “easy” to a player, the difference between the two could not be more different.

Apply this example to a game of chess. One application of poor AI to this game could be for the computer to make random moves; every turn it moves a piece with no consideration for its strategic value or imminent threat. This technically legal but obviously flawed style of play stands no chance of defeating a human player, even a new one. However, what is the experience that player has facing an opponent like this? The randomness of the computer’s play leaves the player no room to counter-strategize. They cannot “outfox” the computer, because the computer is displaying no discernible pattern. They have no opportunity to express any mastery of the game, and thus little or no satisfaction in victory. Furthermore, the player learns nothing useful about the game and cannot materially improve even if they face this AI a hundred times. The game is a hollow shell, the victory a meaningless one. This is what poor AI invites.

weak AI, by contrast, does play competently, and could very well defeat a human player of minimal skill. Though it may be shallow, it does do strategic analysis before moving and attempts to execute formed attacks and concerted efforts to win. Against this AI, a player has to think. They have to observe the AI’s patterns, identify the flaws, and work to exploit them. Though the ultimate difficulty level may still be low, skillful play is still necessary for the player to triumph. This AI rewards all those qualities that make a chess player strong, and the game of chess fun.

When contemplating an AI for any game, it is incumbent on the AI designer to ensure that their AI is never poor. Shortcuts exist and can have value, and deep sophistication is not necessary in every situation, but that does not excuse the AI author from attention to this responsibility. Their duty is provide an opponent that operates the game well, that expresses what makes it fun, and invites the player to master it in such a way that reinforces their skill and their enjoyment of the experience.


Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>