SVN 6497 + AI Invasion

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.
Post Reply
Message
Author
wobbly
Cosmic Dragon
Posts: 1937
Joined: Thu Oct 10, 2013 6:48 pm

SVN 6497 + AI Invasion

#1 Post by wobbly »

Playing SVN 6497 with the AI-Invasion changes Dilvish posted in another thread( I just un-zip them over the old files in the AI directory, Have I got that right? or have I broken something there?). 20 AIs, 300 systems, Human species, maniacal, all else default.

Apologises in advance if any of the following comments sounds critical, for the most the AI has been better then I've seen in a lot of other games. Started with a Laenfa system (Throne of heaven) right next to me, just out of my detection range. So they should be able to see me, I can't see them. Out of curiousity I left my home system unguarded. About 10 turns later they send in a ship bombard me once then leave. A couple of turns later the ship returns, This time it stays a round, I got bored & blew it up so don't know what it would of done next. It does seem like I don't actually have to build defenses. Maybe eventually they would of invaded, I don't know.

On turn 20 I decided to take their planet but couldn't due to it stealth, even if I park a scout in the system (working as intended?). I notice everytime they build a ship (it seemed to want to spam scouts?? not warships), my ship would suddenly fight the planet defense system. It plays a little strange that I can combat their defense system then a turn later not know where the planet is. Incidently 1 of the AIs was having a similar problem on a neighbouring system. It camped a troop ship in the system, couldn't see it to invade, so got stuck.

AI seems to want to build undefended colonies behind enemy lines. That's a free colony to me. I can park an attack ship on it before it's defense reaches 2. AI camps colony ships & scout ships where I can see them. A single-gun small hull ship can go crazy. I assume that's a hard one to fix well. A bigger problem is a colony ship survived, then sat there next round to takes some more. AI ignores my scouts/colony ships if I do the same.

Anyways hope some of that is useful to you. Sorry if it was a post full of criticisms. Let me know if I just messed up when I added the AI changes & I'll reinstall & try it again.

Almost forgot. The default green for the player & one of the greens for the AI. I can tell them apart on the drop down box, but not on the supply lines & ship markers. It's not too bad if I change my colour to something else, but perhaps the 2 are a little close.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: SVN 6497 + AI Invasion

#2 Post by Geoff the Medio »

I think Dilvish likes to get saves demonstrating strange / problematic AI behaviour. With just vague descriptions of what happened, there's not much to work with for testing / improving scripts.

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

Re: SVN 6497 + AI Invasion

#3 Post by MatGB »

wobbly wrote: On turn 20 I decided to take their planet but couldn't due to it stealth, even if I park a scout in the system (working as intended?). I notice everytime they build a ship (it seemed to want to spam scouts?? not warships), my ship would suddenly fight the planet defense system. It plays a little strange that I can combat their defense system then a turn later not know where the planet is. Incidently 1 of the AIs was having a similar problem on a neighbouring system. It camped a troop ship in the system, couldn't see it to invade, so got stuck.
Before turn 20, I rarely build warships, the odds of having the tech to build anything at all useful is so small as to be non existent, possible exception of Eaxaw but the cost/benefit of basic hull ships would be marginal at best, even for them. So yeah, I'd be building scouts then as well, and pretty sure the AI is set to spam scouts out for some time in the early period (I build troop ships as well if there are nearby easy pickings).

