Stealth planet not attacking AI

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderator: Oberlus

Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Message
Author
UrshMost
Space Kraken
Posts: 123
Joined: Fri Jul 03, 2015 2:32 am
Location: Great White North Eh

Stealth planet not attacking AI

#1 Post by UrshMost »

hostile planet issue.jpg
hostile planet issue.jpg (163.26 KiB) Viewed 1984 times
The two AI ships have been sitting on the system Gimilzor for a couple of turns without taking any damage, but as soon as I move my fleet there the planet attacks both of us. Is there a reason why the planet hasn't attacked the AI fleet on previous turns?

I included a zip of the save game.

Build 2017-08-02
Attachments
stealth planet issue.zip
(665.27 KiB) Downloaded 108 times
Windows 10 64bit, AMD 8 Core, 16 GB
Nvidia GTX 670 @ 3240x1920
FreeOrion Build: Latest Windows Test Build

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Stealth planet not attacking AI

#2 Post by Dilvish »

UrshMost wrote:Is there a reason why the planet hasn't attacked the AI fleet on previous turns?
Yes, there is. Planets don't initiate combat, only aggressive fleets do, and only if they can see an enemy target.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

UrshMost
Space Kraken
Posts: 123
Joined: Fri Jul 03, 2015 2:32 am
Location: Great White North Eh

Re: Stealth planet not attacking AI

#3 Post by UrshMost »

Dilvish wrote:Yes, there is. Planets don't initiate combat, only aggressive fleets do, and only if they can see an enemy target.
So the AI must have set the green Entirety fleet to passive before it entered the system?

Is there any way to see the passive / aggressive setting for AI fleets?

Also, when my fleet (set to aggressive) does enter the system, the planet (stealth 65) attacks my fleet (detection strength 10) on the first turn and only then does my fleet detect it and the fleet won't attack the planet until the second turn.
Windows 10 64bit, AMD 8 Core, 16 GB
Nvidia GTX 670 @ 3240x1920
FreeOrion Build: Latest Windows Test Build

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Stealth planet not attacking AI

#4 Post by Dilvish »

UrshMost wrote:
Dilvish wrote:Yes, there is. Planets don't initiate combat, only aggressive fleets do, and only if they can see an enemy target.
So the AI must have set the green Entirety fleet to passive before it entered the system?
Eh? "and only if they can see an enemy target.". Do you have some reason to believe that Entirety can see the stealthed planet? (You can check their detection strength in their pedia listing). From what you described, it sounded very much like they cannot see the planet.
Is there any way to see the passive / aggressive setting for AI fleets?
I don't recall for sure, but in general you can expect that if the AI ship is armed then it is Aggressive.
Also, when my fleet (set to aggressive) does enter the system, the planet (stealth 65) attacks my fleet (detection strength 10) on the first turn and only then does my fleet detect it and the fleet won't attack the planet until the second turn.
Are you trying to say that combat was initiated when it should not have been, that it was only your fleet and the stealthed planet present but that combat started anyways? If the enemy fleet was also present and one of you was visible to the other then that's what triggered combat. If you are only asking about the stealthed planet's free shot, well that's how stealthed combat is supposed to work.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

UrshMost
Space Kraken
Posts: 123
Joined: Fri Jul 03, 2015 2:32 am
Location: Great White North Eh

Re: Stealth planet not attacking AI

#5 Post by UrshMost »

Dilvish wrote:If the enemy fleet was also present and one of you was visible to the other then that's what triggered combat.
That's the part that I didn't realise; that combat between two fleets would 'wake up' planetary defences that neither fleet could otherwise detect. Thanks.
Windows 10 64bit, AMD 8 Core, 16 GB
Nvidia GTX 670 @ 3240x1920
FreeOrion Build: Latest Windows Test Build

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Stealth planet not attacking AI

#6 Post by MatGB »

Dilvish wrote:
UrshMost wrote:
Is there any way to see the passive / aggressive setting for AI fleets?
I don't recall for sure, but in general you can expect that if the AI ship is armed then it is Aggressive.
You can do it, it's a pain and generally not worth it unless bug hunting (which in this case you sort of are even though there's no bug).

