AI - Honeycomb special

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
AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

AI - Honeycomb special

#1 Post by AndrewW »

Just had a game where I had colonized a planet with the honeycomb special. The AI managed to capture it for a bit. When I recaptured it noticed the focus was set to research?

Is the AI not taking into account the Honeycomb special?

User avatar
Kassiopeija
Dyson Forest
Posts: 212
Joined: Wed Jul 16, 2014 6:14 pm
Location: Black Forest

Re: AI - Honeycomb special

#2 Post by Kassiopeija »

The AI does all sorts of strange things when it comes to planetary focus and I think someone should probably take some time and look into the code to see if anything is conflicted.

In testgames during the last 2 weeks I've seen this:

1. Focus is alternated between production & research every turn. Result: Planet gains +1 in one stat while loosing -2 in the other, resulting in a net -1 as long as he keeps doing this.

2. Gas Giant Generator or Colonized Asteroid is present but focus is on research.

3. Weak research race but focus on research on most planets. Example from last week: Egassem with 3 planets total at turn 150, all at research, total research below 10... yeah I know less tolerant planet species but how about going full bonkers on prod, outposting everything and thus, getting range to get new planets.. this is exactly how you play Egassem but I assume the problem is that there's just one AI and not one for each race.

4. Planets are set to defense (because, I assume, supply disconnected) but the planet never got bombarded (I simply have sjips at my own planet nearby to protect these) so the AI looses a ton of research. Alternatively, planets aren't set to defense once a bombardement took place (it should be, because increased defense regen might destroy attackers waiting for the arrival of invaders)

5. I've never seen the AI use the logistics setting even in circumstances where he was bottlenecked at the corner of the galaxy.

My personal advice would be that
- planets in systems with GGG or col Asteroids should be set always to prod because the net amount will be greater than the penalty.
- Go defensive only if someone is clearly hostile or offensive. The tradeoff of losing prod or even research is not much worth if raising troopships is so cheap esp. now with the new increased troop mod
- AI needs to use any specials without any exceptions (I forgot to add this, but Ive seen alot of planets not careing for sepcials at all)
- Don't shift focus. Examinate what's most efficient - either research, prod or log- and stay with it until the situation changed dramatically.
- If planet doesn't have any prod bonuses and race is either gifted or equal in research to production then focus researc, otherwise go production. This basically affects only Egassem, and NO, don't set their HW to research because it will only be 6,5 (!!!)

I'm sure i've forgotten some stuff^^ sorry^^

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

Re: AI - Honeycomb special

#3 Post by Dilvish »

AndrewW wrote:Is the AI not taking into account the Honeycomb special?
It was, at least partly-- it seems I had overlooked that the Honeycomb planet had to be set to Industry focus to get the benefit; that is now fixed.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: AI - Honeycomb special

#4 Post by Dilvish »

