15 ms·
The Low-Tech AI of Elden Ring
- drunken_thor 4mo agoThis is behaviour trees. What you’re describing is behaviour trees. Edit: I see later you say it isn’t a behaviour tree but this is how a lot of BTs are implemented. They don’t always loop from the root. A lot of the time according to state the root is redefined off of a branch and that sub tree is looped until going further down the tree or even into a different tree. Much like the stack you are describing.
- AndrewDucker 4mo agoThe article has been updated in response to this post. (See the end)
- andrewflnr 4mo agoThere's definitely a strong shared flavor between this and behavior trees. Almost like a goal stack in this system is a continuation or call-stack of a behavior-tree traversal-in-progress.
- tokai 4mo agoLow tech AI? Its sounds like standard game AI. I would really like to hear what the author would deem high tech game AI.
- evanjrowley 4mo agoI know very little about AI and game mechanics, but knowing how early Fromsoft games were (e.g., Kingsfield), a basic AI in Elden Ring is very unsurprising. That's not necessarily a bad thing! My vote for "high tech game AI" would probably be this old mod for Fallout 4: >PANPC (Pack Attack NPC Edition) is a unique scripted AI management system for Fallout 4. Rather than treating each enemy as an individual proximity-based reaction agent (basically, a mine with a gun), this system generates social feedback between NPCs belonging to the same or allied factions. >Enemies factor the overhaul health and success of their “team” into their tactical decisions, adjusting their strategies based on their social and threat awareness. As a result, they will switch between ranged, melee, defensive, and offensive tactics based on their perceptions of team advantage and individual risk. https://fallout.wiki/wiki/Mod:PANPC_(Pack_Attack:_NPC_Edition) https://fallout.wiki/wiki/Mod:PANPC_(Pack_Attack:_NPC_Editio...
- pnt12 4mo agoFromSoftware really puts design first, so it doesn't surprise me they use a classic AI and then leave it up to the designers to craft memorable experiences.
- eska 4mo agoThat is still simple AI and commonly used. 1. Make individual agent AIs that can act on their own. 2. Make squad AIs that can influence their agent AIs. 3. Add even more AIs on top, like a scenario AI. Each of these AIs can be a state machine, behavior tree, rule system or goal system. They’re exactly equivalent and can be translated into each other mechanically. So the whole hierarchical AI is equivalent to one big state machine.
- flohofwoe 3mo agoSuch a hierarchcal AI is how most RTS games work, and also the famous Falcon 4 campaign system which could simulate a realistic modern war scenario on the Korean peninsula in realtime down to individual units (although collapsed into higher level 'group AIs' when far away from the player) and all that on a 1998 PC!
- viccis 4mo agoMy favorite high tech AI was Crysis. Might have been an update after it was originally released. The enemies will aggressively attack but then get quiet after you've taken cover. Eventually you'll realize some of them are flanking you while others keep suppressing fire on you to stop you from moving. You can hear them yelling to one another. Very cool touches.
- tmtvl 4mo agoThat reminds me of First Encounter Assault Recon, where the AI had fairly simple rules, which worked well with the level design to make the enemies seem intelligent, especially as Monolith added chatter to make them seem even smarter. And then one of the expansions had a bunch of open areas and the AI didn't handle those well so the trick didn't work.
- lelanthran 3mo agoFar Cry 2 had a similarly sophisticated system, if not more sophisticated. Not only would they call out to each other, they would attempt to carry off wounded allies and call out to each other in native language (set in africa, so I understood it). They also adjusted their techniques based on the reputation level of the player.
- gchamonlive 4mo agoF.E.A.R. 2 has the best AI that I can think of. Wonder if it counts as high tech or they just squeezed a lot of juice out of basic techniques
- collinmcnulty 4mo agoYou’re in luck, they made a great paper on this! https://www.gamedevs.org/uploads/three-states-plan-ai-of-fear.pdf https://www.gamedevs.org/uploads/three-states-plan-ai-of-fea...
- stuxnet79 4mo agoF.E.A.R 2 was released on the PS3 and Xbox 360, both of which have laughably low specs by modern standards. When you have to create dynamic experiences out of a potato you are forced to get creative and that involves squeezing a lot of juice out of basic techniques. Transformer based AI had to wait until the world's compute capacity reached a certain level to become feasible.
- bigfishrunning 4mo ago> Transformer based AI had to wait until the world's compute capacity reached a certain level to become feasible. It's OK, they'll just keep subsidizing it until it's eventually feasable...
- trashb 3mo agoboth of which have laughably low specs by modern standards ... potato I have the opposite view, modern games require laughably high specs for what experiences they are achieving, look at what great dynamic experiences (games) can be achieved on older generations of gaming hardware. Transformer based AI does not magically equal great dynamic experiences, good game design does. Sometimes a basic technique is more effective then a complex one. Dynamic experience wise what is really the upgrade between ps3 call of duty and current day, aside from graphic fidelity that has increased there is parkour now. But mirror's edge shows that was possible at the time too. Seems it's just consuming a LOT more resources for not a lot of benefit. If you run a ps3 emulator with a modded game with high res textures & shaders you're still using 1/4 of the resources the modern re-release does. squeezing a lot of juice out of basic techniques "limitations breed creativity" I think this is one of the reasons why games on limited hardware are often better games, it requires the game designer to choose between prioritizing the game's core or other distractions like graphics.
- StilesCrisis 4mo agohttps://www.gameaipro.com/GameAIPro2/GameAIPro2_Chapter34_Human_Enemy_AI_in_The_Last_of_Us.pdf https://www.gameaipro.com/GameAIPro2/GameAIPro2_Chapter34_Hu...
- cgh 4mo agoPerhaps this explains why Fromsoft npc quests are easily the most inscrutable in all of gaming. Like, okay Hyetta, have another “grape”, aka eyeball, oh now you’ve moved to the bridge in Liurnia, cool. I’ve exhausted your dialogue but you’re stuck. Oh I have to reload the area and exhaust it again to advance your quest. Okay, cool. Now you’re in a random church and you want a “fingerprint grape”. What? It’s all part of the Fromsoft experience but man, who writes these things?
- tancop 4mo agothats game design not something engine related. its been like this since before demons souls, i think it started out way back with the first kings field. its just the way fromsoft do things. everyone knows what to expect from them.
- mostlysimilar 4mo agoJust to underline your point, Sekiro's NPCs behave in a much more obvious and linear way relative to From's other games, so it's clearly a game design decision and not a technical one.
- SerpentJoe 4mo agoI would agree, but there are still some interactions that require doing the same thing repeatedly in order to make progress (eating rice balls, eavesdropping).
- bigyabai 4mo agoEspecially in Elden Ring, it also contributes to the ludonarrative cohesion. Hyetta's quest (no spoilers!) isn't meant to be completed by everyone, her story is a foil to Melina's "default" questline that is mandatory for beating the game. Other characters (eg. Boc, Sellen, Selivus, Thops) also have quests that are easy to start but deliberately obfuscated towards the end. The JRPG logic is annoying, but From uses it to beg important questions about the game world and the player. Fromsoft characters like Lautrec live in infamy for being so slippery and deliberately misleading.
- raincole 4mo agoAs a game dev, the fact "AI" as a keyword became totally unusable is quite annoying.
- Terr_ 4mo agoI try to say "LLM" as much as possible, but I'm aware that it's unlikely to work. Partly for technical accuracy, partly to manage the average person's expectations when they hear "AI", partly to avoid contributing to a big dumb-money "everything is AI" bubble, etc.
- jiggawatts 4mo agoI call it "mechanised coding".
- Rendello 4mo agoOr "gen(erative) AI". I must admit that as soon as I saw AI in the title, I lost interest until I realized it was classic AI. The term seems so far gone now but we don't have a good classifier for the non-gen-ai yet.
- _0ffh 3mo agoYou can try "language model", that's what I use when talking (when writing I use LLM when I expect the abbreviation to be understood). I find just juxtaposing these two normal words flows much more nicely from the tongue than the comparatively awkward "LLM".
- amelius 3mo agoWe probably should call LLMs "Alchemy" at least until the big AI companies remove the disclaimer that "AI can make mistakes".
- Rendello 4mo agoThe same thing happened with crypto (cryptography) after Bitcoin blew up, though it was just an abbreviation so it wasn't as bad. There's no ambiguity when speaking, but when searching Rust-related things I get a lot of Rust game stuff. "Rust crates" or "Rust drops" correspond to in-game things so the fandom wiki will pop up. Occasionally I'll even get rust-removal webpages.
- rambojohnson 4mo agoWhat do you mean by "low-tech AI"? This isn't AI...It's a behavior tree. Calling every decision-making system "AI" is like calling a flowchart a neural network. What you're describing is a behavior tree: predefined logic, predefined responses, no learning, no inference, no model. Stop calling everything AI, guys.
- badsectoracula 4mo agoThis is game AI, games called this sort of thing "AI" for a long time. Behavior trees is (among others) one of the most common things someone with the role of game AI programmer will implement. This has been the case since at least the 90s, it is not a new thing.
- raincole 4mo agoFYI, one of the most well-known books about writing game entity behavior is literally called "Programming Game AI by Example." (published in 2004) https://www.amazon.com/Programming-Example-Wordware-Developers-Library/dp/1556220782 https://www.amazon.com/Programming-Example-Wordware-Develope...
- tayo42 4mo agoIs a book like that still pretty useful? Or is Ai in games abstracted away in game engines pretty much? I've been meaning to play with unreals Ai features a bit.
- HawtAds 4mo ago> What you're describing is a behavior tree: predefined logic, predefined responses, no learning, no inference, no model. Stop calling everything AI, guys. Depends on how pedantic you want to get, one could argue that regular expressions are AI too. https://www.rand.org/content/dam/rand/pubs/research_memoranda/2008/RM704.pdf https://www.rand.org/content/dam/rand/pubs/research_memorand... Regexes were invented for much higher order tasks (modeling neural networks) than just making find-and-replace easier.
- 4mo ago
- badsectoracula 4mo agoThe article keeps on mentioning about the performance issues of the decision tree that somehow this approach avoids, but it doesn't seem to actually put any real detais about the why here. Especially considering that: 1. Many scripting languages you'd find in games are implemented by evaluating the syntax tree directly (IIRC WitcherScript in Witcher 2 and 3 is implemented like that) 2. A behavior tree can be "compiled" down to a bytecode VM similar to what some scripting languages use Though if any of these two approaches makes any difference in performance i'm not sure and i'd expect it'd depend heavily on how exactly they're implemented (my kneejerk reaction would be to expect the VM approach to be faster because parsing a bytecode sequence might be more cache friendly than jumping through pointers, but i also suspect that since game AI scripts/behaviors wont do any real computation themselves and instead 99% of the code would be engine/native calls, any potential benefit would be diminished -- but as i haven't tried to implement the same stuff with a realistic setup using both approaches to compare, i cannot say one or the other for certain).
- BigTTYGothGF 4mo agoHow big are these trees that performance starts to matter?
- badsectoracula 3mo agoUsually one would start with "is there a measurable performance bottleneck here?" :-P. TBH i haven't played Elden Ring but from what i've seen there are so few "active" NPCs around that i highly doubt there'd be any performance issue coming from this.
- Cthulhu_ 3mo agoYeah I doubt it, in terms of scale you get at most dozens of enemies, and I can't imagine their behaviour is at all expensive compared to everything else. Every "mode" (idle, attack 1/2/3, etc) is relatively slow as well.
- dotstdy 3mo ago
- 8note 4mo agothis gets very clear when you look at the wiki on how different bosses move and how the different boss combos lead from one into another and of course, lets you have a reasonable amount of control over different bosses
- nitwit005 4mo agoThe high level might look simple, but something like "attack" has to involve checking if it's possible/reasonable in a 3D space, animating turning and walking prior to the attack, playing the animations, dealing with player block or parry, etc. Any good library author is going to try to bury the complexity so that users don't need to deal with it, but there can be a monstrous beast under the hood.
- havblue 3mo agoNot really an ai response but I remember the path following and aggro is really smart in Elden Ring and earlier Dark Souls. That is you try to run away after pulling aggro and when you think you're safe you'll run into some other strong enemies, after which, oops, the original enemy followed you down a ladder and stabbed you in the back. Of course they have a bunch of occasions where enemies are in places you don't expect them as well. It isn't really about the mob ai as much as level design and the balance of difficult-to-kill enemies at inconvenient times.
- hexasquid 3mo agoAnd for Dark Souls AI: https://www.youtube.com/watch?v=PrHKzKQdZxY&t=1366s https://www.youtube.com/watch?v=PrHKzKQdZxY&t=1366s
- dotstdy 3mo agoThe video is actually describing the exact same thing as the blog post. The approach of FROMSOFT to NPC AI hasn't really changed much at all between Dark Souls and Elden Ring. (One of the most impressive things about their studio imo is the way they don't change much between titles, and yet all the games have a quite unique feel) What the video refers to as a "Combat Wheel" is, in my opinion, much more easily explained as a weighted random selection. It really just takes a list of functions and randomly chooses one to call with dynamic weights. (But I appreciate that I differ significantly from AI academia on this point, because I also think the term "utility ai" is a really silly term for... dynamically weighting options before selection) Likewise the start of that video talks a lot about the "Goals", in reference to complex planners like GOAP (which is the approach famously used in FEAR) and HTNs, but there is no planner here. It's just a basic pushdown automata. Anyway, the reason I wrote this post in the first place is mostly because I watched that video and it felt a bit off, and investigated the code myself.
- WhereIsTheTruth 3mo agoLow Tech is a simplification, it's a massive over engineered spaghetti system They have accumulated bloat and tech debt since their inception as a studio https://github.com/ividyon/EldenRingHKS/blob/main/c9997.hks https://github.com/ividyon/EldenRingHKS/blob/main/c9997.hks But it works for them, and that's what creates their flavored games, i hope they'll never change a bit