Author Topic: Update on Progress  (Read 252712 times)

0 Members and 1 Guest are viewing this topic.

Offline Barkhorn

  • Commodore
  • **********
  • B
  • Posts: 719
  • Thanked: 133 times
Re: Update on Progress
« Reply #195 on: March 18, 2019, 03:20:13 PM »
Quick question/suggestion about firing decisions:
Currently in VB6, the AI will waste ammo like crazy.  In my first ever battle against an NPR, they spammed hundreds of AMM's at a single sensor buoy.  I can see using a little overkill to guarantee success, but this feels excessive.  Will C# AI be more intelligent in this regard?

 

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: Update on Progress
« Reply #196 on: March 18, 2019, 06:24:43 PM »
Quick question/suggestion about firing decisions:
Currently in VB6, the AI will waste ammo like crazy.  In my first ever battle against an NPR, they spammed hundreds of AMM's at a single sensor buoy.  I can see using a little overkill to guarantee success, but this feels excessive.  Will C# AI be more intelligent in this regard?

Yes, the AI should be better at conserving ammo.
 
The following users thanked this post: JacenHan, Barkhorn, Jovus

Offline MarcAFK

  • Vice Admiral
  • **********
  • Posts: 2005
  • Thanked: 134 times
  • ...it's so simple an idiot could have devised it..
Re: Update on Progress
« Reply #197 on: March 18, 2019, 08:31:56 PM »
Sounds like a massive understatement :p
" Why is this godforsaken hellhole worth dying for? "
". . .  We know nothing about them, their language, their history or what they look like.  But we can assume this.  They stand for everything we don't stand for.  Also they told me you guys look like dorks. "
"Stop exploding, you cowards.  "
 
The following users thanked this post: Mastik

Offline sloanjh

  • Global Moderator
  • Admiral of the Fleet
  • *****
  • Posts: 2805
  • Thanked: 112 times
  • 2020 Supporter 2020 Supporter : Donate for 2020
    2021 Supporter 2021 Supporter : Donate for 2021
Re: Update on Progress
« Reply #198 on: March 19, 2019, 07:59:15 AM »
A thought:  Are you thinking of putting in an "inertia" term into the AI decision making, that cause it to prefer to continue with whatever course of action it's currently engaged in?  So if it's in "run away" mode and the situation changes to be more in the AI's favor (say it gets a lucky hit and kills an attacker) it will need a bigger advantage to break out of "run away" mode than if it were in say "attack" mode.

It occurs to be that there's probably a failure mode in AI where the decision weights are roughly equal and the AI keeps reversing itself in a short period of time, that this might make the AI more susceptible to manipulation/exploit by the player, and that an inertia term might fix that.  In addition, I suspect it represents actual human psychology: it's (probably) more difficult to rally routed troops than to keep them from routing in the first place.

John
 

Offline TCD

  • Lt. Commander
  • ********
  • T
  • Posts: 229
  • Thanked: 16 times
Re: Update on Progress
« Reply #199 on: March 19, 2019, 08:37:39 AM »
A thought:  Are you thinking of putting in an "inertia" term into the AI decision making, that cause it to prefer to continue with whatever course of action it's currently engaged in?  So if it's in "run away" mode and the situation changes to be more in the AI's favor (say it gets a lucky hit and kills an attacker) it will need a bigger advantage to break out of "run away" mode than if it were in say "attack" mode.

It occurs to be that there's probably a failure mode in AI where the decision weights are roughly equal and the AI keeps reversing itself in a short period of time, that this might make the AI more susceptible to manipulation/exploit by the player, and that an inertia term might fix that.  In addition, I suspect it represents actual human psychology: it's (probably) more difficult to rally routed troops than to keep them from routing in the first place.

John
Presumably the downside of that is in the reverse situation where the AI is attacking, suffers a setback and instead of sensibly withdrawing continues on to pointlessly die? Admittedly you may say that is human psychology as well and certainly has some historical precedents. Bu an AI which is better able to make a "tactical withdrawal" is a better AI in my view.
 

