I wrote a project similar a few months back.
The AI was based on a simple event system, where each NPC could generate a set event from a predefined list of events such as:
I''m going in for attack!
Player seen firing!
Flank me!
Defend me!
etc. Each event was fired to all neighbouring NPC with a diminishing radius of influence, so only those nearby would react. Also, each NPC had a rank quotient for their own events, so that maybe one NPC was a squadron leader.
Events received that had a higher rank were acted upon before those events having lower rank weighting.
The trick id then to find a core set of events that yield a flocking type behaviour, or at least give the impression of some sort of global strategy fro the NPC.
Just an idea...
Ideas for intelligent StarFighter Behaviors
Now we''re getting on to Cooperative Agents, rather than just a single tactical agent. Still a valid topic for this thread... I just wanted to point out the divergence.
Cheers,
Timkin
Cheers,
Timkin
Writing a JRobot is an exercise in using limited information to solve exactly this problem. Some of the bot authors might have meaningful advice to give, especially the author of KillerBees.
HTH,
ld
HTH,
ld
No Excuses
Hmmm, for whatever it counts (which I imagine is quite little), I did suggest the possibility of cooperative assignment of behaviors a little ways up. But it would seem that most of the suggestions have been in one way or another based around a fuzzy-logic state machine of one sort or another. I would guess that weighting different behaviors based various pieces of information would probably give you the most bang for your buck. A few of the things that were suggested (i.e. adaptive prediction of where the ship is going) would be damn cool, but probably more trouble than they''re worth unless this game is meant to be more of an AI testbed than anything else. But besides all that, I''m curious how you''re going to make sure that they enemy ships avoid the moving asteroids that will be littering the field. The simplest method I could think of would be to have the asteroids exert a repulsive force on the path of the ship, but that could run into problems fairly easily and doesn''t at all preclude collisions with the asteroids. Have you figured this out already?
_________________________________________________________________________________The wind shear alone from a pink golfball can take the head off a 90-pound midget from 300 yards.-Six String Samurai
Another simple answer following the description I made above would be to add a sensor:
Sensor5: Distance to nearest asteroid (it checks the probability of a collision with the asteroid)
This sensor would susbsume everything and the resulting action would be to avoid. The Avoid procedure would calculate a new bearing to avoid completely the asteroid.
My 2 cents.
Ghostly yours,
Red.
Sensor5: Distance to nearest asteroid (it checks the probability of a collision with the asteroid)
This sensor would susbsume everything and the resulting action would be to avoid. The Avoid procedure would calculate a new bearing to avoid completely the asteroid.
My 2 cents.
Ghostly yours,
Red.
Ghostly yours,Red.
Hi!
I am new to AI. I am looking for writing a simple dogfight procedure for my 3D space shooter. I wish for a procedure for dogfight like in Wing Commander. For now, I just point ship towards targets. How to make them sneak behing enemys back? I cant just say to them, "go position-z*10" because they still crash at each other. Please advise.
thanx,ivan
I am new to AI. I am looking for writing a simple dogfight procedure for my 3D space shooter. I wish for a procedure for dogfight like in Wing Commander. For now, I just point ship towards targets. How to make them sneak behing enemys back? I cant just say to them, "go position-z*10" because they still crash at each other. Please advise.
thanx,ivan
use the kind of things presented in the "boids" thing a zillion years back.
instead of pointing oneself towards a target blindly, use a combination of alignment (point the same way as him) cohesion (go at the same speed as him) and seperation (keep at a distance). you can combine this with your "-z*10" code to do what you wanted. the idea is that the AI will *steer* not *point*.
hope it helped....hmmm
die or be died...i think
instead of pointing oneself towards a target blindly, use a combination of alignment (point the same way as him) cohesion (go at the same speed as him) and seperation (keep at a distance). you can combine this with your "-z*10" code to do what you wanted. the idea is that the AI will *steer* not *point*.
hope it helped....hmmm
die or be died...i think
die or be died...i think
use the kind of things presented in the "boids" thing a zillion years back.
instead of pointing oneself towards a target blindly, use a combination of alignment (point the same way as him) cohesion (go at the same speed as him) and seperation (keep at a distance). you can combine this with your "-z*10" code to do what you wanted. the idea is that the AI will *steer* not *point*.
hope it helped....hmmm
die or be died...i think
instead of pointing oneself towards a target blindly, use a combination of alignment (point the same way as him) cohesion (go at the same speed as him) and seperation (keep at a distance). you can combine this with your "-z*10" code to do what you wanted. the idea is that the AI will *steer* not *point*.
hope it helped....hmmm
die or be died...i think
die or be died...i think
There was a post a while back about leading a target. It was in the context of "If I am at point A and can shoot a bullet at speed S, and the target is at point B and has velocity V, what does my velocity (the absolute value of which will be S) need to be?"
This is essentially the same problem you''re having, but in a slightly different context. You, the starfighter, are now the bullet. Each timestep, you can use this technique to determine the desired velocity required to intercept the target assuming it moves in a straight line.
Unfortunately, the forum''s ''Search'' function appears to be broken; the query "leading a target" (which I remember had been in the title) returned only ignored words. If you can access this thread, my final solution is one of the last posts. You may be able to get what you need there, if you can find it. I''ll also see if my notepad turns up; if it does, I''ll post the results again in this thread.
This is essentially the same problem you''re having, but in a slightly different context. You, the starfighter, are now the bullet. Each timestep, you can use this technique to determine the desired velocity required to intercept the target assuming it moves in a straight line.
Unfortunately, the forum''s ''Search'' function appears to be broken; the query "leading a target" (which I remember had been in the title) returned only ignored words. If you can access this thread, my final solution is one of the last posts. You may be able to get what you need there, if you can find it. I''ll also see if my notepad turns up; if it does, I''ll post the results again in this thread.
Damm!
Flock - boids think doesnt work. Yes, flock flies nice avoiding obstacles and gooing to migration point, but in one on one it sucks. For example, it hits my nose, where obstacle force becomes dominant and so robo fighter follows it exposing its back to me. I have tried balancing forces but no luck..
thanx and please advise me!
Flock - boids think doesnt work. Yes, flock flies nice avoiding obstacles and gooing to migration point, but in one on one it sucks. For example, it hits my nose, where obstacle force becomes dominant and so robo fighter follows it exposing its back to me. I have tried balancing forces but no luck..
thanx and please advise me!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement