Author Topic: Ships AI with increased speeds.  (Read 2770 times)

0 Members and 1 Guest are viewing this topic.

Offline wistler

  • 28
Ships AI with increased speeds.
I've been playing around with increasing the speeds of fighters. When I do and make a simpe 1 v 1 mission, the AI ends up flying round the player in a loop which leads to poor gameplay. I was wondering how other mods with fast ships (such as Diaspora) have overcome the problem and if there is an AI readily avaliable for downlod.

Sorry if this has been discussed previously.

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Ships AI with increased speeds.
A good start would be
AI_Profiles http://www.hard-light.net/wiki/index.php/Ai_profiles.tbl#.24Stalemate_Time_Threshold:
Code: [Select]
$Stalemate Time Threshold:
FS2 Open, 3.6.11:
The minimum amount of time required for the AI to detect a "stalemate" situation. If a ship and its target have been within a certain distance of each other (defined by $Stalemate Distance Threshold) for this amount of time without either of them scoring a hit on the other, the AI will do something to break the stalemate. Only applies to small ships. If this value is 0 or less, no stalemate detection is performed.
Syntax: Float list
Default: 0, 0, 0, 0, 0

$Stalemate Distance Threshold:
FS2 Open, 3.6.11:
The maximum distance that an AI ship must remain from its target for a "stalemate" to occur (see $Stalemate Time Threshold).
Syntax: Float list
Default: 0, 0, 0, 0, 0
and it's ai table equivalent of the same name
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 wistler

  • 28
Re: Ships AI with increased speeds.
That IS a good place to start  :) thanks for the reply. You'd a thought the AI_Profile would have been the first place I'd look.
 
« Last Edit: October 05, 2012, 04:24:04 pm by wistler »

 

Offline Raven2001

  • Machina Terra Reborn
  • 211
  • Im not the droid your looking for, move along
Re: Ships AI with increased speeds.
I don't really get what the $Stalemate Distance Threshold really means.
Does it mean that the higher it is, the more far away the fighter will try to be from its pursuer??
Yeah, I know you were waiting for a very nice sig, in which I was quoting some very famous scientist or philosopher... guess what?!? I wont indulge you...

Why, you ask? What, do I look like a Shivan to you?!?


Raven is a god.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Ships AI with increased speeds.
No, it's involved in the AI detecting circular flight patterns where neither fighter can get an angle on the other.

 

Offline Raven2001

  • Machina Terra Reborn
  • 211
  • Im not the droid your looking for, move along
Re: Ships AI with increased speeds.
Yeah... there's no function that governs what's the "comfort zone" distance, is there?
Yeah, I know you were waiting for a very nice sig, in which I was quoting some very famous scientist or philosopher... guess what?!? I wont indulge you...

Why, you ask? What, do I look like a Shivan to you?!?


Raven is a god.

 

Offline wistler

  • 28
Re: Ships AI with increased speeds.
What actions does the AI take when this is triggered? Is it just the case of the AI changing direction and/or heading away from the player?

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Ships AI with increased speeds.
I've never really noticed this problem with the AI in DE, then again, I usually ensure that no 1v1 is ever taking place, but even then it seems that the AI is pretty good about using glide/strafe to keep itself pointed at me and shooting at me, even when it's just looping around me. (In fact the AI seems better at getting off shots than with regular FreeSpace flight model...) Then again, that may be due to Newtonian dampening, glide/slide/turn rates. I'm not sure.
(´・ω・`)
=============================================================

 

Offline Sushi

  • Art Critic
  • 211
Re: Ships AI with increased speeds.
So here's how the stalemate detection AI stuff works:

- A "stalemate" is defined as neither ship being able to land a shot on another.
- The AI will detect a stalemate if the AI and its target have been within distance X for time Y without either ship landing a shot.
- Distance X is controlled by $Stalemate Distance Threshold.
- Time Y is controlled by $Stalemate Time Threshold.
- Both of the above values default to 0, meaning the AI will never detect a stalemate (retail behavior).
- If the AI detects a stalemate, it might try something different (usually a "break away" or change directions kind of move).
- How likely the AI is to act once a stalemate is detected is determined by $Patience (in retail, this attribute does precisely nothing).


These attributes are pretty effective at breaking up the dreaded "circle fight" where AI ships end up chasing each other around in circles without ever getting a firing solution.

I should also note that there are a LOT of hardcoded distance values in the AI code, and some AI code will never trigger with high-speed ships (combat distance is always higher than some of those hardcoded distance values).

 

Offline Raven2001

  • Machina Terra Reborn
  • 211
  • Im not the droid your looking for, move along
Re: Ships AI with increased speeds.
So basically there's no way of defining a range comfort zone, without resorting to coding, correct?

I've been having the same problem as wistler in my AI fiddlings. In 1 on 1 dogfights, they get too close (filling most of the screen) circling me, unless I fire at them of course, but when I do they are dead anyway.

How complicated is it to code certain kind of behaviours?
Yeah, I know you were waiting for a very nice sig, in which I was quoting some very famous scientist or philosopher... guess what?!? I wont indulge you...

Why, you ask? What, do I look like a Shivan to you?!?


Raven is a god.

  

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Ships AI with increased speeds.
I should also note that there are a LOT of hardcoded distance values in the AI code, and some AI code will never trigger with high-speed ships (combat distance is always higher than some of those hardcoded distance values).
Could those values be exposed to modders? That could help a few mods out there.