Offline Barkhorn

  • Commodore
  • **********
  • B
  • Posts: 719
  • Thanked: 133 times
Re: Update on Progress
« Reply #200 on: March 19, 2019, 10:55:22 AM »
It should be tonnage or HTK-based.  Losing one fighter out of a wing of 5 is a huge loss.  Losing one fighter in a wing of 500 is no big deal.  Likewise losing a battleship should be scarier than losing a destroyer.
 

Offline JustAnotherDude

  • Sub-Lieutenant
  • ******
  • J
  • Posts: 114
  • Thanked: 56 times
Re: Update on Progress
« Reply #201 on: March 19, 2019, 10:57:05 AM »
I can only imagine Steve already plans for the tactical A.I to scale according to the size of its fleets, tonnage included.
 

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: Update on Progress
« Reply #202 on: March 19, 2019, 12:29:57 PM »
It should be tonnage or HTK-based.  Losing one fighter out of a wing of 5 is a huge loss.  Losing one fighter in a wing of 500 is no big deal.  Likewise losing a battleship should be scarier than losing a destroyer.

I've set it up so the AI analysis of the 'threat' of a hostile ship is an independent function, which is influenced by the situation and its knowledge of the ship. This function will be called when required by other parts of the code. The AI will track the capability of different ships using an internal version of the intelligence window. For example, assume a player TG of four ships of different classes. The AI has previously observed all four classes in action and knows the respective armaments are 10cm lasers, 25cm lasers, size 5 missile launchers and AMM launchers. The AI will radically change the different threat levels posed by those ships depending on the range.

In general, at 20m kilometers, the AI will take out your missile ship first, at 200,000 km it will probably take out the 25cm laser ships and at 20,000 km the 10cm laser ship will be the priority target, etc. The priority of secondary targets will also depend on the range. In some situations at longer ranges, the AI might instead decide to eliminate the escorts first. There are other considerations as well, such as speed and sensor capability, but I don't want to give too much away :)

I can add to the intelligence of this 'threat' function over time without it affecting other parts of the code (except for returning a 'smarter' decision).

All of this is still relatively early, so the results of play testing should improve the AI considerably. With the speed and flexibility of C# I have a lot more scope to improve the AI compared to VB6.
 
The following users thanked this post: Garfunkel, CheaterEater, Scandinavian, bro918, Up_down66, Rye123, King-Salomon, Stryker

Offline TMaekler

  • Vice Admiral
  • **********
  • Posts: 1112
  • Thanked: 298 times
Re: Update on Progress
« Reply #203 on: March 20, 2019, 07:07:07 AM »
A thought:  Are you thinking of putting in an "inertia" term into the AI decision making, that cause it to prefer to continue with whatever course of action it's currently engaged in?  So if it's in "run away" mode and the situation changes to be more in the AI's favor (say it gets a lucky hit and kills an attacker) it will need a bigger advantage to break out of "run away" mode than if it were in say "attack" mode.

It occurs to be that there's probably a failure mode in AI where the decision weights are roughly equal and the AI keeps reversing itself in a short period of time, that this might make the AI more susceptible to manipulation/exploit by the player, and that an inertia term might fix that.  In addition, I suspect it represents actual human psychology: it's (probably) more difficult to rally routed troops than to keep them from routing in the first place.

John
Such a system could be used to simulate battle experience. A well experienced battle commander might spot tactical problems easier compared to a newbie. So maybe such a system could be added into an experience system for AI Generals?!?
 

Offline sloanjh

  • Global Moderator
  • Admiral of the Fleet
  • *****
  • Posts: 2805
  • Thanked: 112 times
  • 2020 Supporter 2020 Supporter : Donate for 2020
    2021 Supporter 2021 Supporter : Donate for 2021
