AI battle calculation

AI battle calculation?; support/discussion/questions

Moderator: thunderchero

Post Reply
User avatar
ISS_Voyager
Cadet 3rd Year
Cadet 3rd Year
Posts: 13
Joined: Thu Jul 17, 2008 2:00 am
Location: California, USA

AI battle calculation

Post by ISS_Voyager »

ISS Voyager here -

In building a mod, I have encountered an unexpected issue - the AI (Artificial Idiot) is not responding as I intended.

Ultimately, I have several questions as to how the AI calculates its next tactical move. I have so far been using DCER's Ultimate Editor and have been doing a little newbie Hex-editing.

1.
What starship elements are considered by the AI in battle?
(Shield HP? Shield Recharge Rate? Hull HP? Weapons Qty? Total weapon output? Defense? Etc....)

2.
What starship elements are NOT considered by the AI in battle?

3.
When using DCER's UE, one of the values on the Edit>Ships>Ship Stats screen is called "Defense." A. What does this mean? B. How specifically does the AI respond to this value?

4.
When the player does NOT have a Science Vessel (Scout) present in battle, the only pieces of information about the enemy vessels known to the player is their Shield Strength / Max Shield Strength.
Is this also true for the AI?
If so, does the AI then make calculations based purely on their opponents' shield strength?


====
[All philosophies about balancing aside....] If I wanted to create a "space invaders" environment - where a few really expensive cruisers grind the evil invading hordes into dust - how can I entice the AI to attack aggressively as they do normally (unmodded BOTF)?

Consider this example: In a battle where a battlegroup of 4 Ambassadors faced an AI Ferengi Armada of 109 command ships, the AI retreated on the first turn.

Modifications to the Ambassador:
Number of Beams: 12
Beam Damage: 55
Number of Torpedoes: 8
Torpedo Damage: 90
Shield Recharge: 400
Shield Strength: 2000
Hull Strength: 1000
(All ships) Build cost / Maintenance cost at 10%

While improved, the Ambassador's attack strength does not exceed that of any dreadnought. Note the ratio between attack and shielded defense is 1380 / 2000 = 0.69. So.... While 109 Goronts clearly possess a tremendous level of firepower, I'm betting they only judged the enemy based on shield strength; and in seeing the Ambassadors' 2000 shield HPs, they freaked and forgot about their vastly superior levels of firepower.


====
Any formula information about the AI's calculations in battle would be really REALLY helpful. Thanks for your help.


P.S. Did the forum blow up or something? I was here a long time ago and found none of my old posts... or my profile, for that matter...
hehehe... was still working this same mod back then, and was pestering DCER all over the place about buildings and planets and .... {trails off}
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Post by Spocks-cuddly-tribble »

I'm afraid that's not investigated yet. Perhaps because there's a strong random influence. So it's possible the AI retreated against a weaker enemy or attacks a stronger. And oftentimes changes not related settings (F1 map raiding, previous battles...) the AI combat behave.
Maybe Gowron can tell you more.

For Defense read this topic:
viewtopic.php?name=Forums&file=viewtopic&t=75
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
ISS_Voyager
Cadet 3rd Year
Cadet 3rd Year
Posts: 13
Joined: Thu Jul 17, 2008 2:00 am
Location: California, USA

Post by ISS_Voyager »

Ok - Thanks. I'll experiment a little and post whatever I find...
User avatar
ISS_Voyager
Cadet 3rd Year
Cadet 3rd Year
Posts: 13
Joined: Thu Jul 17, 2008 2:00 am
Location: California, USA

Post by ISS_Voyager »

EPIC BUMP

//
//
//

Have there been any developments on this subject??
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Post by Spocks-cuddly-tribble »

No(afaik), but presence of at least a weak ship triggers AI (oftentimes) to fight against a superior fleet.

So the (theoretical) possibility to destroy at least one ship seems to have an influence.

On the other hand sometimes single AI ships attack without the possibility(firepower) to damage even the weakest enemy ship.

Maybe there is also a set of behavior "agendas" like for fleet buildup.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
ISS_Voyager
Cadet 3rd Year
Cadet 3rd Year
Posts: 13
Joined: Thu Jul 17, 2008 2:00 am
Location: California, USA

Post by ISS_Voyager »

I ran a quick experiment. Using a vanilla version of BOTF, I edited the stats of one ship, the Oberth Class, and took note of how the AI responded.

The first trial was as follows:
Oberth Stats:
Beam Weapons: 1
Beam Damage: 1
Torpedoes: 1
Torpedoe Damage: 1
Shield Recharge: 1
Shield Strength: 1
Hull Strength: 1
Defense: 1
Shield Level: 999999

How did the AI respond? A group of 18 Klingon Command ships found the science vessel and bolted on the first turn. On each trial, a single value was set to "infinity" (not really... 99999) while all others were set to 1. This was done for each starship value. The overall results were roughly in accordance to Spocks-cuddly-tribble's general idea:

If the enemy could destroy an opponent vessel, it would stick around to do so. If not, it would bolt. However, the enemy's numbers were not a factor. In other words, the enemy reponded regardless of the size of their force; weather they had 1 or 100 ships, when they ran, they ran; and when they fought, they fought.

In each case, the enemy's decisions made sense; no matter how over/underpowered the modded ships were.

At the very very very very least, we have learned this:

The AI factors ALL of an opponent's ships' stats into its decision, including the values that are "invisible" (agility, shield level, weapon accuracy, etc.)
Post Reply

Return to “AI battle calculation?”