Author Topic: Running out of primary ammo (sucks for the AI)  (Read 8056 times)

0 Members and 1 Guest are viewing this topic.

Offline colecampbell666

  • I See Dead Pictures
  • 212
  • Evolution and ascension.
Re: Running out of primary ammo (sucks for the AI)
make ai use wanderer's turret features if they dont do so already

Thanks for the ideas, but could you please explain this one?
Wanderer made turrets on bombers target independently of the players target. They actually do something with his script.
Gettin' back to dodgin' lasers.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Running out of primary ammo (sucks for the AI)
I want that!

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Running out of primary ammo (sucks for the AI)
None of this actually has anything to do with the subject that Sushi was on about. So back on topic.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
Re: Running out of primary ammo (sucks for the AI)
What's with all the ruckus? The problem is rather simple.
IF you don't want support ships in your mod then either don't use primaries with limited ammo or give them massive amounts of ammo (far more than they would need for a mission).


Kicking out ressuplies and then crying when you (or the AI) run out - that's like a whole new level of stupidity.
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Running out of primary ammo (sucks for the AI)
The fact is that the AI makes no attempt to conserve ammo in the same way a human player would. Giving the AI insanely high amounts of ammo is not a good solution. In fact it's a ****ty one. It simply suggests that we make the AI cheat (or give the player the same amount of ammo, thereby making even having ammo pointless in the first place.

Most sensible people would see this as a problem and want to fix it. Feel free to prove you aren't a sensible person by arguing against Sushi's desire to write better AI though.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Running out of primary ammo (sucks for the AI)
better ai is good. but i think giving the enemy support ships can add a lot to gameplay. i also like my return to your mother ship, reload and get back into the fight idea.
« Last Edit: June 26, 2009, 03:47:57 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Running out of primary ammo (sucks for the AI)
That's fine too but there are several mods where it would be impractical. Diaspora comes immediately to mind. Giving the Cylon Raiders support ships would be hugely non-canon and they don't jump in with a basestar in every mission. 

Yes, enemy support ships are a nice idea in the long run too but getting the AI not to waste its ammo in the first place helps all mods immediately.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Running out of primary ammo (sucks for the AI)
improving the ai seems to work the best regardless. but in situations where theres no support it might just be better to bug the ship out if its no longer capable of fighting. so id add the fred check too so the fredder can do something sensible with the excessively trigger happy ais. the player merely doesn't get the points for killing it.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Running out of primary ammo (sucks for the AI)
Well the tools to do stuff in FRED are already there, it's just up to the FREDder to use them once the AI has been fixed to be less of an idiot.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
Re: Running out of primary ammo (sucks for the AI)
The fact is that the AI makes no attempt to conserve ammo in the same way a human player would. Giving the AI insanely high amounts of ammo is not a good solution. In fact it's a ****ty one. It simply suggests that we make the AI cheat (or give the player the same amount of ammo, thereby making even having ammo pointless in the first place.


The AI doesn't conserve ammo at all (missiles or primaries) - not a real problem when the AI can call in support ships.

I can see this ammo conservation having merit in settings/mods that clearly have no support ships (altough a question is raised - why not? If you can build space fighters, why are support ships so unconcievable?). And if you haven't noticed kaj, that was the question I was actually raising, not questioning the improving of AI.
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Running out of primary ammo (sucks for the AI)
The fact is that the AI makes no attempt to conserve ammo in the same way a human player would. Giving the AI insanely high amounts of ammo is not a good solution. In fact it's a ****ty one. It simply suggests that we make the AI cheat (or give the player the same amount of ammo, thereby making even having ammo pointless in the first place.


The AI doesn't conserve ammo at all (missiles or primaries) - not a real problem when the AI can call in support ships.

I can see this ammo conservation having merit in settings/mods that clearly have no support ships (altough a question is raised - why not? If you can build space fighters, why are support ships so unconcievable?). And if you haven't noticed kaj, that was the question I was actually raising, not questioning the improving of AI.

Have you seen support ships rearming fighters in BSG? Actually, the FS way of having a small, mostly unarmored ship packed with tons of weapons it can't use itself flitting around on a battlefield is very unrealistic.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Running out of primary ammo (sucks for the AI)
I noticed one thing: In BtRL demo ,wingmen were shooting asteroids with KEWs ,wasting ammunition.
It would be useful to prevent AI from shoting at asteroids when they don't pose a threat to friendly ship.

 

Offline Dilmah G

  • Failed juggling
  • 211
  • Do try it.
Re: Running out of primary ammo (sucks for the AI)
The AI doesn't conserve ammo at all (missiles or primaries) - not a real problem when the AI can call in support ships.