Re: Update on Progress
« Reply #204 on: March 20, 2019, 08:41:45 AM »
Presumably the downside of that is in the reverse situation where the AI is attacking, suffers a setback and instead of sensibly withdrawing continues on to pointlessly die? Admittedly you may say that is human psychology as well and certainly has some historical precedents. Bu an AI which is better able to make a "tactical withdrawal" is a better AI in my view.

I didn't say (or intend) that it necessarily be a big factor :)  I was more thinking of a small term to stabilize a potential AI instability.

John
 

Offline ardem

  • Rear Admiral
  • **********
  • a
  • Posts: 814
  • Thanked: 44 times
Re: Update on Progress
« Reply #205 on: March 20, 2019, 06:34:00 PM »
A small amount of randomness should be added. For example, there whould be the perfect tactical AI response like described above, then there should be a randomness of less choices, to humanise the AI.

Else it could be gamed if the human player know exactly how the AI will always respond. Example of a bove I put 10 escort to 1 missile ship and seperate this from a group of laser boats, I keep the missile  boat at range and it waste it own missile on the escorts that knock out all the missiles. Without fear I rush my laser boats in knowing they only need to stay alive a small amount of time.

Randomness would on occassion spit out missile at these laser boats instead of the missile cruiser, just to keep the player honest and not always know the AI tactics. I find randomness the real humaniser in AI strategies. Its not always effective, sometime it the worst decision, however it cannot be gamed as easily as a AI that subscribes to the same tactics over and over again.
 

Offline MarcAFK

  • Vice Admiral
  • **********
  • Posts: 2005
  • Thanked: 134 times
  • ...it's so simple an idiot could have devised it..
Re: Update on Progress
« Reply #206 on: March 21, 2019, 01:03:49 AM »
That stuff could be handled by the traits of the Commander in overall charge of the ship or task group, or the traits of the race, randomness is good and prevents too easily being able to exploit the AI, but some of those factors could be dependant on those other factors.
Eventually anyway, if more complexity is desired :p
" Why is this godforsaken hellhole worth dying for? "
". . .  We know nothing about them, their language, their history or what they look like.  But we can assume this.  They stand for everything we don't stand for.  Also they told me you guys look like dorks. "
"Stop exploding, you cowards.  "
 

Offline Garfunkel

  • Registered
  • Admiral of the Fleet
  • ***********
  • Posts: 2781
  • Thanked: 1048 times
Re: Update on Progress
« Reply #207 on: March 21, 2019, 12:56:17 PM »
Randomness comes from the fact that the AI "player" will only rarely have perfect information regarding human player's ships. If you don't know the armament of two-thirds of the ships you've spotted coming your way, you cannot make well-informed targeting decisions. There probably is no need for further random element just for the rake of randomness, especially since the combat/fleet AI will also be restricted due to the new high-level, Empire AI.
 

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11649
  • Thanked: 20349 times
Re: Update on Progress
« Reply #208 on: March 21, 2019, 03:15:03 PM »
As left the action, the AI had fired on a player ship. The target was destroyed. A few months later, a new player force turns up to seek revenge. The AI detects four ships, decides it has the advantage with its own four ships and moves out from the system population to attack. As the player force approaches, a further three ships, smaller than the first four, are detected. The AI re-evaluates the situation and decides to retreat to the safety of the population defences.

This is the first example of new combat behaviour for the AI.

BTW this is happening in a new campaign, not the Cold Sun campaign. I started again with a single player race to speed things up. I'll post some reports in the next day or two.
« Last Edit: March 22, 2019, 03:49:45 AM by Steve Walmsley »
 

Offline ardem

  • Rear Admiral
  • **********
  • a
  • Posts: 814
  • Thanked: 44 times
Re: Update on Progress
« Reply #209 on: March 21, 2019, 11:03:03 PM »
AWESOOOOMMMMEEEEEE.

Keep up the great progress