Author Topic: AI Wishlist: post what you'd like to see here!  (Read 14565 times)

0 Members and 1 Guest are viewing this topic.

Offline Sushi

  • Art Critic
  • 211
AI Wishlist: post what you'd like to see here!
I'm starting to play around a bit with the AI code, and I wanted to get some ideas on what to try with it. Obviously, there are lots of things that could be done (I have a couple ideas already), but what would you like to see? Post your AI enhancement wishlist here!

The Wishlist So Far
  • Intelligent use of glide. --Sushi
  • More frequent/smarter use of sidethrusters (e.g. for evasion). --Sushi
  • Somehow fix hardcoded distances in the AI code (so that mods with fast ships like BTRL and Velocity Mod don't get totally different behavior). --Sushi
  • Bombers that no longer keep ramming their target after firing their bombs. --The E
  • Fighters or any other small craft change their course slightly if they're colliding with something (e.g. formation rubbing). --Kolgena
  • AI fighters hugging capital ships to shake pursuers --aRaven
  • AI fighters breaking from endless turning knife fights (detect/break out of circle fights) --aRaven
  • AI bombers trying to jink/shake off enemy fighters while on an attack run (can probably apply to fighters attacking transports/cruisers just as well) --pietraz
  • Bombers (optionally) waiting until point-blank to release bombs --Dilmah G
  • Fighters having a greater sense of self-preservation (especially when using the "protect" order) --Dilmah G
  • Bombers "opening" formation if they get too close together --Mobius
  • Capships that intelligently position themselves for maximum protection and/or to bring maximum firepower to bear on their chase target --Rodo
  • Smart shield facing for capships with shields (increase power in direction of threat) --Topgun
  • Squad-like behavior in wings: wings split up tasks (if wing is attacked, some defend and some continue to pursue objetives). --Angelus
  • Fighters/Bombers smarter around "large stationary objects" (juggernauts, stations, asteroids) --swashmebuckle
  • Bomber turrets targeting the closest hostile (or threat) within their FOV regardless of the bomber's target --Sushi (Already done in the Wanderer branch)
  • Bombers that use afterburners --Sushi
  • intelligent object collision avoidance (such as pathfinding) --Bobboau
  • In general, fighters that don't ram each other so often --Sushi
  • Option for fighters to avoid shooting asteroids --Reprobator
« Last Edit: August 04, 2009, 11:50:19 am by Sushi »

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: AI Wishlist: post what you'd like to see here!
Bombers that no longer keep ramming their target after firing their bombs.
Let there be light
Let there be moon
Let there be stars and let there be you
Let there be monsters and let there be pain
Let us begin to feel again
--Devin Townsend, Genesis

 

Offline Angelus

  • 210
  • The Angriest Angel
Re: AI Wishlist: post what you'd like to see here!
Two SEXPs, non of 'em actually AI-code related, but still.

is-ai-chased-flip: ( probably a stupid name for it...)
would make the ai fighter flip by 180 deg. to meet the threat behind it, WITHOUT changing the vector or the speed, it would be like glide.

is-ai-chased-turn:
would make the AI make instant sharp turns, by 90 deg to any ( maybe changeable ) direction ( like fly in any direction, hit glide, turn by 90 deg. up, down, left or right and disengage glide again ).

This is already possible using the existing SEXPs, but in the most cases you have to set up waypoints for the AI to follow if you want them to make strafe runs.

The two SEXPs would allow the Glide behaviour without the need for waypoints.
It would make the AI less...predictable in games that actually use glide, like Diaspora, BtRL, TBP and WC Saga.
« Last Edit: April 26, 2009, 12:11:25 pm by Angelus »
while ( !asleep)     |     Building a Warmachine for FreeSpace: Chronicles of a dark Age        |       My WIP's                                 
{Eights++}

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: AI Wishlist: post what you'd like to see here!
Wouldn't that fall under "intelligent use of glide"?
Let there be light
Let there be moon
Let there be stars and let there be you
Let there be monsters and let there be pain
Let us begin to feel again
--Devin Townsend, Genesis

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: AI Wishlist: post what you'd like to see here!
Neither of those should be done as SEXPs.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline captain-custard

  • previously known as andicirk
  • 210
  • one sandwich short of a picnic
Re: AI Wishlist: post what you'd like to see here!
when you command an ai to do something it does......;.;;
"Duct tape is like the force. It has a light side, a dark side, and it holds the universe together."

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: AI Wishlist: post what you'd like to see here!
Can we have a fire-turret SEXP, Kara? Not technically an AI request, but it'd be sweet. (I hate having to fake things with weapon-create.)

 

Offline Kolgena

  • 211
Re: AI Wishlist: post what you'd like to see here!
Related to the bomber thing:

Fighters or any other small craft change their course slightly if they're colliding with something.

Frequently, fighters flying in formation for a c38 or c35 will simply fly touching side by side, sending up a shower of sparks and debris until you order them to do something else.

Edit:

Oh! Oh! And a waypoint command system (which I imagine would be hard to make). Like, give a sequence of commands to give out. ie: Give a sequence of commands for a wing to kill Arjuna 1-4 by 4v1 piling them, instead of c39 or microing off each Arjuna fighter with c31 after the previous has died.
« Last Edit: April 26, 2009, 12:54:26 pm by Kolgena »

 

Offline aRaven

  • 28
Re: AI Wishlist: post what you'd like to see here!
ai fighters hugging capital ships to shake pursuers

no more pinpoint accuracy on higher difficult settings

ai fighters breaking from endless turning knife fights

smarter use of afterburners when rushing towards a target

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: AI Wishlist: post what you'd like to see here!
Can we have a fire-turret SEXP, Kara? Not technically an AI request, but it'd be sweet. (I hate having to fake things with weapon-create.)

If someone (like Wanderer for instance) can tell me which function to call.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Sushi

  • Art Critic
  • 211
Re: AI Wishlist: post what you'd like to see here!
Good ideas. Keep 'em coming. :D

no more pinpoint accuracy on higher difficult settings
smarter use of afterburners when rushing towards a target

These can already be controlled by modifying tables, right?

Oh! Oh! And a waypoint command system (which I imagine would be hard to make). Like, give a sequence of commands to give out. ie: Give a sequence of commands for a wing to kill Arjuna 1-4 by 4v1 piling them, instead of c39 or microing off each Arjuna fighter with c31 after the previous has died.

Hard to make, and probably hard to use. :) That, and it's more of a control-options issue than an AI issue.