But yes, working as intended, Laenfa get a huge stealth bonus but don't really have much going for them, you need Neutron Scanners to be able to invade a Laenfa colony world as you can't see them to get to them-I agree it's a bit daft that they shoot you sometimes, but that's not a major issue really, if you ever read any milSF that's attempting any realism in space combat it'd be fairly easy to explain that away (TV shows don't do realism in space, at all).

I've never noticed an AI have a massive problem with stealthed targets but they do (still) do daft things on increasingly rare occasions.
AI seems to want to build undefended colonies behind enemy lines. That's a free colony to me. I can park an attack ship on it before it's defense reaches 2. AI camps colony ships & scout ships where I can see them. A single-gun small hull ship can go crazy. I assume that's a hard one to fix well. A bigger problem is a colony ship survived, then sat there next round to takes some more. AI ignores my scouts/colony ships if I do the same.
Yeah, that happened to me in my game yesterday, but it's newish behaviour from what I've seen, I think in the early game they just go and grab the best slot they can find (which, frankly, is what I do too), but defending in the very early game is hard-frankly retaking a lost world is easier later when it's more developed if it does happen, your homeworld outproduces colonies for quite a long time.
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
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: SVN 6497 + AI Invasion

#4 Post by Dilvish »

I can give responses to some of that, but like Geoff mentions, for anything I'm not already aware of it's hard to do much without a saved game or at the least an excellently detailed description. But some of this I am already aware of, so--

The AI still has lots and lots of room for improvement. It is not currently geared towards dealing with a start in which it's extremely close to another capitol. I do currently force it to spam/build a number of scouts to begin with since I hadn't been content with how my overall priority approach was working for scouting at the start of the game, but I just now made a little tweak to give it a some more flexibility in those cases it can see an invadable planet right from the start. More flexibility than that for the starting sequence is going to be down the road somewhere. I don't know how long you waited to see if an invasion was coming, but I expect that the initial set of scouts is what delayed the AI form invading you, or else it was pursuing something else that you didn't see.
On turn 20 I decided to take their planet but couldn't due to it stealth, even if I park a scout in the system (working as intended?).
that sounds working as intended -- it takes a fairly high detection before you can invade Laenfa.
I notice everytime they build a ship (it seemed to want to spam scouts?? not warships),
seems odd it would be doing that at turn 20, but without a saved game to check I can't say much about it.
my ship would suddenly fight the planet defense system. It plays a little strange that I can combat their defense system then a turn later not know where the planet is.
When they had a ship present they initiated combat & once they fire on you then you can see them for the duration of combat.
Incidently 1 of the AIs was having a similar problem on a neighbouring system. It camped a troop ship in the system, couldn't see it to invade, so got stuck.
The AI shouldn't be sending troop ships to planets it doesn't have good enough detection for, though if it was observing the planet at the moment it was colonized it might temporarily think it could invade it, but then upon discovering it couldn't the troop ship would wait around until the AI found a different target to invade.
AI camps colony ships & scout ships where I can see them. A single-gun small hull ship can go crazy.
The AI currently has very limited coding geared towards retreats of any kind. I don't know that it would be super hard, but I haven't gotten to it yet.

**edit -- attached the newly revised AI production file in case someone without SVN wants to test it (unzip it, drop it into default/AI).
Attachments
ProductionAI.py.zip
(18.41 KiB) Downloaded 47 times
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

wobbly
Cosmic Dragon
Posts: 1937
Joined: Thu Oct 10, 2013 6:48 pm

Re: SVN 6497 + AI Invasion

#5 Post by wobbly »

Dilvish wrote: I do currently force it to spam/build a number of scouts to begin with since I hadn't been content with how my overall priority approach was working for scouting at the start of the game, but I just now made a little tweak to give it a some more flexibility in those cases it can see an invadable planet right from the start.
Is it counting it's current no. of scouts in the decision process? Could the fact that I hunt them down be throwing it? One of the troubles is the AI builds multiple scouts, I build 1 anti-scout vessel.
Dilvish wrote:
I notice everytime they build a ship (it seemed to want to spam scouts?? not warships),
seems odd it would be doing that at turn 20, but without a saved game to check I can't say much about it.
Unfortunately I've lost most of my saves. I'll turn up the no. of autosaves it keeps. Maybe this save will help. I'd just hit end turn around 20 times with a fleet sitting at the homeworld on Rossi. I've just destroyed another scout. The homeworld has produced only scouts in the time I've sat there. You can see the AI troop ships sitting at Arneb & an undefended colony of mine at Leporis. The troop ships originally arrived with the Griffon (should that be Gryphon? like the mythical creature?) now sitting at Alathar destroying a scout & a troop ship of mine.

Just to check my install is correct. I used the full install located here:
viewtopic.php?f=2&t=4208&start=180
I installed over an old installation if it makes a difference. I unziped the AI Invasion into the AI folder, saying yes to any overwrites. Windows 7 64-bit. Displays as v0.4.3+ [SVN 6497] MSVC 2010 in-game.
Attachments
FreeOrion_Human_Player_Terran_0049_20131107_054845.zip
(601.34 KiB) Downloaded 40 times

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

Re: SVN 6497 + AI Invasion

#6 Post by Dilvish »

wobbly wrote:Is it counting it's current no. of scouts in the decision process? Could the fact that I hunt them down be throwing it? One of the troubles is the AI builds multiple scouts, I build 1 anti-scout vessel.
It does count the number of scouts it has & calculates a target number to have, depending on various factors, but even with only having zero scouts it shouldn't normally get caught up only building scouts (but it could wind up doing so because of a fluke of random rolls). I'll take a look at the saved game.
...the Griffon (should that be Gryphon?
There are multiple variants of the spelling for that. But to make things easier on our translators perhaps I should change it to one of the unambiguous variants.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

wobbly
Cosmic Dragon
Posts: 1937
Joined: Thu Oct 10, 2013 6:48 pm

Re: SVN 6497 + AI Invasion

#7 Post by wobbly »

Dilvish wrote:
AI camps colony ships & scout ships where I can see them. A single-gun small hull ship can go crazy.
The AI currently has very limited coding geared towards retreats of any kind. I don't know that it would be super hard, but I haven't gotten to it yet.
Possibly even a simple stop-gap might help here: check if sighted armed fleet within 1 turn move of unarmed fleet, if so move.
Currently I'm plucking out the AIs eyes, so to speak. It's hard to know without understanding the exact mechanic, but it sounds to me like if the AI tries to maintain x no. of scouts & I kill all scouts I see then it's going to end up wasting a lot of production. When I get some time I might play 2 parallel runs on the same system, 1 where I allow them scouts & 1 where I destroy them all. Kinda see how much of a difference it actually makes.

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

Re: SVN 6497 + AI Invasion

#8 Post by Dilvish »

I checked out that saved game. What you experienced was because of the initial scouts put into the AI build queue, plus that fact that your homeworlds were immediately next to each other. The AI started making warships a few turns later. Whenever two empires start out right next to each other, it's likely to turn out very good for whichever gets the upper hand first, and terrible for the other. It'll be a fair while before I put much time into improving AI strategy for that case.

As for your other question about scout production, it does not absolutely maintain a given number of scouts; it tries to balance that & its perceived need for military ships. There is some susceptibility to a string of odd rolls from the number generator though.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply