If you’re a programmer and you hear the letters A.I., you probably think, “Heh, no way! Not for me…” Ever thought why? Maybe it’s because you think it’ll be too hard, and maybe it’ll be too much math for you to handle. But let me tell you: It’s not. The key to programming to A.I. is to act human while programming it and keeping the general idea in mind the entire time: To make it human.
But how? Wow, tough question! Let’s take Zonerunners as an example:
A.I. Thought process:
Do I see any bad guys?
YES: Are they close enough?
YES: Shoot them!
NO: Get close enough to shoot them.
NO: Keep looking!
Am I low on health or ammo?
YES: Go find some ammo/health!
NO: Stay still.
Are there any orders for me?
YES: Do them.
NO: Continue doing previous activity.
This is mostly how the A.I. works in Zonerunners. Sorry, no code yet!