is-ai-chased-flip: ( probably a stupid name for it...)
would make the ai fighter flip by 180 deg. to meet the threat behind it, WITHOUT changing the vector or the speed, it would be like glide.

is-ai-chased-turn:
would make the AI make instant sharp turns, by 90 deg to any ( maybe changeable ) direction ( like fly in any direction, hit glide, turn by 90 deg. up, down, left or right and disengage glide again ).

I agree with Kara that these behaviors aren't really right for SEXPs. The first is definitely one I had in mind for "intelligent use of glide." The second might be an interesting behavior too, although I suspect that using it would be a net loss for the AI by making them easier to shoot down.

 

Offline Angelus

  • 210
  • The Angriest Angel
Re: AI Wishlist: post what you'd like to see here!

is-ai-chased-turn:
would make the AI make instant sharp turns, by 90 deg to any ( maybe changeable ) direction ( like fly in any direction, hit glide, turn by 90 deg. up, down, left or right and disengage glide again ).


I agree with Kara that these behaviors aren't really right for SEXPs. The first is definitely one I had in mind for "intelligent use of glide." The second might be an interesting behavior too, although I suspect that using it would be a net loss for the AI by making them easier to shoot down.

The idea is, that even if the AI would use glide, i wouldn't have total control over it's behaviour in certain situations.
The SEXPs would allow me to control the AI when i need it.

I also thought that adding these two SEXPs would be far easier then rewriting the code, since Karajorma mentioned once that everyone who attempted this, vanished. :P
while ( !asleep)     |     Building a Warmachine for FreeSpace: Chronicles of a dark Age        |       My WIP's                                 
{Eights++}

 

Offline Sushi

  • Art Critic
  • 211
Re: AI Wishlist: post what you'd like to see here!
I also thought that adding these two SEXPs would be far easier then rewriting the code, since Karajorma mentioned once that everyone who attempted this, vanished. :P

Gather round the virtual campfire, everyone. Time for nerdy ghost stories!