Kassiopeija wrote:1. Focus is alternated between production & research every turn. Result: Planet gains +1 in one stat while loosing -2 in the other, resulting in a net -1 as long as he keeps doing this.
AI's will only flip like that when they are at or very near their industry max and they are valuing the research enough to make it worth it. In some cases it is absolutely worth it for a player to swap 3 Industry for 1 research. (*See below re Egassem.) They won't do it if they have Force Energy Structures or if their aggression is below Aggressive.
2. Gas Giant Generator or Colonized Asteroid is present but focus is on research.
Yes, so? I do then when I need more research, as does the AI-- it's all a relative balance. The AI certainly is not ignoring the extra Industry target from Gas Giants and Asteroids.
3. Weak research race but focus on research on most planets.
I haven't coded up a special strategy for lousy researchers; when deciding whether to do research or industry on a planet they don't care why they are getting good or bad industry or research, they just care what the potential targets are. Like any AI they will try to get some research done, but if it gets too expensive relative to the industry they could be generating, they'll just do industry. Reviewing the Egassem starting setting for their capitals, as you noted below, I did see that it was not always kicking in where I expected, and found a bug with the code, which is now fixed. So, thanks for raising some alarm on them setting their capital to Research off the bat.
4. Planets are set to defense (because, I assume, supply disconnected) but the planet never got bombarded (I simply have sjips at my own planet nearby to protect these) so the AI looses a ton of research.
The AI pays attention to how much research or industry they could get, and is a bit conservative with defense, so it won't even use it at all if there is 'tons' of research or industry to be lost. But if it doesn't have much industry or research there, it's not about to gamble on your intentions for your nearby ships.
Alternatively, planets aren't set to defense once a bombardement took place (it should be, because increased defense regen might destroy attackers waiting for the arrival of invaders)
The AI pays close attention to what it's defense regen could be and what the attackers shields are, and whether it has a surplus of troops that it would lose if it dropped defense mode. I'm pretty confident it's not losing out on anything there. If you think it is sometime, then document it very carefully with screenshots & I'll see if there is some more fine tuning to be done.
5. I've never seen the AI use the logistics setting even in circumstances where he was bottlenecked at the corner of the galaxy.
Right, the AI currently neither uses Logistics setting nor Elevators; they're on my todo list, but not super urgently.
My personal advice would be that
- planets in systems with GGG or col Asteroids should be set always to prod because the net amount will be greater than the penalty.
Eh, No.
- Go defensive only if someone is clearly hostile or offensive. The tradeoff of losing prod or even research is not much worth if raising troopships is so cheap esp. now with the new increased troop mod
Clearly hostile? Beyond the fact that they're armed? I am not so good at programming mindreading.
- AI needs to use any specials without any exceptions (I forgot to add this, but Ive seen alot of planets not careing for sepcials at all)
Feel free to point out what specials you think you see the AI ignoring. I try to have them make intelligent decisions about them all. I am not about to have them just blindly always try to use a special. It could be I have overlooked some special, though, so feel free to ask about something in particular.
This basically affects only Egassem, and NO, don't set their HW to research because it will only be 6,5 (!!!)
Thanks for pointing out they were doing that, it was a bug having them stuck like that. Once they hit their max (initially at 19.5 Industry, 5 Research), they will momentarily flip to research to get that one extra point at the expense of 3 Industry, but I think they really need it at that point.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: AI - Honeycomb special

#5 Post by MatGB »

When playing Egassem, I set my homeworld to research in the early game, the few extra points it gives are far more useful than the extra outpost ships I'd build until scouts have found viable colonies. Sure, it's only 6.5 at first, but it goes up quickly when you've got Algorithmic Elegence and some population boosts, you're going for both of them regardless.

There's nothing worth building in the first few turns except colonies, troops and scouts, and there's only so many of them you can use, whereas a speed boost to Nascent AI and SubHab is virtually always worth it. I switch away from research with them earlier than any other species, but I still put them on research until I've found something interesting for them to build.

Taking an absolutist approach to strategy, any strategy, is going to expose you to weaknesses, there are always circumstances that merit changing what you do, the AI is quite good at that, which is good. It's not as good at getting speed going, especially with the new colony mechanics, but it is getting better.

In any strategy game that's in any way balanced, then there should never be an absolute best approach, the game is a lot better balanced than it was 18 months ago in many many areas, but if someone can proove there's an absolute best approach for a given race at a given time, we need to change it so that players always have a choice.
Mat Bowles

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

pheldens
Pupating Mass
Posts: 96
Joined: Fri Mar 15, 2013 12:54 pm

Re: AI - Honeycomb special

#6 Post by pheldens »

I've encountered the comb too once
and it wa sguarded by heavy aliens red blobs which I smashed with my superior powers, then I went to 7k industry and mopped up the map

User avatar
Kassiopeija
Dyson Forest
Posts: 212
Joined: Wed Jul 16, 2014 6:14 pm
Location: Black Forest

Re: AI - Honeycomb special

#7 Post by Kassiopeija »

