The player is the only one in a video game world with any true agency, as NPCs can only react to a player’s actions. These NPC reactions are decided by behavior trees, which are essentially flow graphs deciding what the NPC should do next. The perceived intelligence of an NPC is measured in how complex and varied these behavior trees are.

RELATED: EA COO Says Problematic Gaming Executives ‘Must Go’

The problem for developers is, for every possible player action a new branch needs to be added to the behavior tree for an NPC to seem truly realistic and reactionary. Not only that, but as more reactions are added, more computing power is used by every NPC. Cyberpunk 2077 recently had to overhaul its NPCs to react more to player actions. But with a new patent filed by EA, NPCs could soon see a step forward in their intelligence.

The patent for is for “Readable and Editable” NPC Behavior. Essentially it describes a way of editing these NPC behavior trees on the fly, rather than having to increase the complexity of them to encompass all possible NPC actions. It also describes reading specific player data such as location and heath and using “reinforcement learning” to adapt that NPC’s behavior goal. But how close this system is to being used in future EA games remains unclear.

From the description this system could have many applications for NPC interactions, especially the reinforcement learning. NPCs could be able to not only recognize player actions in the moment, but remember actions players had done previously, outside scripted storyline choices. Or they could remember the last place they saw the player, or how much health they had, this would make for a very immersive game world. The patent also states that the generated behavior trees will be drawn up from this reinforced learning data. This means two different players interactions with every NPC in a game could be different based not only on their in-game choices, but play style.

EA’s proposed NPC AI learning system would be most interesting to see in the next Mass Effect game, a series already full of diverging dialogue trees and different reactions based on player actions. Fleshing these NPC’s out and blurring the line between the good and bad reactions would be a step forward for the sequel. Outside of EA’s repertoire, a game like Hitman could benefit from a learning enemy AI like this, where switching disguises won’t work on guards that have already seen the player.

MORE: It’s the Perfect Time For a New Jedi Academy Game