irrAI 0.50 - AI module for Irrlicht [Updated 28/11/09]
That kind of appears to be beyond the scope of what IrrAI intends to provide. And also that is so application dependent since it usually depends on physics as well.
One thing you should note though, is that bots almost always follow the path no matter what. The only times the bots deviate from a path is when they encounter a fight, and even then they only move a little bit away from the node, and around it, just to appear as if they are trying to dodge bullets. At best they will go to a node that is marked as cover.
What I would recommend is that you simply include data along with the nodes, and only deviate when there is a necessity to. Otherwise the bots should not seek out activity, but instead look for easy shoot points, and look for other people. If they don't find any people within an alloted time, then they should seek out activity, or another easy shoot point.
That's really the jist of how the AI works in UT3.
One thing you should note though, is that bots almost always follow the path no matter what. The only times the bots deviate from a path is when they encounter a fight, and even then they only move a little bit away from the node, and around it, just to appear as if they are trying to dodge bullets. At best they will go to a node that is marked as cover.
What I would recommend is that you simply include data along with the nodes, and only deviate when there is a necessity to. Otherwise the bots should not seek out activity, but instead look for easy shoot points, and look for other people. If they don't find any people within an alloted time, then they should seek out activity, or another easy shoot point.
That's really the jist of how the AI works in UT3.
TheQuestion = 2B || !2B
Oh let's not talk about the AI in UT3.... Worst AI i've ever seen!!
On many, many occasions i've found that half my team is sitting in a tank which is being driven into a wall and they NEVER get out of the tank unless you run past with the flag (on a CTF map this is of course), in which case they jump out to provide cover for you. Now possibly you might be able to send out an order to get them out of the tank, but i'm not sure about that. I'm just so surprised that they didn't find this in testing or think of it in the first place and add a check to see if they're just grinding against a wall for ages...
Anyway, NavMeshes is something that Christian queried with me as he was talking to an AI programmer from Ubisoft (working on the new Prince of Persia game) and they use NavMeshes (as do a lot of people apparently) as they're allegedly more efficient than a waypoint system. I say allegedly because i've not researched enough to know, but i guess i shouldn't question industry professionals! Apparently they're also basically using neural networks for their AI which surprises me as they're so hit and miss and take so long to train... But again, they're industry professionals and must be getting some success out of them!
So basically what i'm thinking is sticking to waypoints for now but keeping NavMeshes in mind for the future. I do agree that the behaviour of my NPCs is so artificial on the waypoints.... moving at right angles and what not, but i guess that's because i have so few waypoints. I'm beginning work on a new example which will have much more waypoints in it and hopefully might produce some nicer behaviour.
As for deviating from waypoints, this is something i want to do but i wasn't too sure how to do it best... But i've had some more ideas about it and should probably be able to achieve it in some way.
I'm just pished off that i can't find the time to work on this.... I'm considering looking for a new job within the next few months though so i'll want to have a decent version of IrrAI to 'show off' so hopefully i'll be able to find some time and motivate myself!
raptoravis, that vertex alpha flag was because i wanted the FOV node to be semi-transparent, i can't see why it's causing the problems though... Maybe i'll just make it solid for now to get it to work with 1.4 and then try and get it transparent again later
On many, many occasions i've found that half my team is sitting in a tank which is being driven into a wall and they NEVER get out of the tank unless you run past with the flag (on a CTF map this is of course), in which case they jump out to provide cover for you. Now possibly you might be able to send out an order to get them out of the tank, but i'm not sure about that. I'm just so surprised that they didn't find this in testing or think of it in the first place and add a check to see if they're just grinding against a wall for ages...
Anyway, NavMeshes is something that Christian queried with me as he was talking to an AI programmer from Ubisoft (working on the new Prince of Persia game) and they use NavMeshes (as do a lot of people apparently) as they're allegedly more efficient than a waypoint system. I say allegedly because i've not researched enough to know, but i guess i shouldn't question industry professionals! Apparently they're also basically using neural networks for their AI which surprises me as they're so hit and miss and take so long to train... But again, they're industry professionals and must be getting some success out of them!
So basically what i'm thinking is sticking to waypoints for now but keeping NavMeshes in mind for the future. I do agree that the behaviour of my NPCs is so artificial on the waypoints.... moving at right angles and what not, but i guess that's because i have so few waypoints. I'm beginning work on a new example which will have much more waypoints in it and hopefully might produce some nicer behaviour.
As for deviating from waypoints, this is something i want to do but i wasn't too sure how to do it best... But i've had some more ideas about it and should probably be able to achieve it in some way.
I'm just pished off that i can't find the time to work on this.... I'm considering looking for a new job within the next few months though so i'll want to have a decent version of IrrAI to 'show off' so hopefully i'll be able to find some time and motivate myself!
raptoravis, that vertex alpha flag was because i wanted the FOV node to be semi-transparent, i can't see why it's causing the problems though... Maybe i'll just make it solid for now to get it to work with 1.4 and then try and get it transparent again later
Woah, did you apply the UT3 AI patch? Because I remember what your talking about, and I think the patch fixed that.
And wow, yeah I didn't know they actually used neural networks. I do know that HL2 (maybe?) did use neural networks for cars, and there is a video of it on youtube or something where someone messes with it in Gary's Mod (maybe?).
And wow, yeah I didn't know they actually used neural networks. I do know that HL2 (maybe?) did use neural networks for cars, and there is a video of it on youtube or something where someone messes with it in Gary's Mod (maybe?).
TheQuestion = 2B || !2B
Hello JP. I saw your Project! Nice Work!! I want compile irrAI library for MS Visual C++ 6, but i don't have any files. I don't have theese files: CGridSceneNode.h, Waypoints.h, ActorNPC.h and PatrollingNPC.h. Please, give me theese files. Or if someone have lib file IrrAI for MSVisual Studio orVisual C++6, please, give me this lib file.
You don't need these files anymore, that was like in one of the really early versions of IrrAI. Download the latest version and just add all the files from the src and include directories and hey presto.
Halifax, this is on PS3 i'm talking about, it installed one patch but i don't think that's fixed it, though i could have observed this behaviour before the patch was installed as i was playing on my devkit and you can't install patches on devkits because they're signed for consumer units! dammit! But luckily we have a consumer unit in our office, hence the huge obssession with Team Fortress 2 currently, been going on for about 3 months now and my boss shows no sign of stopping his 4 or so hour a day rampage
Neural networks in HL2 cars? What would the networks be for? The only cars were driven by the user weren't they? Don't recall any NPC driven cars, but then it was a while ago i played it! But i think neural networks can be applied to cars quite well, there's certainly been a lot of work done on getting cars to drive themselves on motorways using just a neural network, with a lot of success. I wouldn't trust one though!
Halifax, this is on PS3 i'm talking about, it installed one patch but i don't think that's fixed it, though i could have observed this behaviour before the patch was installed as i was playing on my devkit and you can't install patches on devkits because they're signed for consumer units! dammit! But luckily we have a consumer unit in our office, hence the huge obssession with Team Fortress 2 currently, been going on for about 3 months now and my boss shows no sign of stopping his 4 or so hour a day rampage
Neural networks in HL2 cars? What would the networks be for? The only cars were driven by the user weren't they? Don't recall any NPC driven cars, but then it was a while ago i played it! But i think neural networks can be applied to cars quite well, there's certainly been a lot of work done on getting cars to drive themselves on motorways using just a neural network, with a lot of success. I wouldn't trust one though!
I don't know but it was a pretty insane video. The car was trying to get out of a room with one door, and it was shooting an insane amount of green rays, and searching. It hit 3 corners, and searched two walls, and finally found the exit. Then it was in like a field and was trying to get through a course made out of barrels, and stuff.
At any rate, it was insane.
At any rate, it was insane.
TheQuestion = 2B || !2B
Aye something like that could work, it's effectively what i was going to do for the next demo, just add loads of waypoints, but a flood-fill algorithm would be useful to save people having to place them.
I wonder if that would help a huge amount as you'd end up with a grid of waypoints basically and then you'd still get grid-based movement, going at right angles all the time probably.
But then i haven't tested performance of a network of waypoints with a huge number of connections so you could connect all the waypoints by sight and then you'd get direct paths instead of right angles all over the place i guess.... Something to think about!
I wonder if that would help a huge amount as you'd end up with a grid of waypoints basically and then you'd still get grid-based movement, going at right angles all the time probably.
But then i haven't tested performance of a network of waypoints with a huge number of connections so you could connect all the waypoints by sight and then you'd get direct paths instead of right angles all over the place i guess.... Something to think about!
-
- Posts: 9
- Joined: Tue Apr 15, 2008 3:28 pm
Not sure what you mean by waypoint culling....
We've discussed methods of having a curvical route between waypoints, so if there's a right angle in the path it won't follow the right angle but sort of follow a curve around that corner to make it look a bit nicer. But i've not actually done anything on that yet.
We've discussed methods of having a curvical route between waypoints, so if there's a right angle in the path it won't follow the right angle but sort of follow a curve around that corner to make it look a bit nicer. But i've not actually done anything on that yet.
-
- Posts: 9
- Joined: Tue Apr 15, 2008 3:28 pm
That's the sort of thing you could do offline, when creating the waypoint network. If C is 'visible' to A then you make a connection to it. So that's handled by the waypoint editor app i made.raptoravis wrote:waypoint culling is, say, it moves from A to B, then C.
and, when it is between A and B, and finds there is no obstacles to C, then, it can skip B, directly begin to move to C
I've not considered, it's a valid suggestion, could help but i don't have any scripting knowledge so i won't be looking into it for quite some time but maybe once First King is done i'll look into it.Halifax wrote:Hey JP, I just had another crazy idea. Well not exactly crazy, but an idea. Have you considered adding scripting to this project, and what would you think about an AngelScript binding?
Indeed... good thinking Basically the auto-link function of the waypoint editor app i made would handle this sort of thing, but it creates a stupidly huge number of connections so i need to see if that number of connections kills the performance at all.Dorth wrote:Why would you do a 4-way grid instead of say, a 8-way grid? same number of nodes, twice as many path. Just make their "length" longer...