Seriously, though, it's not the easiest part of the code to play with... I'm certainly not making any big promises. :D

The idea is, that even if the AI would use glide, i wouldn't have total control over it's behaviour in certain situations.
The SEXPs would allow me to control the AI when i need it.

Fair enough... but wouldn't it be equally useful to be able to control any and all aspects of the AI that way? If we're going to allow that fine-grained of control, we might as well go whole-hog. :p

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: AI Wishlist: post what you'd like to see here!
It's still a bad idea.

Quite simply this is trying to control the individual actions of an AI ship via SEXPs instead of allowing the underlying AI system do it. In order to make it work you're going to have to build up a really large SEXP based psuedo-AI system that will tell the ship when and how to use these tricks.

It results in needlessly complicated, probably unmaintainable mission code in return for nothing which can't be gained by simply doing things correctly in the first place. And that's before we get to the fact that in order to implement these SEXPs someone needs to edit the AI code to add functions that will do these things. But if we have functions that will do this, why the hell would we need SEXPs to call them? Why not simply call them from in the code in the first place?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Minecraft
    • Steam
Re: AI Wishlist: post what you'd like to see here!
Tactics for every retail capital ship to face the enemy with most of it's turrets... I mean to avoid that dancing thing the do now, I know you can dissable that from the table but still It would be nice to have custom IA's for every capital ship, sorry if that doesn't fit here.
el hombre vicio...

 

Offline pietraz

  • 25
Re: AI Wishlist: post what you'd like to see here!
I'd actually love to see AI bombers trying to shake off enemy fighters. Right now they go in straight line toward their targets, blind to a wing of fighters decimating their ranks with primaries from 700m. Even simple jinking would be better. Plus, they could stop pursuing their targets and do some evasive maneouvers after the bomb salvo (20 sec cooldown).

Other things I found irritating with the AI were already mentioned.

 

Offline Dilmah G

  • Failed juggling
  • 211
  • The Token "G" of HLP
Re: AI Wishlist: post what you'd like to see here!
- Bombers carrying the Helios torpedo close to <500 before releasing their ordnance

- Bombers carrying the Cyclops also close to <500

- Fighters have a greater sense of self-preservation. One thing that pisses me off is seeing a fighter race to it's assigned corvette with six Hercs on it's six. I think that's something to do with AI Skill level but I'm not sure.

- Would modifying the AI code for Capship attack commands be too hard? Personally I like setting waypoints for them but it'd save some time if for smaller ships like cruisers didn't need waypoint sets. And because in retail high noon the Colossus is given an Attack order, causing it to look a bit weird.