Dilvish wrote:AI's will only flip like that when they are at or very near their industry max and they are valuing the research enough to make it worth it. In some cases it is absolutely worth it for a player to swap 3 Industry for 1 research. (*See below re Egassem.) They won't do it if they have Force Energy Structures or if their aggression is below Aggressive.
It'd be fine if the AI would use this under a very specialized pretext, such as reducing the research time of "Adaptive Auto" from 2-->1 turns by setting 5 planets to research... because the net result will be that all his planets will get increased production one turn more early and it'll come to increased production overall.
But that's not what I've seen, nor am I able to "see" what the AI currently plans or researches.
Instead, I've seen him swap between research- & production focus for prolonged turns. And this clearly doesn't make sense. If I have two planets and I set the first to research & and the second to production - and keep it that way, than the net prod/res will be much bigger than if I constantly fluctuate the focus on both planets.
Dilvish wrote: Yes, so? I do then when I need more research, as does the AI-- it's all a relative balance. The AI certainly is not ignoring the extra Industry target from Gas Giants and Asteroids.
Well, getting more colonies will also automatically mean more research, and you get these from production. In my opinion it's best to go for a strategy of "biggest bang for the buck" esp. that you cannot really plan 50 turns ahead, you don't know what your scouts will find so there's really no valid way of determinating "what is best" esp. not an AI. But to calculate how the biggest general prod/res will come out is fairly easy, and both values will advance the AIs game this way or another.

Nevertheless, I've just set up a testgame and I hope to exemplify a bit on what I'm getting at. Last week I had a game running on settings that I thought could give the AI enough time & liberty to muster up before I meet him. That was, 300 systems, 4 AI's, Monster low, cluster shape, low specials, low natives, low density, low starlanes.
As it turned out @ turn 150 when I found all AI's was that
- 2 had 4 planets
- 1 had 3 planets
- 1 had 2 planets

I had ~75 planets and multiple fleets with 1000 att 2000 hp, the AI wasn't able to muster anything in 3 digits.

The testgame now is using the same parameters so perhaps it'll some insight on what's going suboptimal...

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

Re: AI - Honeycomb special

#8 Post by Dilvish »

Kassiopeija wrote:low density, low starlanes.
Like I mentioned before, the AI does not use Logistics focus yet, nor Elevators, so really has no chance at all with Low Planets and Low Starlanes.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Kassiopeija
Dyson Forest
Posts: 212
Joined: Wed Jul 16, 2014 6:14 pm
Location: Black Forest

Re: AI - Honeycomb special

#9 Post by Kassiopeija »

Image1.jpg
Image1.jpg (109.42 KiB) Viewed 1309 times
This is the first screenie. I'm observing a Gysache AI, which is probably the strongest faction in early research, and also is a good colonizer.
His starting system consists of only 1 planet, which is focused to research. There he parks alot of scouts most of them are inactive since forever.

The Black Hole is empty.

At Ras Beta there are 2 planets - one is small in size - which he could have used to generate additional supply. He parks most of his military at this system - I assume so they are always supplied - but considering that there's only one direction from where hostiles can come from this is an odd decision. Also, his ships have 3 fuel, so he could leave his supply, at least, one node behind.

At Ras Alpha there's a Mu Ursh Native planet guarded by 44 troops, planet also holds an Organic Growth special - which could be useful for Gysache. The AI already erected an outpost at Asteroids at this system - which doesn't generate supply nor is it within supply.

At Ras Gamma there are 3 planets - an outposter is en route to it. Please note that the AI decided to let this ship fly blind - out of scanning range - so he actually takes a gamble that this ship could be destroyed upon reaching target. Why didn't he place a scout there, perhaps to the other adjacent systems as well?

Watching that outposter fly to its destination gave me a headache. It wouldn't target Ras Gamma directly but jump from one system to the next. Which always took him an extra turn, he actually wasted speed. And doing this outside of protected territory will also increase the odds dramatically that this ship is being destroyed by roaming monsters. What's the point in this erratic behaviour?
Image2.jpg
Image2.jpg (104.09 KiB) Viewed 1309 times
20 turns later. As you can see the outpost at Ras Gamma got established but because all 3 planets there are medium size they won't generate supply.
So in 77 turns he actually did nothing but to clear a Sentry away from Ras Beta and make two outpost - both which do nothing for him at all, and he ignored the one outpost that would generate supply - which, in turn, would mean he could advance his main fleet to Ras Beta to secure these Mu Ursh natives.

