Fleet Simulation AI
Hi, I have a space shooter game that's currently using a Finite State Machine type of logic. Every ship has a priority queue of nearby enemies. The ship grabs the closest one then tries to kill the target. The game is visually 3D however the game play is on a 2d plane. Each ship is steered using a crude newtonian physics model with force, mass, acceleration, turn speed. I have it currently set so that there's 4 modes. Evade, Shoot, Shoot+Chase, Chase They're all based on if the ship is within a certain angular range or distance away. I'm trying to enhance the model so it suits different types of ships like a bomber, or a warship. I want to be able have each ship know the weaknesses and strengths of it and some tactics. What would be a good way to do this? Also, more importantly, I want some group based thinking going on. So if a player was in charge of a certain group the AI will execute these moves. Also a planner AI for those groups without a player directing them. Any help is highly appreciated. Thanks!
I've been thinking of a statistic based decision making AI for a while, haven't got chance to materialize it, and it's totally hypothetical.
So a bomber unit does not necessarily know its own strength, but rather knows from statistics that what kind of unit bomber units destroyed most, which is calculated by value of target * quality. The bomber can determine its weakness in the same way by reading what kind of units have destroyed bombers most.
So this bomber unit would assess all hostile units in range and get threat and vulnerability values of each hostile unit. When in a mixed unit squad, this value can be added up from different unit, then modified by importance of each unit to help determine squad priorities.
So a bomber unit does not necessarily know its own strength, but rather knows from statistics that what kind of unit bomber units destroyed most, which is calculated by value of target * quality. The bomber can determine its weakness in the same way by reading what kind of units have destroyed bombers most.
So this bomber unit would assess all hostile units in range and get threat and vulnerability values of each hostile unit. When in a mixed unit squad, this value can be added up from different unit, then modified by importance of each unit to help determine squad priorities.
I would recommend an easier method. In most situations, you know what ships should use what, so just set them to that kind of attack behavior.
Bombers- Hit and run tactics, attack large targets.
Fighters- Hit and run tactics, attack small targets
Warships- Fleet menuvers, keep target at a certain range, angle primary weapons. Possibly hit and run tactics at certain points. Only attack big ships. keep strongest shields/armor at enemy target.
Look at homeworld 2 for examples, seems to do a decent job, or you can overide and tell fighters to attack a battleship etc.
Bombers- Hit and run tactics, attack large targets.
Fighters- Hit and run tactics, attack small targets
Warships- Fleet menuvers, keep target at a certain range, angle primary weapons. Possibly hit and run tactics at certain points. Only attack big ships. keep strongest shields/armor at enemy target.
Look at homeworld 2 for examples, seems to do a decent job, or you can overide and tell fighters to attack a battleship etc.
Black Sky A Star Control 2/Elite like game
Ahhh thanks for the input!
So what about for squad tactics and fleet strategy?
How do you think I should do those? I'm currently thinking of just coding that logic in. I've watched videos about self-learning AI's. Those seem very interesting but I don't know how to go about those.
Oh and my website is at http://students.washington.edu/wuwc/sfx/index.php if you want to check out the game :)
So what about for squad tactics and fleet strategy?
How do you think I should do those? I'm currently thinking of just coding that logic in. I've watched videos about self-learning AI's. Those seem very interesting but I don't know how to go about those.
Oh and my website is at http://students.washington.edu/wuwc/sfx/index.php if you want to check out the game :)
Not to be rude, but if you are thinking of using self-learning techniques because you don't know how to do group tactics and strategy, you are starting on the wrong side of the table. That's kind of like saying I want to use calculus so I don't have to learn algebra. Put simply, until you know how to program AI, don't try to make AI that can program AI.
That being said, the best bet for tactics is to create an imaginary layer above the unit layer. This tactical manager decides on rudimentary goals (even randomly selected) and issues orders to the individual units. For example, the simple choice of "use flanking" would either select positions on opposing ends of the target and issue move commands to the units to go to those positions, or simply issue directional commands like "move left while attacking" and "move right while attacking". By having those coinciding commands, you are giving the illusion that the units are working together when, in reality, they are simply blindly obeying orders from a higher entity.
That being said, the best bet for tactics is to create an imaginary layer above the unit layer. This tactical manager decides on rudimentary goals (even randomly selected) and issues orders to the individual units. For example, the simple choice of "use flanking" would either select positions on opposing ends of the target and issue move commands to the units to go to those positions, or simply issue directional commands like "move left while attacking" and "move right while attacking". By having those coinciding commands, you are giving the illusion that the units are working together when, in reality, they are simply blindly obeying orders from a higher entity.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement