Jump to content
The Dark Mod Forums

F.E.A.R. GOAP planning AI system


Recommended Posts

I wasn't aware of it.

 

One of the early TDM efforts was porting the scripts to C++. I wasn't on the team back then, so I can only assume this was done to speed things up and create a platform that could easily be expanded to provide the types of behaviors needed for a stealth game (as opposed to D3's FPS).

 

If you're bringing this up because you think it would be a good approach for TDM, I'll use the same answer we use when folks suggest porting TDM to a new engine: It won't happen.

 

The dev crew is too small at this point to consider replacing whole sections of code that appear to be working well as is.

 

If a new crew shows up and is interested in delving into the underlying AI design, that would be great.

Link to post
Share on other sites

Fascinating paper though. In all my years gaming, F.E.A.R. had the best AI that I can recall to date and now I know why. Some of it was smoke and mirrors with the AI barks that made you think they were thinking when actually they weren't, and the rest was decision making; which is the interesting part. It would be nice if all games followed this example going forward but as you can clearly see with titles released since F.E.A.R., they haven't.

 

You can tell from the paper and Monolith's implementation that much of the AI burden was shifted to the map designers. The author mentioned that they only had one AI designer and by doing it the way they did it, the AI was manageable by one guy. The thing he doesn't mention is that all of the positional/cover/map area cues had to be taken from the environment which was fine in their case because they had many map designers that could add positional cue brushes to the map for the AI to recognize.

 

Having usually only one mapper to put all this in would shift the balance on to the mapper. Monster-clipping wouldn't be the only thing you'd have to do for the AI. You would have to add different forms of Monster brushes for each area that was designated by cover, jumping through spaces/windows, over furniture/obstacles, etc. Basically after the mapper finished creating a level they would have to go back and create Monster brushes everywhere in the map for the AI to be able to use these spaces effectively and know where he could go and where he couldn't; alternatively all environment models would have to be redone and have a boundary brush added to them that the AI would be aware of.

 

Just taking that in to context, it is an unbelievable amount of work from any perspective. It would be akin to shifting all models and textures over to Monolith's engine instead of using the Id engine. Also a monumental task for a small group of developers; which I'm sure you're aware of.

Edited by Lux
Link to post
Share on other sites

If anything, I'd like to see it ported to the idTech5 engine. :-)

 

Although I'm not sure about the light characteristics to RAGE as they were so crucial to DOOM 3, and how that would effect building a THIEF style mod.

 

The original Dark Engine allowed for WAY larger missions than DOOM3, but the RAGE engine would allow for MONSTROUS size missions that are very similar to the original THIEF.

 

I think that is the only drawback to TDM, is that the size of the missions are nowhere near as large as THIEF missions. (all the nooks and crannies and extra spots that were irrelevant to objective progress but added to the immersion of the life of the area)

 

Or maybe DarkRadiant is capable of making missions in the size of THIEF 2? Maybe I've yet to play one or a mapper hasn't made one that large yet?

 

I'm ignorant to the whole thing, so if anyone can let me know, that would be much appreciated! Thanks in advance.

Edited by Deadlove
Link to post
Share on other sites

I would say yes, in some respects. Other considerations would have to be made for AI pathing though I should think, because of instances like AI jumping through spaces/sliding under things.

Link to post
Share on other sites

well, but for starters one could implement this planer (or try) just for the limited set of animations in doom3 of one of the soldiers, if more complex behaviour is needed (like jumping ,although in q3 bots jumped using an AAS (that's where the reachabilities if the AAS come into play)) then one could handle this as a case study on how to make the actors jump in the current state of the system.

 

I've found this: http://aigamedev.com/open/reviews/fear-ai/

Biel Bestué de Luna - Github

Link to post
Share on other sites

Funny thing how my personal experience differs from the review.

 

I player FEAR back in the day and to me, the AI didn't look much different from AI in other similar games.

 

It was exactly a shooter clone with not much new to offer, expect the spooky stuff.

Clipper

-The mapper's best friend.

Link to post
Share on other sites

thet's because the AI was used only to cotnrol actors and those actors had a pretty limited mindset controlled by a limited set of aniamtions, not becuase the system is incapable of delivering more. but FEAR didn't invented the planner style of AI this comes from an academia research nammed STRIPS that was invented back in the 70's.

 

one thing is the end product the other the idea behind it, the end product might be limited due several factors external to the idea behind it.

Biel Bestué de Luna - Github

Link to post
Share on other sites

the ai in f.e.a.r. were predictable after a while, they used the game space the same way every time you encountered them, like the way the game was predictable to when you were about encounter the ai. there was a ghost section, then a section that contained health packs and ammo, then the section that contained the ai, then a ghost section, then a health pack/ammo section, then a ai section, repeat till the end of game. it was also very linear. the ai didn't patrol they spawned in, had unlimited ammo till you killed them, and would wait at cover points in packs of 3.

 

people would have problems modding the rage engine, you would have to build the map in max 3ds, then import the models into the void of the rage engine space.

Link to post
Share on other sites

I'm talking about GOAP not about F.E.A.R., Fear uses GOAP but GOAP doesn't need to be like the result in Fear,

S.T.A.L.K.E.R. (what's up with names with dots? :laugh: ) also uses a planner like GOAP, Killzone2 used HTN wich is an evolution of the planners like GOAP but it's not GOAP per se.

the AI in stalker wasn't trivial. and this was accomplished no through Finite State Machine (FSM) but through to Planners.

Valve also implemented something pretty similar to a Planner for the "dialogues" amongst the avatars in L4D if I can remember correctly.

It seems that the industry is positioning itself on two possible techs, the Beheviour Trees and Planners.

Edited by 7318

Biel Bestué de Luna - Github

Link to post
Share on other sites

the AI in stalker wasn't trivial.

The ai in stalker was terrible dumb.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to post
Share on other sites

I see this discussion progressing in two ways:

 

1 - There are numerous designs for AI implementation, and it would be fun to talk about how different projects used them.

 

2 - TDM AI could be so much better if only we changed our AI implementation.

 

If the intent of the OP was 1, then that's great and we'll all learn stuff we didn't know before.

 

If the intent of the OP was 2, then ...

 

Rather than approach this discussion from the POV of "look what someone designed that will ease the burden of TDM's AI developers as TDM gets more and more complex", I suggest the discussion turn toward "what are the behaviors we'd like to see TDM AI engage in that they aren't engaging in now?".

 

Once we have a list of desired behaviors, then we can look at what other folks have done to provide those behaviors. At that point, if we find design choices we'd like to bring into TDM, then we form a group of developers who have the time and will to do that. If we find that TDM's AI are plenty smart for what we want them to do, then we only need to tweak things here and there.

 

W/o a shift in focus for this discussion, it will eventually peter out like so many other "why aren't you guys doing this?" discussions have.

  • Like 1
Link to post
Share on other sites

Funny thing how my personal experience differs from the review.

 

I player FEAR back in the day and to me, the AI didn't look much different from AI in other similar games.

 

It was exactly a shooter clone with not much new to offer, expect the spooky stuff.

 

Not to get off of grayman's directive, I just wanted to respond to this.

 

@Sotha, I think it may have to do with playstyles possibly? I had several times when the AI felt like they hunted me down, They'd run behind a pillar to take cover and I'd move over to the left to try and shoot him and I didn't see him so I approached and got up to the pillar and went around it and he wasn't there. He had retreated to a pillar further back a bit and then after I rounded the pillar I thought he was behind, he flanked me cause I had my back to him. I rushed a lot though and pushed hard in to the areas trying to find weakness/exploits etc. When you'd charge them they were reactive and it was interesting. You could still sit back comfortably and shooting-gallery them. Its what they did when you pushed on them.

 

I'm not saying they were like oMG unbelievable or anything but there were definitely a few times when I was surprised. They did have a tendency to hold cover and that causes some interesting shootouts from time to time. Then they'd toss nades in and move and fire. Sure they are AI and they're limited but in my gaming history they were really the best example I can recall.

 

Stalker AI felt a little broken a lot of the time. It could have been a buggy implementation or what-have-you. Sometimes they were interesting but other times they did some really dumb things and I think that part of it probably tarnished the good points and made them seem not as good.

 

Also, Stalker AI didn't have communicative barks that I can recall and that was something in Fear that was really neat and for the time, new.

Edited by Lux
Link to post
Share on other sites

Well most of what i'd like doesn't have much to do with AI per-se but pathfinding. I mentioned spiders on vertical surfaces before, but jumping/climbing guards would be nice too. I find that RIIT (or whatever the acronym is) has increased belivability of actors very much, although it doesn't have much to do with AI. Generally people seem to think AI is about things that it's not, extending it to all actor actions instead of a planning component prioritizing goals for the death of the player

 

AI in a game like thief is there to look cool and not fuck up. Planning is not really needed IMO. What are the guards going to plan about? About how to mow you down more efficiently with swordcuts or interception routes from multiple sides to prevent escape? There are not even open kill-zones in thief-likes since there are no repeating guns. Or grenades to throw around corners. The important parts like scheduling door transversal are already done in C++.

 

What's really needed is a bit more imagination by the mappers. Have guards not immediatly engage in combat, but throw a switch to increase security throught the level, have them carry objectives to a 'saferoom' if you're detected, have a 'hitman level' where a time-limit is a factor going towards a objective, or where the objective itself moves; build a narrative beyond the basics. If some AI support is needed to support these types of levels, then explain what you'd like.

Edited by i30817
Link to post
Share on other sites
AI in a game like thief is there to look cool and not fuck up. Planning is not really needed IMO. What are the guards going to plan about? About how to mow you down more efficiently with swordcuts or interception routes from multiple sides to prevent escape?

 

Actually...yes. If we had unlimited manpower, having AI coordinate searches and attacks would definitely be something I would push for. I'd love to see AI do a little better at anticipating where the player might be hiding. I'd love to see them communicate with each other while searching: "I'm going to check out this room, you wait here and make sure he doesn't circle back". And once there is evidence of an intruder on the premises, I'd like to see them be a bit smarter about how they behave--no more standing with your back to the rest of the room for ten seconds. (I also like the nuThief idea of having guards adding the scene of a disturbance to their regular patrol route.)

 

 

That, and having them react more realistically to changes in the environment (why are the crates moved around? Why is the candle lying in the corner?) would be my two top things.

Link to post
Share on other sites

Planning just help when finite state machines start to be really bloated up, it eases the AI work, and allows to add variability, because action relations are done in realtime instead of "offline" in the FSM, it separates goals from actions and calculates the needs and the situations the actors are in in realtime, then taking it all into account it creates the plans for the moving or the "animation" of the actor. but this is only of you use planning for the actors. planning can be used for the player avatar so it reacts to whatever entities or world are in his focus a la Assasin's Creed. AI isn't restricted only to actors. AI can determine what response to a dialogue an actor needs to choose a la L4D.

 

that you would get more variance using GOAP instead of FSM and that once GOAP is implemented in idtech4 doing AI work would be easier to the developer is sure, FSM is bloated, just look a the states code in the c++ or the simple FSMs in the scripts of vanilla D3. now if it works for you it's ok. that's not a critique for me, but it might come to a point when it gets too bloated even for the developer when then, the developers stop caring about the AI because it's just a way to complex problem, like adding a new state that you need to change the majority of FSMs because it's a capital addition, only then one sees the benefit of planning.

 

in vanilla D3 it gets worse because all really important AI is done in c++ and c++ dictates the capital states to the script, so in the script you don't have the full control of it all, therefore negating the need of the scripts. in vanilla D3 you have the majority of the FSM of the monster in script form (everything but the init() and the killed() states that belong to c++ and are called from the c++) and the animation control that uses a lot of calls to the c++ code... so the script is a mix bag of c++ and madness :laugh:

 

planning is the abstraction of goals and actions, you only program the action once, and reuse this in conjunction to other but only if the planets are aligned right for just such an occasion, this is calculated in realtime.

 

if you want to have a single guard react differently you would need to do an specific FSM for him, or have a generic FSM so he react as generic as generic is that FSM compared to others, while in GOAP you just deactivate some actions from him specifically (this could be interpreted as if his capabilities to do such actions would be negated) therefore you could reuse actions across different actors, even actors that don't belong to the same family, like bipeds and quadrupeds. that's the reason it eases content creation.

Edited by 7318

Biel Bestué de Luna - Github

Link to post
Share on other sites

That's food for thought indeed. From what I got the main idea is to transpose pathfinding mechanism to decision making by defining world state nodes (var arrays), actions path with costs, and then algorithms like Dijkstra's (only one I know!) to find the best option.

 

Actually...yes. If we had unlimited manpower, having AI coordinate searches and attacks would definitely be something I would push for. I'd love to see AI do a little better at anticipating where the player might be hiding. I'd love to see them communicate with each other while searching: "I'm going to check out this room, you wait here and make sure he doesn't circle back". And once there is evidence of an intruder on the premises, I'd like to see them be a bit smarter about how they behave--no more standing with your back to the rest of the room for ten seconds. (I also like the nuThief idea of having guards adding the scene of a disturbance to their regular patrol route.)

 

Yeah, would be cool. Looks like this GOAP stuff makes that easier to achieve, but still must be damn hard to implement.

 

That, and having them react more realistically to changes in the environment (why are the crates moved around? Why is the candle lying in the corner?) would be my two top things.

 

Also have them notice the player lantern light (or moveable lights he carries), cf 4th link below.

 

Though, IMO those issues are related to sensitity of the AI, not to decision-making. So I can't see how GOAP would help with that anyway. I guess the main problem is that you cannot store the entire world in an array (all the more since you'd need at least one array world array per AI or one "mask array" per AI, to represent what they individually have sensed so far in the world array) and then perform regular checks for all the AI.

 

That being said, I don't know shit about AI programming really, so I don't know why I'm even writing this ^^'. Besides, let us remind that the current AI is already really much more evolved than in most games:

- large, moving FOV

- can relight lights

- can spot blood

- can spot ropes

- can notice suspicious items moves

- plenty of other features

So once again congrats to the dev team.

 

If you're bringing this up because you think it would be a good approach for TDM, I'll use the same answer we use when folks suggest porting TDM to a new engine: It won't happen.

 

The dev crew is too small at this point to consider replacing whole sections of code that appear to be working well as is.

 

If a new crew shows up and is interested in delving into the underlying AI design, that would be great.

 

From what I got from those combined sources:

 

http://wiki.thedarkm...le=AI_Framework (how the AI works)

http://forums.thedar...l-intelligence/ (some ideas, after new member's arrival)

http://forums.thedar...ts-next-for-ai/ (some discussions, ideas)

http://forums.thedar...cussion-thread/ (idem, recent topic)

 

AI coding must be extremely complicated, since even Tels seemed to find it hard in 2nd topic.

OTOH there are some 20,000 members IIRC so must be some skilled guys there

And maybe some people who don't fully understand AI can still write specific C++ modules, and then leave integration for AI experts

How many people are still working on it now?

Edited by Bastoc

Jared, is that you ?

Must be rats...

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...