
Whenever we design anything, we usually start from the goal and work our way backwards. Our goal for these AI players is absolutely not for them to try to win - that would actually be quite easy, as you say. If we wanted the AI to win, it would always play optimally and, if we wanted, could cheat via inhuman reactions, frame-perfect inputs, utilize CPU-only knowledge, never take a shot that could miss, never make an execution mistake, and so on. However, this is not fun or engaging for players by any stretch. Most players would not want to play against such AI. Our goal is to make AI that players want to play against. That means our goal is for our AI to lose convincingly, much like how parents feign weakness or ignorance while playing with their children.

How do we do that? Well, we can consider the kind of mistakes we expect human players to make and expand on those. Players often overestimate their own resources and overextend. Perhaps the AI spends everything it has immediately and keeps nothing in reserve, leaving itself open after exhausting all of its resources. Players can also play too cautiously, keeping too much in reserve and only spending the absolute minimum. We could make an AI greedy to stockpile resources but only use them when they're near full. Players often tunnel vision on one target and forget to tend other tasks they need to do. We can make an AI do that as well.

These design choices would make the AI players feel more like human players to play against by embracing human foibles as their own driving directives. Similarly, such directives also give the AI weaknesses that a player can observe and exploit to win. If you take a step back, you're looking at the basis for all of game design. We want the players to have a specific experience (e.g. a match that feels like playing another human player rather than an AI), so we figure out what it would take for the player to have that experience, and we construct those bits to convince the player it is happening.
[Join us on Discord] and/or [Support us on Patreon]
Got a burning question you want answered?
- Short questions: Ask a Game Dev on Twitter
- Long questions: Ask a Game Dev on Tumblr
- Frequent Questions: The FAQ