Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
BuzzBob
23
Years of Service
User Offline
Joined: 12th Apr 2003
Location:
Posted: 15th May 2003 00:12
I'm really interested in AI proggraming but I don't have a project currently so if anyone wants some help just ask and I might be able to give you an answer. Problem is I'm not very good at creating the game to go around the AI itself.
Jmansr
23
Years of Service
User Offline
Joined: 28th Aug 2002
Location: Canada
Posted: 15th May 2003 00:23
I would just like to know a starting point? Like I have a nice little engine running and would like to start adding in some AI but I have no idea of a starting point.

What would be the first thing to look at when implementing AI?

Blue Blood FX
Check it out, RIGHT NOW!
http://blueblood.bandedsoftware.com
andrew11
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 15th May 2003 00:28 Edited at: 15th May 2003 00:36
@Jmansr
What type of game is it?

To do AI, you have to think what you would do if you were the opponent. Then you try to get the computer to mimic it. Thats the hard part....

"All programmers are playwrites and all computers are lousy actors" -Anon
I think it's time to get a new sig...
Click Here!!!
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 15th May 2003 00:35
Hehe, the extend of my AI is:

The monsters start out sleeping. The closer the player gets, the more likely they are to waking up. When they wake up, they B-line for the player.

Not very smart but I'll work it out

--Mouse

Famous Fighting Furball
Dr OcCuLt
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: a Dark Deep Dark pit, it dark in here
Posted: 15th May 2003 01:38
it a good placs to start mouse.Jmansr try looking at sum thing like Metal Gear Solid 1 if the Enemies see you thay start shoting at you,if thay hear you thay go have a look at were the sound is comeing from.if thay find you thay tell there frends where you are.

that a good action AI in a nut shell.but all genres have there own types of AI.i look at game of the same genre and see what there AI do.

--Dr 0--


Most people are other people.Their thoughts are someone else`s opinions,thier lives a mimicry,their passions a quotation
Oscar Wilde
OzBot
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: Sweden
Posted: 15th May 2003 01:55
What about dog fighting in a Flight game.

Do you have flight patterns that ships, like circular paths based on your position and as they head towards you they can fire some and turn around if they start to get too close or are under fire, then start the circle path again.

Or

Do you make each enemy have its own logic based on loads of switches, so every cycle each enemy assess the current situation and then does an action or Choice of actions (random within given choices so not to be predictable). Do you set up controls for each ship so it turns left, right etc based on the same kind of controls you have.


This is my dilemma and I am thinking of making the second choice but it seems like it is going to be a lot of work.
Any recommendations?
Dr OcCuLt
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: a Dark Deep Dark pit, it dark in here
Posted: 15th May 2003 04:22
OzBot:most AI need sum form of pattern or that wood do thing at random,the best the way to make one is to sit down think about it pattern in real life.

this is how i see a dog fighting AI

the ship has a attack pattern

it move to the players ship >> it opens fire on the player >> it move away from the player >> "back to the start"

this is ok but it needs to react to what the player is doing.so when the ship fills it being shot at it jumps from any where it is in the pattern to the point where it move away from the player.

--Dr 0--


Most people are other people.Their thoughts are someone else`s opinions,thier lives a mimicry,their passions a quotation
Oscar Wilde
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 15th May 2003 06:32
Yup, what Dr OcCuLt said is correct. That is based on the observation of its environment. There is another way which called a finite state machine (or FSM). FSM is a good and easy model to create convincing AI. All you need to do is to sit down and plan what are the states of your enemy, e.g.

1. Attacking Agreesively
2. Attacking cautiously
3. Evading defensively
4. Total evading
...
...

The states can be more depends on what behavior you can think of. Based on each state, you will perform the action that is required. If there are more than one actions need to be chosen from a state, you can use some probablistic method to make the decision.

Different enemy might have a different FSM. Or same FSM but with a different decision probability will create a slight different behavior.

Good luck!

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
OzBot
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: Sweden
Posted: 15th May 2003 11:52
Cheers Guys!
the architect
23
Years of Service
User Offline
Joined: 6th Jan 2003
Location: United Kingdom
Posted: 16th May 2003 13:41
I got a book called game programming - All in one by LaMothe. It gives some excellant pointers to methods of AI and some physic equations.

Beta1
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location:
Posted: 16th May 2003 16:39
I was doing something similar for an attack routine for a driving game.

The basic logic was based around comparing the current direction the enemy was pointed in to the direction the target was in. If it was to his left he steered left, if right he steered right, if the target was more than a certain distance away he accelerated too. Once he got close the steering logic was reversed to make him swerve away, once he had got far enough the first set of instructions kicked in again to make him swing back for another run.

As an added layer on top of this I implemented a rudimentary obstacle advoidance routine - it basically used the collision routines to check for objects that within a certain radius of 2 points ahead of the vehicle and offset to the right and left. If either picked up a collision the AI steered in the opposite direction, this overwrites any previous steering.

Worked quite nicely too. I'm trying to rewrite it to be more "generic" so I can reuse it in some other programs.

the architect
23
Years of Service
User Offline
Joined: 6th Jan 2003
Location: United Kingdom
Posted: 17th May 2003 03:38
I am writing an FPS and one point I realised is beings make mistakes, dont always react quick enough, miss, do the wrong thing. Thus I am now incorperating one dicision / one being makes it per frame. This will give a 'reaction' to the AI. Also I have made a number of flow charts detailing decisions and conditions in an easy format.

Login to post a reply

Server time is: 2026-07-11 12:00:41
Your offset time is: 2026-07-11 12:00:41