Then, if you look at what he did produce at his homeplanet it's totally without plan - a few new scouts (although he already has alot of scouts there), a single new troopship, an outposter he doesn't use.... how about invading that Mu Ursh planet? It's undefended - should be easy to produce 44 troops in 50 turns... but doesn't do it. Not even in 150 turns. He is kind of ignoreing this planet entirely although the game served it him on a silver platter.
Like I mentioned before, the AI does not use Logistics focus yet, nor Elevators, so really has no chance at all with Low Planets and Low Starlanes.
and neither do I. it's not necessary. what you need is clever managment of outposts to generate range, and rush to invade native planets. this has nothing to do with the minimalistic game setting - as a matter of fact this very setting helps the AI to focus or prioritize stuff because he has to deal with lesser variables and equations. It's more simple. That one Mu Ursh colony is one jump outside his supply - he doesn't need an Elevator or Log focus to invade this planet.
and if he's going to make an outpost to a region that is outside of supply range - he should prioritize tiny and small planets before others - at least, if he needs additional range. Which, frankly, is also a quesiton for him because he doesn't know if there are potential habitable planets beyond Ras Gamma because he doesn't use his scouts. These should be sitting somewhere without fuel, perhaps Ex Gamma or Aegis Alpha.

User avatar
Kassiopeija
Dyson Forest
Posts: 212
Joined: Wed Jul 16, 2014 6:14 pm
Location: Black Forest

Re: AI - Honeycomb special

#10 Post by Kassiopeija »

Image4.jpg
Image4.jpg (113.94 KiB) Viewed 1306 times
Turn 84.
The outposter is still sitting useless at his homeplanet although there are, at least, 4 suitable candidates for an outpost within reach.
He built another military ship, which still uses all basic armour and weapons. There are - or were - absolutely no enemy ships or scouts around his territory, so what's the point for him doing this?
Image6.jpg
Image6.jpg (182.82 KiB) Viewed 1306 times
Turn 112.
As you can see from the tooltip he just completed research on Subterranean Habitation... WOW! 112 turns for the best research race to get one of the most important early tech....... How is this possible with 17,5 RP?
It seems to me that he tries to research much too many techs at once, and that he doesn't sort the research list.