Objects/Filters, make it show fleets (not ships) and then select owner empire as this AI, go through them till you get to the right fleet, then right click on it in the Objects list and the option of a debug data dump is there. One of the things this will show is its aggression status (in the messwages window, turn that back on if it's off).

Aside: send in a cheap ship (an old scout will do) set to aggressive and combat will be initiated, the Lembala will likely take out one, possibly both, fleets. You can even do this if your ship is stealthed enough that neither of them can see it, that's a known issue that will get squashed at some point.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

UrshMost
Space Kraken
Posts: 123
Joined: Fri Jul 03, 2015 2:32 am
Location: Great White North Eh

Re: Stealth planet not attacking AI

#7 Post by UrshMost »

Objects/Filters, make it show fleets (not ships) and then select owner empire as this AI, go through them till you get to the right fleet, then right click on it in the Objects list and the option of a debug data dump is there. One of the things this will show is its aggression status (in the messwages window, turn that back on if it's off).
Cool! Thanks, I was close but was trying to find it in ships, not fleets, and I didn't know about the debug data dump feature.
Aside: send in a cheap ship (an old scout will do) set to aggressive and combat will be initiated, the Lembala will likely take out one, possibly both, fleets. You can even do this if your ship is stealthed enough that neither of them can see it, that's a known issue that will get squashed at some point.
Ah, in a similar vein I will send in a Mosquito class ship (small hull with a flak cannon) to keep large enemy fleets from repairing.
Windows 10 64bit, AMD 8 Core, 16 GB
Nvidia GTX 670 @ 3240x1920
FreeOrion Build: Latest Windows Test Build

ovarwa
Space Kraken
Posts: 122
Joined: Thu Dec 11, 2014 3:22 am

Re: Stealth planet not attacking AI

#8 Post by ovarwa »

Hi,

I think that repairs should occur every turn, regardless of whether combat occurred.

Thereby, we prevent silly exploits of this kind. We prevent the need for AI to deal with special cases. We eliminate code for the special case, because there is no special case.

Given that a turn represents a very long time, months or even years, and not the two minutes (or even the half hour) it takes to play, any arguments along the lines of "but it's not realistic" don't hold. Arguments along the lines of "but that makes repairs too good" also don't gain my sympathy: If it really makes that much of a difference, just raise the price or lower the repair rate.

I think that planets should fire on enemy ships regardless of whether they are aggressive. I think that planets should not lose their stealth level for doing so.

Thereby, we eliminate all strange cases about what a stealthed planet will actually do, and the need for the AI (or players! :( )to understand these weird corner cases. Oh, and odd exploits. Realism? If your stealth is good enough to hide an entire planet, orbital infrastructure and all, it's good enough to obscure exactly where an attack drone came from.

I think that 'fighters' should do the same thing every round. As I recall from the original design discussions, there aren't actually three rounds of combat: Ships do actually not fire each weapon three times over the course of 20 seconds. Three rounds are used for the sake of modeling, nothing more. So there's no reason to have fighters work differently from other weapons other than weird chrome that, once again, makes everything more difficult for no gain that I can see.

I think that ships should never attack a planet with normal weaponry while enemy ships remain in the system. This gets rid of the case where fighters (and eventually other ships that cannot attack planets) waste their attacks, which was the case when last I looked at the code. This also feels realistic: You cannot attack a planet until you own the air (ok, space.)

Note that target preference can actually be a weapon property. So maybe the giant core slot weapon targets the planet first, sort of the way a death star would, but the smallest fighter type (interceptors?) targets fighters first. This *does* create special cases, which players and the AI would have to understand. But it also differentiates weapon types beyond "how much damage does it do".

Of course... since I'm not actually implementing anything, 'we' doesn't really include me, and I recognize that my vote and preferences lack the weight of actual contributors'.

Anyway,

Ken

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Stealth planet not attacking AI

#9 Post by MatGB »

Hey Ken, I agree with or think it's worth considering most of what you wrote, but specifically not for repairs, the current mechanic with the 'none during combat' restriction was largely introduced by me and it adds a lot of extra strategy to the game
ovarwa wrote:I think that repairs should occur every turn, regardless of whether combat occurred.

Thereby, we prevent silly exploits of this kind. We prevent the need for AI to deal with special cases. We eliminate code for the special case, because there is no special case.

Given that a turn represents a very long time, months or even years, and not the two minutes (or even the half hour) it takes to play, any arguments along the lines of "but it's not realistic" don't hold. Arguments along the lines of "but that makes repairs too good" also don't gain my sympathy: If it really makes that much of a difference, just raise the price or lower the repair rate.
We actually lowered the repair rate at the same time and, barring a few tweaks for the techs and the introduction or damage control parts, I'm currently relatively happy with it.

Some of the repair techs/parts can be very powerful and all have been toned down, a specific objective of preventing most repair in a turn combat occurs is strategic/player orientated: if an enemy fleet just wins a fight against one of your fleets and you've got another fleet nearby or on the way, it gives you a chance to catch them and defeat them before repair happens, having repairs happen during combat turns meant you couldn't easily finish off a fleet if your forces had been divided and you'd lost a big chunk of your firepower.

This partially improves player experience in an ongoing fight, and also, very specifically, slows down the steamroller affect that can happen when a player is winning and can then easily push through and take more territory.

If you've had a very difficult fight attacking an enemy system and taken a LOT of damage, game balance needs opponents to be able to strike back at you before you cement the advantage if they're able.

Preventing repairs while in a system with enemy controlled planets is deliberate and desirable from a strategic and balance perspective. It's very unlikely to change back again, quite simply it makes the game better this way.

Having said that, damage control parts have been on the agenda for quite some time but no one has scripted them (I keep finding something more important to work on), and we do still allow the Logistics Facilitator flagship to do limited repairs on the turn of a fight, that's deliberate as it's a specific strength of that flagship hull, but it's massively limited when in combat compared to when not. I do hope we'll have a core slot part that allows some repair during fights, as well as internal parts that are less effective: if you dedicate part of your designs to having engineering teams then Mr Scott can keep your ship flying during a fight, you're sacrificing other abilities.

I also have zero problem with players making a strategic decision to sacrifice ships in order to keep enemy fleets on alert and unable to repair properly, if you need repairs withdraw from the frontline, it adds some choices otherwise lacking. I would like to see some mechanic that affects species happiness when ships die, tied to a happiness requirement for building ships, but that's a long way in the future.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
em3
Vacuum Dragon
Posts: 630
Joined: Sun Sep 25, 2011 2:51 pm

Re: Stealth planet not attacking AI

#10 Post by em3 »

A alternative, albeit not less complex, solution would be to prevent repairs on turns that a ship was shot at (or has fired). This would require some changes in the engine (to tag ships with this information and remove the tags before next combat phase, and to expuse such tags to content scripts).
https://github.com/mmoderau
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556

ovarwa
Space Kraken
Posts: 122
Joined: Thu Dec 11, 2014 3:22 am

Re: Stealth planet not attacking AI

#11 Post by ovarwa »

The alternative that I'd recommend is that a ship does not repair on a turn it takes damage.

That provides the desired effect of a fleet not being able to recover instantly after a massive battle.

It also provides a (rare for FO) benefit for deploying more rather than larger ships.

It also eliminates the weirdness of "oh no, a tiny scout with a water pistol entered the system, and my fleet of 100 dreadnoughts has been thrown into confusion."

---

OTOH, although I have far less FO experience than you, I found that the main outcome of this rule is more MM, as I continually went through fleet lists to move wounded ships back one system to repair, and then forward again.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Stealth planet not attacking AI

#12 Post by Vezzra »

ovarwa wrote:OTOH, although I have far less FO experience than you, I found that the main outcome of this rule is more MM, as I continually went through fleet lists to move wounded ships back one system to repair, and then forward again.
Agreed, that is a very strong reason to fix this issue.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Stealth planet not attacking AI

#13 Post by MatGB »

I fundamentally disagree that it's micromanagement.

In any game or simulation where you're in strategic control of forces, withdrawing damaged/wounded forces for heal/repair is part of strategy, taking out dealing with damaged ships is taking out a strategic element. In history, badly damaged units have to withdraw for repairs or leave the frontline to recover in every period/theatre I've studied, if you don't have that sort of element you don't have a strategy game. Sometimes a unit withdrawn is out for so long the war is over before they're ready to redeploy, that's also part of the game and part of strategy (famously, Picket's division at Gettysburg took so much damage that they were never ready to redeploy, various other battleships, etc. My grandfather's destroyer in WW2 spent half the war in drydock: a step up from the others in its class which were all destroyed)

Improving the way it's dealt with by the UI is something we ought to consider, I personally find the 'merge all, split damaged, split by type' mechanics perfectly adequate but if others think that's not enough then improvements should be made, but damage is part of a strategic wargame, repairs are part of a strategic wargame.

Micromanagement is having to build every single building in every single settlement and then rebuilding them when they're damaged, not strategic command of forces.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Stealth planet not attacking AI

#14 Post by Vezzra »

MatGB wrote:In any game or simulation where you're in strategic control of forces, withdrawing damaged/wounded forces for heal/repair is part of strategy, taking out dealing with damaged ships is taking out a strategic element...
Of course, agreed. What I've been referring to is if you have to go through all that "damaged ship management" always and everywhere, because an enemy can disrupt your ships getting repaired just by sending a measly cannon fodder ship each turn. That's not fun anymore, but just plain annoying.

When you're confident that an enemy you just defeated has no significant forces with which they can launch a counter-attack, keeping your damaged ships on the front line and not having to send them back one system to ensure undisturbed repairs should be a viable option. The strategic considerations you're referring to should only come into play when there is a potential threat, not when all there is to worry about are some leftover scouts.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Stealth planet not attacking AI

#15 Post by MatGB »

Oh, yes, I'd be very happy if, say, you were to code up a FOCs trigger for actually shot at: we could use it for troop regeneration as well, that a system of yours can't replenish because your fleet is blockading an enemy planet in the same system is equally "huh?": I'm fine that their planet can't, that makes sense and is balanced, but your not attacked planets should.

Same for scouts/cheap fodder ships, etc. But I don't want to return to ships that've been fighting also generally repairing, with exceptions based on parts or flagship abilities, just a simple tech shouldn't work in a combat situation, it takes the strategy out.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Post Reply