4 ms·
Maybe, but most games use simpler tools like behaviour trees or utility systems not just over machine learning based AI, but also over fancier game AI technique
by dkersten 4y ago
Maybe, but most games use simpler tools like behaviour trees or utility systems not just over machine learning based AI, but also over fancier game AI techniques like GOAP, MCTS or even HTN’s simply because:
1) they are easier for the designer to understand and easy to understand why an NPC made the decision it did
2) they are easier for the designer to tweak and update to get the behaviour they want
3) they’re computationally expensive. Most games only give a few milliseconds at most per frame to AI. The model would have to run very quickly. GOAP and MCTS are known to work well but the search space can explode too large, eg the total war games use MCTS and can only look a few turns into the future because the search space is too large.
The problem with machine learning based game AI is that it is difficult to understand why the NPC is doing what it’s doing and if you need to tweak or update it, you have to retrain the model which could be costly or time consuming. It may also be difficult to train in the first place because you need to create example data that has the desired behaviour.
A big part of game AI is designers authoring an experience that they wish to convey on the player and machine learning takes a lot of control away and puts it in an opaque black box.
GOAP = goal oriented action planning, a graph-search based planner
MCTS = Monte Carlo Tree Search, a heuristic search based decision making algorithm. Some of the Total War games use it.
HTN = hierarchical task network, a hierarchical planning system that solves some of the issues GOAP has: it can prune the search space more aggressively and it gives designers more control over the resulting behaviours. It’s lesser known and has less talks/articles/sample code compared to GOAP
- kossTKR 4y agoInteresting. It's honestly quite disappointing that progress has been so slow in this space, but in this time dependent context it makes sense. I remember AI NPC behaviour being a discussed and promoted all the way back to the late 90's, but it's like there's been a standstill and characters still run around i zig zaggy pathway patterns, switch between pre-made states and get stuck and never really surprise you with anything really "outside the box". So much that it's not even really a topic anymore as far as i am concerned? Maybe because of multiplayer.
- actionfromafar 4y agoWhich is sad, because even multiplayer would be very interesting with Alien style NPCs who were actually clever and cooperated and had memories stretching over the timespan of the games existance. (Years.)
- delusional 4y agoI think there's more to it than time constraints. Of course the efficiency of the method is a big concern, but we also have to remember that games are primarily experiences. In a lot of the games I play, stuff like stealth games, rougue-lites, and DotA, the simple and predictable behavior the current models is required for the game to work. The models HAVE to be stupid to make the game work.
- dkersten 4y agoAnother thing worth noting is that "smart" game AI is as much about presentation as it is about actual intelligence. That is, if your NPC's are super smart, but doesn't communicate their smart decisions to the player, they will often still be perceived as dumb. That's why "barks" are such a big thing in games: NPC's tell each other what they saw or what they're doing to communicate to the player that they made a potentially smart decision. This communication may not be so simple with a machine learning based AI where the intent of the NPC isn't known. Similarly, often super intelligent AI doesn't look very intelligent, doesn't feel very intelligent or is just not very fun to play against. It also depends on the type of game. If the player spends a lot of time observing NPC's (eg in a stealth game), then intelligent AI is more important than if the expected lifetime of the NPC before the player slaughters them is only a few seconds (eg in a shooter). I don't think its necessarily time constraints. Its also understanding the AI: why did the NPC make the decision it did? Exlpainable machine learning is still very much a research topic. Its about giving the designer the ability to control and author the interactions that the player will get. Its about controlling what situations are actually desired (there was a story about the AI in The Elder Scrolls: Oblivion's "Radient AI" system where they had to tone the NPC's autonomy down because they found that NPC's would tend to do unfun things like murder everyone in town). In terms of training machine learning models, for many games you may simply have no way of gathering sufficient quantities of data to train it to do the behaviours you want for the scenarios where you want them. Time may not necessarily solve these, or at least you'd need a decade to do everything. Personally, I like sandbox RPG's, so I personally want to see better NPC AI and deeper NPC simulations. I want to see NPC's go about their lives independently of the players interactions and have their own agency in the world. So I'm very much interested in seeing better decision making, planning and simulation of characters in games. But machine learning based techniques aren't necessarily the answer, if you want the game to still be a game and be fun for the player. In fact, in my own opinion, if NPC's have true autonomy and agency, then you likely also need a storyteller/director system that manages the NPC's so that they 1) don't go too far off script, 2) don't go too crazy in undesirable ways (like the Oblivion murder spree), and 3) that their interesting interactions tend to occur when the player might actually notice them (otherwise you may simply "miss" all the intelligent behaviour because it always happens when you're not around or in places you don't visit in time to notice the consequences)