So what did he research? Genetic Medicine, Barracks 1, Algoritmic Elegance.
But no weapons (a MD4 ship comes at the same price but is much better than the trash he's currently producing, and he only need 36 RP for this), no Nascent, no Exobots, no Sensors, no Supply or no other Growth techs.

The thing is that getting SubHab early perhaps around turn 20 would have greatly helped him in getting research done, because of the +4 pop his HW would have given him extra RP from AlgElegance.

And he still produces random vessels, and doesn't scout.
Image7.jpg
Image7.jpg (83.64 KiB) Viewed 1306 times
A turn later.
Because of SubHab one of the medium planets @ Ras Gamma became colonizable. So he's sending his starting colony ship there, together with an outposter.
But as mentioned, he's doing this node-by-node, and as you can see from the screenie, wasting alot of speed. That jump to the Black Hole takes 20 speed, he could already be 40 speed farther en route next turn, esp. that the path is absolutely safe.

User avatar
Kassiopeija
Dyson Forest
Posts: 212
Joined: Wed Jul 16, 2014 6:14 pm
Location: Black Forest

Re: AI - Honeycomb special

#11 Post by Kassiopeija »

Image8.jpg
Image8.jpg (100.24 KiB) Viewed 1302 times
10 turns later. Both outpost & new colony has been established. He wants to build a basic shipyard there, but that system is outside of supply (and will stay outside) so his buildtime is infinite.
There could have been 2 solutions to this:
(a) Make an outpost at that small world at Rash Beta. So far 3 outposters were used for nothing beneficial at that stages of the game
(b) Set focus to industry on that planet.
Image9.jpg
Image9.jpg (202.93 KiB) Viewed 1302 times
Turn 128
The colonization of Ras Gamma triggered the AI to do scouting. Is there some sort of "don't go scouting farer away like 3 or 4 nodes from my colonies" rule in the code?

You also see the Mu Ursh planet. Actually, the aforementioned colonization could have happened much sooner if the AI would have taken that native planet and used the growth focus - the bonus from it is the same as SubHab, which, at that stage would have ment 3 colonies.

The AI also amasses his sole attack fleet at the border of his supply totally ignoring to protect his new colony/outposts. Ras Gamma is currently the absolute best place to put his ships - 3 planets to assist in battle and the control of 2 direction, as well as all other planets or outposts are secured equally.
Image11.jpg
Image11.jpg (110.96 KiB) Viewed 1302 times
At turn 145 he encounters an enemy scout left below + a foreign supply line - and immediately puts his outward planet to defense focus. However, there are, or were, no attack ships or troops seen by him at that stage of the game. Later, he will get back to research focus again and all planetary defense attributes will drop to normal. In essence, he lost research and got nothing out of it.

And that although that system is heavily guarded by most of his attack ships - and he could even go ahead and give it more ships, eg those at his HW that apparently serve no function at all.. The AI seems not to realize that nothing can reach him at his HW without tearing through Ras Gamma first...

User avatar
Kassiopeija
Dyson Forest
Posts: 212
Joined: Wed Jul 16, 2014 6:14 pm
Location: Black Forest

Re: AI - Honeycomb special

#12 Post by Kassiopeija »

Image12.jpg
Image12.jpg (100.64 KiB) Viewed 1296 times
Turn 152.
Scouts found an alien outpost to the left so he immediately sends troops after it. So he actually can make plans to invade, just not Natives. He's sending 24 troops versus 6, it might be debateably if this isn't overkill, esp. against only an outpost.
What however is suboptimal is that he is sending them "blind" in.. the nodes are not in visible range or protected, and he's still using node-jumping although the fuel is enough to reach the destination.

You can also see he must have gotten +1 supply from techs, and as a result, turns an outpost into a colony @ Ras Gamma.
Image14.jpg
Image14.jpg (104.75 KiB) Viewed 1296 times
Turn 155.
The troops arrived savely but dude, can't invade because the outpost has 1 shield. What a bummer. Yeah, without the recent updates it would have been possible....

And his attackships seem to have no intention of helping him. They even left their premier defense position to advance versus the blue above player. Which is me, and I have 0 ships, no movement, no anything so there is actually no point in going defensive versus me.
Image15.jpg
Image15.jpg (123.36 KiB) Viewed 1296 times
Turn 169.
The green player to the left didn't like the foreign troops @ his outpost so he's sending some ships. The troops flee. However, as you can see, the red player from below also sends armed ships. They are clearly inside the sensory range and just a single turn from destroying the troops. What will he do?

You also see the planets of Ras Gamma. As said, the first colony is back to research focus. Now the secondairy is on defensive. And this doesn't make much sense. Either a system is being threatened, or not. In the first case you go defensive on all planets, in the latter not.
But as it is now, it's like that if an invasion happens only my high prod planets will be taken, or, at least, be taken first. That doesn't make sense. If a system is under threat you actually should try to not loose these precious planets, not vice versa. But you are baseing this on a whole different parameter - the loss of production and that leads to such absurdities. If defense would be based on threat none of the planets would have to go defensive because there are already superior firepower ships just 1 node away and actually the player should use these to destroy all enemies in the vicinity and further, protect his troopsships and also, take the outposts shields away.
But he does nothing of these, he just parks this fleet somewhere else.

Another thing. He is building alot of starports at Ras Gamma, too (his HW already has them all completed). This is tough shit because he only has the base production from the capital. Basic Starport, Orbital Drydock, Orbital Incubator, Xenocoordinated Facility, a few turns later Cellular Growth Chamber. This amounts to ~250 prod which is a hell alot at that stages of the game, and just for the ability to produce 4 nodes away.

You also can deduce from these buildings that the AI researched alot of Organic Hull techs - but he still has only SubHab as a growth tech. You know it's funny last week I got a lecturing about how Organics are balanced versus the increased production steming from their all so powerfull growth tech prereqs - but the AI ignores them. Upside world. In a setting where there are lots of uncolonized planets the AI must value to get growth - to be able to colonize - over everything else. Instead he weazles around these techs - fail.

User avatar
Kassiopeija
Dyson Forest
Posts: 212
Joined: Wed Jul 16, 2014 6:14 pm
Location: Black Forest

Re: AI - Honeycomb special

#13 Post by Kassiopeija »

Image16.jpg
Image16.jpg (113.37 KiB) Viewed 1296 times
The attacker obliterated the troopsships. Why didn't he withdraw them to save space? He only would have had to repeat his latest assessment to create distance between nearing attack ships....
But there is some sort of weakness in the code which makes him unable to react to threats if they reach him in a single turn. This is why I value engines and speed more in designs than lousy fuel tanks (and why Asteroids ships are so weak in that regard) because you can exploit in on that.

before I forget, at around turn 160 the total amount of troops steming from producing randomly troopships did add up to +48 - he could have gathered them all and invaded that Mu Ursh planet. Instead, he looses half of them to enemies by trying to invade a shielded outpost.....

User avatar
Kassiopeija
Dyson Forest
Posts: 212
Joined: Wed Jul 16, 2014 6:14 pm
Location: Black Forest

Re: AI - Honeycomb special

#14 Post by Kassiopeija »

30.jpg
30.jpg (177.59 KiB) Viewed 1289 times
Turn 189.
He finally conquered that Mu Ursh planet using 5 protoplasmic invaders. He's ignoring that growth special although using it would benefit him much greater in my opinion, because

- his HW is currently set to prod and all meters are maxed. With growth special pop will rise by +4 which will increase his prod by +5.
- his other colonies will also increase their research.
- he gains +10 pop, and +13 a few turns later as he currently is building another colony.
- troops will also rise
- two of his planets have low target pop and grow up by +0.16/turn. An increased target pop will help a great deal here.
- A terran planet at Aegis Gamma will become colonizable, which will bring another base +2 res, whatever he focuses on, +1 supply northwards and increased protection by more troops, defense.
- Northward lies another terran planet at Megrez Beta which, then, would be only 2 nodes away from his supply. The growth special at this point would bring additional +19 pop, and generate the range to conquer another factions HW. There's also a tiny swamp planet in the system, an asteroid belt, a gas giant.

to be fair, that Native planet will bring him around +20 prod once maxed out. BTW it's a not Mu Ursh but Raaagh species^^

User avatar
Kassiopeija
Dyson Forest
Posts: 212
Joined: Wed Jul 16, 2014 6:14 pm
Location: Black Forest

Re: AI - Honeycomb special

#15 Post by Kassiopeija »

Image31.jpg
Image31.jpg (222.51 KiB) Viewed 1283 times
Final post, as the AI will invade my HW rendering the testgame invalid

From turn 193 to turn 223 the AI constantly shifted focus from res--> prod & back on Ras Gamma III. After turn 223 he stayed at research again. So he traded away 30 research to gain 15 production (!!!) when he simply could have left his HW a few more turns left set to prod instead......

He started doing this once the Raaagh planet developed production, which, in turn, triggered his HW going back to research so he was now strong in both production/research, and then he decided to use a third planet to trade away this excess research into nothingness.

He also build almost all shipyards at Ras Gamma II for around 210 production. This planet also stays ironly at the defense setting although it is equally strong as Ras Gamma III. As you can see from the map, he actually dominates the left & above open fields. As of now, he may have lost several hundred RP so far, and still counting....

BTW he outposted that small toxic world up north but still cannot colonize the 2 terran worlds.

edit:
and this is on Maniacal diff.

Post Reply