...getting the AI not to waste its ammo in the first place helps all mods immediately.
Exactly.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Running out of primary ammo (sucks for the AI)
in the case of battlestar it would be nice to be able to touch down on the hanger deck rearm and take off again. while that kind of method isnt quite bsg cannon, it seems plausible that in an extended battle such a rapid rearming would be necessary. general support for mothership repair and rearms, assuming the mother ship is in system, go back for ammo. if not warp out for a time and then warp back in fully armed and possibly repaired. either way the ship is removed from gameplay for a short time and then returns to battle as the same ship (im not sure if it was ever made possible to temporarily remove a ship from gameplay, i know the fsrts sorta requested it but im not sure if its been done or if the ship copy meathod was used instead).

its an idea for the future, but not really something pertinent to what neds to be done to conserve ammo now. possibly ai ammo usage couldbe part of the ai profiles, since you might want to add stingy secondary usage as well (which effects reverse compatibility). id make the ammo concervation skills variable depending on ai skill level, newbs trigger happy, vets more disciplined. by default have primary conservation on and secondry conservation off.
« Last Edit: June 26, 2009, 11:55:14 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
Re: Running out of primary ammo (sucks for the AI)
Have you seen support ships rearming fighters in BSG? Actually, the FS way of having a small, mostly unarmored ship packed with tons of weapons it can't use itself flitting around on a battlefield is very unrealistic.

Why unrealistic? It's fast, shielded and has the ability to jump. This gives it good chances at survival.

Any military force has supply ships. They usually don't get involved into the battle, but they also don't usually have the abiltiy to cross half a system really fast.


EDIT: In the AI table isn't there a wait time or something? How long the AI will wait for a better shot before shooting?
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Running out of primary ammo (sucks for the AI)
The AI table settings do very close to bugger all.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Running out of primary ammo (sucks for the AI)

Why unrealistic? It's fast, shielded and has the ability to jump. This gives it good chances at survival.

It also carries an enormous arsenal of assorted missiles, it has the capability to distribute those missiles to fighters, while at the same time repairing the subsystem damage those fighters have suffered during combat, combat that is usually happening in close proximity. Not to mention that resupplying means stopping dead in space and playing a target for any hostile lining up for a cheap kill. Driving one of those flying Pez dispensers must surely be the most sought-after posting EVER.

So, even if we're assuming that it somehow works in the FS universe, transplanting this element into other Universes (like BSG) that didn't provide proof for their existence just because the bloody AI cannot control its trigger finger sounds damn stupid to me.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Sushi

  • Art Critic
  • 211
Re: Running out of primary ammo (sucks for the AI)
It sounds like the general consensus is that AI conserving ammo better + existing FRED options are the way to go.

Time for a brain-dump of ideas for "smarter" AI burst-fire:

One option: a "shot probability" function. This probability would be reevaluated once every second or so, which would be the effective resolution of bursts (bursts will always last X seconds).
Something like:
P(shoot) = (percentAmmoLeft) * (dotProdToTarget)
Where P(shoot) would have some sane minimum/maximum values. P(shoot) would have a similar effect to weapon subsystem damage: the lower the percentage, the less often the AI will shoot.
This would result in the AI shooting less when pointed further away from the target and when lower on ammo.
The main disadvantage of this is that it would produce very "jagged" bursts (a problem mitigated by the 1-second resolution). Main advantage is that it's very easy to implement.

Another option: bursts are controlled by four parameters.
Min Burst Length
Max Burst Length
Min Burst Delay
Max Burst Delay
The actual length of a burst (or a delay between bursts) would be rolled randomly between the specified bounds. These params would all be controlled somehow by FREDDers and modders. This is less "smart" than the solution above, but gives the modders more control over what's going on (which is sometimes even smarter! :)).

Or heck, maybe combine the two. The first method with the function is used, but the length of bursts and the length of delays between bursts are constrained by the parameters from the second method.

One problem with both of these ideas is that it may look weird if the AI is shooting at a big ship or an immobilized ship that's a perfectly easy target and still firing in bursts instead of unloading a steady stream (most efficient). So, we may want to have the AI not use bursts at all in those situations.


 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Running out of primary ammo (sucks for the AI)
Though i have not looked at any of the code behind FS/SCP and its been 3+ years since i did any coding

but

in my opinion 2 would be the simplest not much more than the 4 lines of code listed and random generator code in the game.  but this would probably need 4 variables in the AI table to allow modding

Option 1 would be better from the point of view of fine tuning behavior, you could then have two sets of the code depending on if the AI was shooting at a ship it its sub system which then would allow for example the AI to be more careful (especially when perusing disarm/disable player orders). and would probably only need 2 additional variables in the AI table to set hit probability and burst length

EDIT

Can i also point out a vaguely related topic running atm
http://www.hard-light.net/forums/index.php/topic,63954.0.html
« Last Edit: June 27, 2009, 02:48:08 pm by headdie »
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline Sushi

  • Art Critic
  • 211
Re: Running out of primary ammo (sucks for the AI)
After prototyping option 1, I think that some variant on it will work nicely. Stay tuned. :)