- Could you have these as options in the ai_profiles.tbl? If for some reason people preferred retail behaviour (I don't know why...)

- Is it possible to affect in which situations the AI uses certain missiles? Such as the hornet should be used head-on (deviation of 10 degrees) and 30 degrees from it's six, since the hornet uses lag pursuit.

EDIT: Also

- Bombers on the "Destroy my target" order on a ship cruiser class and above automatically attack the nearest turret targeting them. I'm not sure if that's implemented already but sometimes I notice bombers heading right into a wall of flak for no good reason.
« Last Edit: April 26, 2009, 11:39:10 pm by Dilmah G »
Trendy Lefty. Good music from a good friend of mine.

Freespace Rap: http://www.hard-light.net/forums/index.php/topic,62924.0.html

The Fighter Pilot Series: http://www.hard-light.net/forums/index.php?topic=72431.msg1431423#msg1431423

The word 'Yo' is only ever to be used as a singular greeting.
It is considered an insult to destroy a perfectly acceptable greeting by misuse. A 'Yo-Yo' is a toy spun from the index finger by small children and enthusiasts,
any such use as a greeting will result in prompt reprimand by any member of the 'African-American' or 'Sri-Lankans-who-think-they're-black' community

Fury`: if General Krav Maga wouldn't be enough, beating up 16 teenagers is going to get me into jail :p /
BlackMan: Maybe if you turned into pedobear you'd be more of a threat

 

Offline Admiral Nelson

  • Resurrecter of Campaigns
  • 211
  • The GTA expects that every man will do his duty.
Re: AI Wishlist: post what you'd like to see here!
Mine would be to ask if it is somehow possible to fix the formation grinding thing as if it were a bug in the main branch of the code -- i.e. as some minor tweak that wouldn't break anything else or require the setting of a unique AI profile.
If a man consults whether he is to fight, when he has the power in his own hands, it is certain that his opinion is against fighting.

 

Offline Sushi

  • Art Critic
  • 211
Re: AI Wishlist: post what you'd like to see here!
Tactics for every retail capital ship to face the enemy with most of it's turrets... I mean to avoid that dancing thing the do now, I know you can dissable that from the table but still It would be nice to have custom IA's for every capital ship, sorry if that doesn't fit here.

I'm not sure exactly what you mean. Do you mean having every capship try to put its target in the spot where it can bear down with the most firepower? If so, that's fairly hard to do... I suppose it's possible if there is a table entry or something that specifies the "optimal" attack position, but it would mean that people would have to manually debate over and choose the "best' attack position for every single capship.

- Would modifying the AI code for Capship attack commands be too hard? Personally I like setting waypoints for them but it'd save some time if for smaller ships like cruisers didn't need waypoint sets. And because in retail high noon the Colossus is given an Attack order, causing it to look a bit weird.

I dunno, haven't tried yet. What exactly do you want to happen? "Looks wierd" isn't very specific. :p

- Could you have these as options in the ai_profiles.tbl? If for some reason people preferred retail behaviour (I don't know why...)

Naturally, if and when I do change anything, it would have to be optional and off by default.

- Is it possible to affect in which situations the AI uses certain missiles? Such as the hornet should be used head-on (deviation of 10 degrees) and 30 degrees from it's six, since the hornet uses lag pursuit.

Hardcoding the "best" way to use each missile is probably a bad idea, given the sheer number of possible missiles (including mods). IMO the AI does decently well with missiles... certainly well enough to be dangerous. :)

- Bombers on the "Destroy my target" order on a ship cruiser class and above automatically attack the nearest turret targeting them. I'm not sure if that's implemented already but sometimes I notice bombers heading right into a wall of flak for no good reason.

Are you saying that they currently do attack the nearest turret, or that they should?


Mine would be to ask if it is somehow possible to fix the formation grinding thing as if it were a bug in the main branch of the code -- i.e. as some minor tweak that wouldn't break anything else or require the setting of a unique AI profile.

Possible? Sure, assuming I do it. :D I'll let someone else make the decision on whether or not that fix gets to count as a "bug fix" or an "optional enhancement" though.

 

Offline Dilmah G

  • Failed juggling
  • 211
  • The Token "G" of HLP
Re: AI Wishlist: post what you'd like to see here!
- Instead of attempting the "Circle of Death" (Set up a mission, give both caps the attack order and make them invincible, put your fighter in a good spot and crank up time compression and see what happens), they initially bring their forward beam cannons to bear if they're outside their range, then once they hit say... 2400 metres they start broad-siding (I think this is also what Rodo means), so they do an initial pass of the target side-by-side at... 1200 metres? And they stay stationary in that position until the target begins to move, if it is moving/starting to, the ship attempt to keep 1200 to whichever is the closest side of the ship and move along-side it. This way, I can set up an Orion to move to a series of waypoint, and a Deimos on attack order at 3200 metres will

A) Close the gap
B) Attempt to broadside

I think this is currently what happens, but it looks very messy, you'll most likely notice some obvious things in the code. Basically the AI does whatever it can to get itself sitting next to its target.

- Yes fair enough :yes:

- They should
Trendy Lefty. Good music from a good friend of mine.

Freespace Rap: http://www.hard-light.net/forums/index.php/topic,62924.0.html

The Fighter Pilot Series: http://www.hard-light.net/forums/index.php?topic=72431.msg1431423#msg1431423

The word 'Yo' is only ever to be used as a singular greeting.
It is considered an insult to destroy a perfectly acceptable greeting by misuse. A 'Yo-Yo' is a toy spun from the index finger by small children and enthusiasts,
any such use as a greeting will result in prompt reprimand by any member of the 'African-American' or 'Sri-Lankans-who-think-they're-black' community

Fury`: if General Krav Maga wouldn't be enough, beating up 16 teenagers is going to get me into jail :p /
BlackMan: Maybe if you turned into pedobear you'd be more of a threat