Wolf, Doom, Quake, Half Life and FEAR AI cheatsheet

Discuss Artificial Intelligence and Bot programming.
Post Reply

Whic AI style you prefer?

Wolf
0
No votes
Doom, Quake
1
25%
Half Life
1
25%
FEAR
2
50%
 
Total votes: 4

daemonicky
Posts: 185
Joined: Wed Apr 13, 2011 1:34 pm

Wolf, Doom, Quake, Half Life and FEAR AI cheatsheet

Post by daemonicky »

Please, dont take it too seriously, I had fun making it and so I made intentional attempts at jokes. :) But I believe there is useluf information, anywas feel free tell me what I got wrong :).

Introduction :

I was interested in AI of these games. I am not AI expert although I know little of Prolog, LISP. I was blown by AI in Pacman, Lode Runner and FEAR ("bunch of hiding bastards") :-D, so I dont care about realism but how it feels.

I have not looked into FEAR AI code and I do not rembember Quake 2 AI code, but I believe it is the same thing as Quake only not int Quake C :). I have not looked into Half Life AI either, so FEAR and HALF LIFE are my assumptions.

My view is extremely simplistic :

AFAIU Wolf

Code: Select all

Chasing enemy() :                                 //function EDIT: this is generic function for arbitrary AI
        if i am "hitler":
                     i do some shouting           // EDIT : of course there are some conditions
        if i am "zombie" :
                     i do some growling and hopping
        if i am "satan" :
                     i call my friend Baal
AFAIU Doom
AFAIU Quake
Simply put, difference between Doom and Quake AI is that one is scripted and other is not :) .

Code: Select all

entity "hitler" :
            Chasing enemy ()
                     i do some shouting

entity "zombie" :
            Chasing enemy ()
                     i do some growling and hopping

entity "satan" :
            Chasing enemy ()
                     i call my friend Baal
AFAIU Half Life

Code: Select all

entity "hitler" :
            There is jewish non blue eyed person (just like I am, oh snap!) AND is Eva looking? AND Is Himler next to me? AND Do I have rocket lanucher and robot uniform?
                          Chasing enemy ()

entity "zombie" :
            There is anything with braing (ever wondered why they are not cannibals?) AND I am alive (wait, I am not, horaay !!!)?
                        Chasing enemy ()

entity "satan" :
            There is enemy AND have I not forgottent that Balls cellphone number is 666? AND Saddam is not in Bed
                           Chasing enemy ()
Of course there is more, Satan might be enjoyig Dark Mistress and not care about Saddam not being in bed or having enemies, but lets be honest who would?

AFAIU FEAR
There is STRIPS. I dont have practical experience with AI coding, but to me it is the difference from Half Life (to my knowledge it had no STRIPS). So :

Code: Select all

entity "hitler" :
            I AM PLANNING : 
                         what step do I have to make to find jewisht non blue eyed person (without looking into mirror) 
                         AND what steps do i have to take to make Eva looking at me? 
                         AND what steps to take, so I can bake a cake for Himlers sake, so attack we can make 
                                        OR obtain a puppy for him? 
                         AND what steps do I have to take to have rocket lanucher and robot uniform without anyone knowing I bought it from jews?
            I GOT THESE CONDITIONS MET :
                          Chasing enemy ()

entity "zombie" :
            I AM PLANNIG : 
                        eeeeeeee ........ eeeeeeee ...... braiiiins .... (You can not plan as a zombie, it is against nature)
             I GOT THESE CONDITIONS MET :
                        Chasing enemy ()

entity "satan" :
            PLANNING :
                         what to do to find enemy 
                         AND where to get some pills against Alzheimers 
                         AND where to get some virgings 
            I GOT THESE CONDITIONS MET :
                           Chasing enemy ()
EDIT: And there is some squad tactics, but who cares, Half Did not have those it came from emergecy :-D .


EDIT:
Dont they seem just like permutations?

There is WHO, WHAT and WHEN line which defines behaviour. They are just permuted. In Wolf it is WHAT, WHO and WHEN (when? well, the behaviour is changed from within, look at source code); in Doom and Quake it is WHO, WHAT and WHEN; in Half Life and FEAR it is WHEN, WHO, WHAT.

Well, in FEAR there is this planning STRIPS thing (lets pray they have not heard it has NP complexity), actually it makes the decisions AUTOMATIC (and thats what logic languages are for) ... so I believe there will be less code, because STRIPS should, when correctly set up, do some decision for you so you dont need to write "if is 5 meters there go left, if you cant go left, go right, if you cant go right ...".

Actually, it is quite interesting. Maybe, just maybe there is chance that each permutation (of WHAT, WHO and WHEN) has its own pros and cons.

Goodies.

STRIPS HALF LIFE AI FEAR AI PACMAN AI
Each ghost is seeking some special point (where is player, few steps ahead of player, position between two ghosts (?) ...) LODE RUNNER AI
Maybe I am wrong, but I remember enemies goal was to shorten the longest distance between them and player and avoid getting stuck in group. SATAN AI
Satans worst fear, Saddam with Dark Mistress http://www.thanatosrealms.com/dk/images ... stress.gif , who to choose, who to choose ...
Post Reply