Post processing ai?

Posted By: lostclimate

Post processing ai? - 07/23/11 15:28

I realize this could go in the ai thread, and almost even the shader thread, but since its not practical (yet) no on is going to implement it making it purely theoretical.

Suppose you give everyone a skin, the color of this skin decides the team, then you make it so every ai has a low res cam attached too there head. render it, and then in a post processing like shader make all the diffuse use the team color skin. couldnt you do some very interesting ai based off this information? for instance fog/shadow based ai, being able to pick out someones shoe hiding underneath a car (without traceing to each and every vert)

just wondering about the throughts on this. You could even have enemies camera resolution go up or down for better eyesight.

not super effiecient, but a concept i find interesting.
Posted By: bart_the_13th

Re: Post processing ai? - 07/23/11 16:08

I believe this has been discussed(or at least mentioned) some where in the AI thread. I do not know about efficiency, but I do think it will be fancy grin
I mean, the usual AI will most likely only detect the enemy's box is behind another box, but this AI will actually "see" if the target is actually well hidden or not.

Another implementation of this type of AI is camouflage system. If the target is well camouflaged, blend's well to the world, the AI can be 'fooled' in more realistic way. Or perhaps it can actually detect the target movement this way...
Posted By: mk_1

Re: Post processing ai? - 07/23/11 16:10

All you do is render an image. Now you need to extract informatino out of it and processing all pixels to finally receive one(or more) values like "enemy sighted at (x,y)" takes too long. Also low res cameras might not even see the shoe because it's too small.

I know where you're heading but this is really impractical

[EDIT]
You can of course use a neural network to extract features but even this can take a lot of time. Actually a department at my university is working on PCI cards that can implement arbitrary networks with images as input
[/EDIT]
Posted By: lostclimate

Re: Post processing ai? - 07/23/11 16:24

yeah, i know the low res camera making things invisible would come up, thats kinda my point though, it'd be like simulated eyesight ability, it would also make distance checks on enemies uneeded, because at a certain distance they just get too small also you wouldnt have to check every pixel, just those in the middle of the screen, you could simulate the poorness of the peripheral vision by doing less frequent checks on the edges of the screens.

Like i said, not something I'd put into practice yet, just wonder if its something in the future that might be viable, i think it could even work now, but not really be worth the overhead yet.
Posted By: JibbSmart

Re: Post processing ai? - 07/23/11 16:29

Yes, low res cameras might not see the shoe because it's too small. In the same way, a person walking past a car might not notice the show sticking out the bottom because it's too small, so I wouldn't count that as an issue.

Secondly, we can by no means notice every detail in a scene in front of us in one sixtieth of a second, so in the same way different pixels can be analysed and processed over a short period of time.

I think this could be very useful. It's one approach to AI being smarter about not shooting each other in the back, being able to shoot at different parts of the player without having to use multiple traces to see if any part of the player is exposed, realistic visibility issues (fog as John said, as well as foliage, crowds, shadows, and so on).

It could be worth trying in an experimental demo where the player must defeat/avoid/escape one or a few AIs using that system.

Jibb
Posted By: Slin

Re: Post processing ai? - 07/23/11 16:29

If you just want to check if something is visible, you can also go with occlusion queries, as that is what they are for. I just wonder what you actually want to do with that information after you got it, as it won´t really make your AI.
Posted By: lostclimate

Re: Post processing ai? - 07/23/11 16:41

well if lets say an enemy is very visible, you could rotate the enemy in that direction, you could set the focus where it checks the pixels more towards locations where there is a lot of team color on the render etc. you could essentially set up an ai system that only need to traces or check on players that are in its view for anything other than pathfinding. Idk, just seems like you could use it to make some semi smarter ai. what are occlusion queries (i know what both words are seperate, but you make it sound like there is some accessible engine info that would already return this, although i may have misunderstood)

If I had time for just random experiements, I'd play with this idea, but unfortunately i dont, and the little free dev time i do have, ill probably be trying to continually add to alibaba's sky titan project, because i can see that turning into a full fledged game some day.

Heelx seems very interested in the experimental stuff and seems to be getting into the whole shader thing, i wonder if one day he might be interested grin
Posted By: HeelX

Re: Post processing ai? - 07/25/11 16:24

Hi, I already thought about this one, too, yes. Though, as I read the topic's name, I thought it was a typo ^^

Theoretically this is possible since it is a variant on computer vision, in which a common (and very very basic) challenge is to capture a (coloured) ball as video (or image) and then try to get the position of the ball in the screen, or even better: predict the future position by evaluating motion parameters with a simple Kalman-filter. So why should'nt it possible to do this with computer generated imagery?

The problem is, that you need a well specified purpose (what do you want to achieve?) and a well specified environment (what are going to see?).

An interesting task could be shooting zone selection dependent on visible skin and visible wounds - if the AI selected an opponent to shoot, the AI sight could be evaluated against skin color and wound overlay. The zone with biggest accessible skin and with biggest wound amount "wins".

Another option could be the scenario of the classic Thief-game: the AI sight renders the scene similarily as it is visible to the player and difference maps based on lights and shadows are analysed to locate possible locations of moving opponents.

Together with influence of the global domain knowledge (entities, coordinates, meshes, animation frames, health data, etc.), a believable "Sight AI" can be simulated, that is more realistic than an AI that relies entirely on the global domain knowledge and traces.

For performance issues... it depends. During my B.Sc. thesis I wrote an app that did several things in realtime entirely on the CPU @ 24fps including, but not limited to skin color detection, face detection and -tracking, fast fourier transformation and gabor wavelet transformation - so what you want to do can be achieved in realtime, no doubt, even on CPU. For using the GPU.. ah, mmm... regular pixel shaders might be not suited for this, I think special GPU programming APIs like CUDA are more suited. But for experiments, I would advise you to try CPU first. I worked all the time with OpenCV, a free computer vision library, which is super fast, reliable, stable and feature rich - and free.

Sadly, I have at the moment no time for doing free stuff and -experiments, except that 1 or 2 minutes which I spend on SSAO on sleepless nights smile

Best regards,
-Christian

P.S: Neural Networks are definetely not suited for this task.
Posted By: lostclimate

Re: Post processing ai? - 07/25/11 17:20

Very interesting info. I appreciate the input. Somehow I knew you'd have something interesting to give to this thread laugh
© 2024 lite-C Forums