Hard Light Productions Forums

Hosted Projects - Standalone => Diaspora => Topic started by: wistler on October 05, 2012, 04:12:50 pm

Title: Diaspora AI
Post by: wistler on October 05, 2012, 04:12:50 pm
Out of pure interest, how is the Diaspora AI different to the BP2 AI? What extra features does it add to the game or let you do differently compared to the commonly used AI?

Is there some way it dramatically alters the ships behaviours?

Title: Re: Diaspora AI
Post by: General Battuta on October 05, 2012, 04:24:16 pm
Yes. It's completely and brilliantly different, and tackles a more challenging problem than the BP2 AI. Just comparing ai.tbl and ai profiles between the two should help you see how.

BP2's Fury AI makes FreeSpace ships behave more intelligently given their flight and weapon characteristics. Diaspora AI allows FreeSpace ships to behave intelligently with completely new, dramatically different flight and weapon characteristics.
Title: Re: Diaspora AI
Post by: Sushi on October 05, 2012, 11:00:34 pm
Diaspora AI is actually a very interesting story. I added a bunch of new features so the AI can take advantage of glide and sidethrust, for example... but if you turn all of these on, the AI becomes nearly impossible to beat. The raiders all use a dumbed-down version of the AI that does use the new features... but overall, very rarely.

Another thing we had to solve was that even with this, the AI was STILL too hard in some ways. Freespace AI has a bizarre concept of accuracy where how accurate the AI is depends mostly on how long the ship has been targeting you but completely ignores how evasive your flying is. The AI would literally pick a random point X meters off your port bow (that would result in a miss), then aim perfectly at that miss-spot as you dive and swoop to dodge. Your evasiveness simply didn't matter at all... and this could get very frustrating in Diaspora where a few seconds of sustained fire is enough to destroy any fighter.

By the way, the hardest AI in the game is actually found in the second training mission with the fight against Obit. Obit uses an AI class tuned for fighter dueling: it's easier to dodge (the AI has a higher "lag" compensating for its target changing velocity vectors) but is also much, much more aggressive, using glide and sidethrust to basically try to keep you in the gunsights as much as possible. The result, IMHO, is an AI opponent that really puts the pressure on and feels like a major threat.

I'll stop now, but this is something I put a lot of time and effort into over the course of Diaspora's development and can blabber on about all day given half a chance. :) If anyone is curious about the effects various AI.tbl and AI_Profiles.tbl settings will have on how the AI dogfights, I'd be happy to help.
Title: Re: Diaspora AI
Post by: karajorma on October 05, 2012, 11:41:42 pm
Yep, unlike the rest of the game, we didn't care if Obit was beatable on higher skill levels since it doesn't matter in the great scheme of things if he kills you (he's in a supposedly vastly superior CNP viper after all).
Title: Re: Diaspora AI
Post by: General Battuta on October 06, 2012, 12:30:28 am
Please blabber on about it for at least three more posts, I'm really fascinated by it.
Title: Re: Diaspora AI
Post by: MatthTheGeek on October 06, 2012, 02:43:53 am
By the way, the hardest AI in the game is actually found in the second training mission with the fight against Obit. Obit uses an AI class tuned for fighter dueling: it's easier to dodge (the AI has a higher "lag" compensating for its target changing velocity vectors) but is also much, much more aggressive, using glide and sidethrust to basically try to keep you in the gunsights as much as possible. The result, IMHO, is an AI opponent that really puts the pressure on and feels like a major threat.
Huh what ? I really felt Obit was definitely, moooost definitely easier to beat than your average raider, at least in Insane

That probably has something to do with the fact he was alone and wasn't trying to get me in a flak cloud though.
Title: Re: Diaspora AI
Post by: wistler on October 06, 2012, 03:58:57 am
So it isn't necessarily the case that FS AI is so unmatched for the player that you have to rely on large number of wings like retail. You could in fact allow the AI to pose a much more significant risk to player and allow just a few fighters to be a big challenge?

Is the option to allow the AI to use glide and the like present in BP2 AI? (if it isn't clear by now I know toot all about AI :-) )
Title: Re: Diaspora AI
Post by: General Battuta on October 06, 2012, 11:33:50 am
So it isn't necessarily the case that FS AI is so unmatched for the player that you have to rely on large number of wings like retail. You could in fact allow the AI to pose a much more significant risk to player and allow just a few fighters to be a big challenge?

http://www.hard-light.net/wiki/index.php/My_Brother,_My_Enemy

QuantumDelta can attest this is a pretty challenging fight and it's only 3v5.

Quote
Is the option to allow the AI to use glide and the like present in BP2 AI? (if it isn't clear by now I know toot all about AI :-) )

It's present and it works fine, but 'glide' is nowhere near as extensive as the high-speed, high-damp flight dynamics in Diaspora.

Title: Re: Diaspora AI
Post by: newman on October 06, 2012, 12:37:23 pm
You could in fact allow the AI to pose a much more significant risk to player and allow just a few fighters to be a big challenge?

I remember one mission Sushi's made that had you test out various AI classes, and I can tell you eve one on one can be a big challenge.
Title: Re: Diaspora AI
Post by: Sushi on October 06, 2012, 01:11:35 pm
By the way, the hardest AI in the game is actually found in the second training mission with the fight against Obit. Obit uses an AI class tuned for fighter dueling: it's easier to dodge (the AI has a higher "lag" compensating for its target changing velocity vectors) but is also much, much more aggressive, using glide and sidethrust to basically try to keep you in the gunsights as much as possible. The result, IMHO, is an AI opponent that really puts the pressure on and feels like a major threat.
Huh what ? I really felt Obit was definitely, moooost definitely easier to beat than your average raider, at least in Insane

That probably has something to do with the fact he was alone and wasn't trying to get me in a flak cloud though.

His aim is worse, but he flies much, much more aggressively. Or should, especially if you skip using missiles and dogfight like a real man. ;)

(IIRC, Obit starts with the same number of missiles as you, so if you use them all in the previous battle you can get a pure guns-only fight).

You could in fact allow the AI to pose a much more significant risk to player and allow just a few fighters to be a big challenge?

Absolutely. IMO the AI, when turned up to the max, is more than a match for most players in a 1v1.
Title: Re: Diaspora AI
Post by: Fury on October 06, 2012, 02:22:27 pm
I only wish there'd be alternative algorithm to be used for calculating AI accuracy. The retail method is way too weird and at times, troublesome.
Title: Re: Diaspora AI
Post by: General Battuta on October 06, 2012, 02:31:17 pm
Agreed. It's really disconcerting to watch how the AI behaves from its perspective in terms of missing and then hitting targets.
Title: Re: Diaspora AI
Post by: newman on October 06, 2012, 03:22:13 pm
I assume actually changing the retail method of determining AI accuracy would be problematic, to say the least? This isn't my area, I'm mainly curious if this is possible at all or one of those things you can't touch or it creates way more problems than it solves..
Title: Re: Diaspora AI
Post by: MatthTheGeek on October 06, 2012, 03:25:03 pm
It's been discussed before, and the thing is it's quite difficult to add new AI features without 1) change retail behaviour, or 2) creating a new AI branch, meaning double the maintaining effort for the coders.
Title: Re: Diaspora AI
Post by: newman on October 06, 2012, 03:29:01 pm
Yea didn't think of it that way, makes sense. Too bad V went that route.
Title: Re: Diaspora AI
Post by: Sushi on October 06, 2012, 05:04:16 pm
Use $Max Aim Update Delay. This IS an alternate accuracy system, and one that works a lot more believably than the regular accuracy. Up to you whether you want to use high "regular" accuracy in conjunction with it or not.

It's not perfect, but IMO it solves many of the major problems with default FSO accuracy. Especially if you want the AI to be great at hitting still/linear-motion targets, but have more trouble with ones flying curves (e.g. humans), it really makes that possible.