Logo Platform
logo amplifiers simplified

(even more) AI modding

Reply
Copied to clipboard!
12 years ago
Sep 13, 2012, 10:27:57 AM
In fact, by default, the priority is the military power, but if you force a priority, it will use it. That is not true for the weapon and defense module in the current version, but in the next one, they will act as the support module one. So if you want to change manually their priority but unchanged the military you would be able to.



Yeap, add a ship type modifier could be an improvement... But perhaps you could add it to the ship template...
0Send private message
12 years ago
Sep 7, 2012, 12:18:37 PM
For the support module, this should be based on a "Priority" flag, but I don't see it in the xml... So... hum... well...



I will bind it on the military power by default for the next build, but for now you could just add an attribute "Priority" on the xml module description and normally this will design which module to prefer on each category.



Does it seams clear?
0Send private message
12 years ago
Sep 7, 2012, 1:13:27 PM
It's not big enough of a deal that I consider doing it now when you say you will be changing how it works in the next build anyways. smiley: wink



Don't want to implement all sorts of workarounds for stuff that I know is going to be fixed anyways.



But still nice to know how it should work and how it will work after the patch. That shall allow to make some really, really good ship-designs for the AI.



Another thing that bothers me would be how the AI decides which weapon they use when designing ships.



It seemed pretty random during war but during the long peace-time every single design of both remaining AIs in my last big test-game wielded Missiles where I had expected it to be a little more random. (That of course was with templates that only had 1 weapon-type)
0Send private message
12 years ago
Sep 7, 2012, 2:05:27 PM
Ail wrote:
It's not big enough of a deal that I consider doing it now when you say you will be changing how it works in the next build anyways. smiley: wink



Don't want to implement all sorts of workarounds for stuff that I know is going to be fixed anyways.


Yeah that's a good point...



Ail wrote:


Another thing that bothers me would be how the AI decides which weapon they use when designing ships.



It seemed pretty random during war but during the long peace-time every single design of both remaining AIs in my last big test-game wielded Missiles where I had expected it to be a little more random. (That of course was with templates that only had 1 weapon-type)




Module choice is "more or less" based on enemy design. When the AI had a battle with some other fleets, it will remembers its weapon and defense effectiveness and try to privilegiate the more effective weapon and defense for its own ships. If the ai spot that you don't have any defense in kinetic, it will choose this weapon for the future ships. When the AI compute that the missile are pointless because you have many defenses, it will choose any other weapon as better. etc.



When at peace, the AI will simply choose the weapon with the most military power.

I think that missile must have the bigger ones, so when you have same level of kinetic, laser and missile, the AI will choose the missile one... But I am not sure about that last point.
0Send private message
12 years ago
Sep 7, 2012, 2:23:55 PM
So the AI actually does take into account what it had encountered!



That's a point we've been wondering about since ages! So that's really great to hear!



I think this will make the ... let me call it Iblise-Template-idea a very good option for the AI.



The basic idea is to have all types of defenses but not at an equal level but at a 3:2:1 ratio. And then have one template with 1 weapon-type and another template with 2 weapon types and a 3:2 or 2:1 ratio of them.



Now when we know that the AI actually does react to designs, this approach will warant way more diversity than the plain and simple 1:1:1-Omni-Defense without having the same weakspots as the original designs (which is Omni-Weapon because it will always leave at least one weakness in its designs).
0Send private message
12 years ago
Sep 7, 2012, 6:18:53 PM
Haha



Actually I did know that the AI ship design reacted based on enemy ship design to min max weapon design. I'm not sure how it handles multiple fronts at war though. Enemy 1 has lasers and no flak. Enemy 2 has kinetics and no shields. Does missiles and lasers with shields and deflectors or just choose either enemy 1 or 2?
0Send private message
12 years ago
Sep 7, 2012, 11:51:25 PM
Even better would be if the Defense Minister above could push to the Economy Minister specific designs to specific systems to counter the race that system cluster had a frontier with...
0Send private message
12 years ago
Sep 10, 2012, 7:55:52 AM
Yeah that is the "next big improvement" we could do on the Military front. For now, the ship design are managed as a whole and not based on each war front.



We could also destroy the "Colonizer" ship design in a latter game as it will not be used anymore... So you can have another slot for war purpose.



In fact, I think that the military minister (or defense minister as you prefer ^^) need to handle some "Armada" principle which is not the case for the moment. So you can design up to 3 or 4 ship for each armada and create fleets based on these ship designs. With this solution you can assign the armada to an enemy empire and adapt your ship to it.



But well, I am afraid that will take a little time to be done and I am not sure this is really high priority for now... I will try to push it up... We will see ^^
0Send private message
12 years ago
Sep 11, 2012, 9:27:32 PM
ThorTillas wrote:
For the support module, this should be based on a "Priority" flag, but I don't see it in the xml... So... hum... well...



I will bind it on the military power by default for the next build, but for now you could just add an attribute "Priority" on the xml module description and normally this will design which module to prefer on each category.



Does it seams clear?


After adding them like this:




SupportCategory="Armor">



it worked. Important to notice: Higher priority will be used first. (I first did it wrong and it used the weakest armor on all ships)
0Send private message
12 years ago
Sep 13, 2012, 7:42:22 AM
Yes you are right... Sorry to not mentioned that earlier...



This is due to the military power priority... As you have to choose the module with more military power first, I reverse the normal "priority" sorting...
0Send private message
12 years ago
Sep 13, 2012, 9:13:37 AM
ThorTillas wrote:
Yes you are right... Sorry to not mentioned that earlier...



This is due to the military power priority... As you have to choose the module with more military power first, I reverse the normal "priority" sorting...


Now that I see how this works I'd actually argue against changing it to sort by military power.

Making this variable visible in the XML so every modder can see it without having to have read this thread would probably be better.



It would be even better to have a priority per ship-type because on a destroyer with bonus on weapon-mods a power-support that increases damage would make more sense than on a medium-ship with a bonus on defense-slots.
0Send private message
12 years ago
Sep 7, 2012, 9:29:02 AM
Hi there!



I'll try to ask another question right here...



How does the AI decide what modules it uses when it can select from a number of them?

In my mod I assigned 20% or so of the tonnage to be used by Armor-Modules.



This works but the AI won't use the best ones nor the 2nd best ones.



I've tried increasing the MP-in order to deceive them to using the better ones. Did not work.



Now I think that they might actually make a price:effect calculation to decide what to use.



And if that is the case, they appearantly take the unmodified price.



The best armor-module needs Adamantium. So it gets cheaper by up to 60% with 4 or more stacks of Adamantium.

Granted the AI in question has like 8 of them, they receive the full bonus making it almost as cheap as the way weaker but 2 generations lower 3rd best armor-module.



In my opionion they should not care about the price at all. Tonnage-efficiency should be the deciding factor here.

And 220 HP + 11% HP on 25 Tons certainly beats 110 HP + 5% HP on 18 Tons all the time.





For the power-modules I'd also like to specify the priority which one they use same for the repair-modules. Is there a way to do that by messing around with the MP-values or so?
0Send private message
12 years ago
Sep 13, 2012, 7:51:38 PM
So you can and still will be able to "override" the MP-Default with the priorities, if you so desire?
0Send private message
12 years ago
Sep 14, 2012, 7:52:33 AM
correct !



(and now I need to fill the post to be able to post it... damned security...)
0Send private message
12 years ago
Sep 15, 2012, 1:34:33 PM
Could you please explain in detail how the values in DiplomaticAttitudeModifier.xml work?



Let's take one example:



Here's what I think what the parameters do:

Value: As soon as a Modifier triggers this is the starting value.

ValueRange: Lowest possible value:Highest possible value for any given modifier

Trend: This is added to Value every turn

TrendRange: Limits in which the trend can be... Here I would be really interested what actually affects this.

TrendWeightingCoef: Don't really know

ValueWeightingCoef: Don't really know either



And in Personality.xml there's stuff like that:





Sound like multipliers for the things in the above xml. I suppose a "0" here will cause them to ignore a Trigger for a specific Modifier.



My basic goal why I ask is that I want to make the AI more aggressive but without taking away the racial characteristic or going too far. I already had experimented with this but it did not feel really good.



Here's a specific example:

I want the Relationship-Bonus for common enemies to start high but go down over time.

So I changed:





I was expecting that to cause the Value to slowly go down. But it doesn't. What am I missing?



Edit: Apparently it does get reduce over time but much slower than I expected.



Edit2: Apparently it decays while the Empire in question is still alive but stops decaying when it is dead... that is very illogical. :\
0Send private message
12 years ago
Sep 15, 2012, 7:07:53 PM
Now I managed to completely cripple the AI by messing around with this:



[code]



0.5



1.1



0.7





1



1



1

[/code]

They made so many ships that they could not pay the maintainance anymore, increased their tax to 90%-100% and then hat Revolts all over the place.

The original Intention was to get them to make more ships in the lategame when there's nothing left to be build and they have plenty of Dust anyways.



If I'd be asked to word an algorithm about how they should actually behave it would be:



[code]

if(EmpireApproval>=80)

{

MilitaryShipPriority=DevelopmentPercent/2;

}

else if(EmpireApproval>=20)

{

MilitaryShipPriority=DevelopmentPercent/4;

}

else

{

MilitaryShipPriority=0;

}

[/code]

This shall allow the AI to produce a lot of ships when it's doing well and completely halt ship production (and thus allow Ind=>Dust) when the taxes are too high.

A fully developed System should have a Priority of 0.5 which shall always beat Ind=>Dust but usually shall not beat regular buildings.

This is basically the same thing that I do. When I can't increase tax any further because it would reduce Approval too much, I build Ind=>Dust and no more ships.



Edit: Another idea... I could massively crank up the value for Ind=>Dust and give it an AIPathPrerequisite that prevents it from being build when the Approval is okay! If this works it would fix the bankrupcy/revolt problem and still allow the AI to build all the ships they can maintain. This is assuming the AI will automatically reduce the Tax-rate once it has enough income from Ind=>Dust.
0Send private message
12 years ago
Sep 16, 2012, 12:36:56 AM
It seems to work!



[CODE]



[/CODE]

+

[CODE]

StarSystemConversionIndustryToDust



$(../ClassEmpire:Approval) le 60 or $(../ClassEmpire:MoneyNet) lt 0[/CODE]

+

[CODE]

0.5



1.1



0.7





1



1



1[/CODE]

=

AI builds tons of ships without going bankrupt/into revolt!

Now I just need to see if it really plays out like I want in a complete game.
0Send private message
12 years ago
Sep 17, 2012, 10:34:50 AM
Ail wrote:
Could you please explain in detail how the values in DiplomaticAttitudeModifier.xml work?



Let's take one example:



Here's what I think what the parameters do:

Value: As soon as a Modifier triggers this is the starting value.

ValueRange: Lowest possible value:Highest possible value for any given modifier

Trend: This is added to Value every turn

TrendRange: Limits in which the trend can be... Here I would be really interested what actually affects this.

TrendWeightingCoef: Don't really know

ValueWeightingCoef: Don't really know either




When a trigger is activated, a new modifier is created with "Value" as starting value. Each turn "Trend" is added to this value. But the sum of all modifier of a same type is clamped between "ValueRange" (same thing for TrendRange).



For example :





4 exchanges finished at the same turn, 4 modifiers of type "DiplomaticAttitudeModifierPastExchanges" are created with value 15. So the sum of all DiplomaticAttitudeModifierPastExchanges is 60, this value is clamped to 50.

Next turn, all this modifiers must be decreased of 0.5 (total -2) but there is a TrendRange of -1. The trend is distributed to all modifiers (-1 / 4 = -0.25), so the value of each modifiers at this turn is 14.75, for a sum of 59 clamped to 50.



TrendWeightingCoef and ValueWeightingCoef are here for some specific cases. Some modifiers use a specific formula.

For example :



the final value of the modifier is : FinalValue = Value + (number of turns since the start of term) * ValueWeightingCoef.

All this formulas are wrote in the xml comment.



It's also possible to create curve with all modifiers except those who have TrendWeightingCoef and ValueWeightingCoef.



Example :













Ail wrote:


And in Personality.xml there's stuff like that:





Sound like multipliers for the things in the above xml. I suppose a "0" here will cause them to ignore a Trigger for a specific Modifier.





This coefs are multipliers of the original values so you're right, "0" will ignore an attitude modifier.



I hope my explanations will help you smiley: smile
0Send private message
12 years ago
Sep 17, 2012, 2:25:49 PM
Yes, this explains why in some cases the number for "common-enemy" would not drop. They probably were 4 in reality and 4x30 exceeds the 90. So it would only drop below 90 once the "real" number also dropped below 90.



About the other issue I brought up: I think I just found out that my whole changes will become pretty pointless with the new maintainance-costs. Having a big standing army then will never be too good.
0Send private message
12 years ago
Dec 3, 2012, 9:38:45 PM
Since I've seen more occurances of the Rebellion/Bankrupcy/Starvation-Issue even now in 1.0.38 where the AI will stop making ships if their Approval drops to low, I started to think what else can cause it...

The result of this though-process was pretty easily forseeable: The ships they already had!



The issue has changed a bit. The AIs didn't knock them out completely so hard anymore. Less were affected and those sometimes showed signs of recovery but then dropping back to the crisis.



Now I've found a new approach to fight this issue.



There is a file in the Public-Folder that has received little attention thus far.

I'm talking about BailiffDistrainee.xml.



The purpose of this file is to define the order of scrapping stuff. Unfortunately it isn't documented in the slightest so I could only guess what it does.

Didn't prevent me from playing around with it.



And that's where you come into play. I'd like everyone to just try out the modded version of the file. Purpose is: "Scrap Military before buildings."

My first test looks promising. But I want to gather more data more quickly.



So here's the one-file mod. Feel free to merge it with other mods (should be doable in any case since I highly doubt any other mod has done something with that strangely-named file).
Bailiff.zip
0Send private message
12 years ago
Dec 3, 2012, 11:14:55 PM
I doubt everybody will look in this thread for new mods to try. I recommend a top level modding thread.
0Send private message
12 years ago
Sep 2, 2012, 5:51:35 PM
I found some more stuff:



The AI when ahead in every aspect and not threatend really slacks with it's military. It won't make new designs and it won't build ships.



I think the reason is this:





1



1

1

1



In a test-game I found that they, despite having finished the military-tree, did not have any current design.

A few turns after declaring war they had a single new design.

But that was it.

They still built Ind=>Dust in most of their systems and 1 system built one of the old designs instead of the new one.



The amount of AI-incompetence on that area is really shocking!
0Send private message
12 years ago
Aug 25, 2012, 8:24:42 PM
I have never seen the behaviour you describe in b)... Ind->Dust has a Prio of 0.1 and that is more than 0.



And for a) I've done quite a lot to improve the Exploitation-Behaviour and the decision-making about food-buildings.

I will test that some more and then release it most likely by tomorrow. My next aim is to put better decision-making into all of the other buildings. Now that I know how I can do it I can make progress there.



It requires making new variables in StarSystemDescript, where I can calculate stuff, multiply it by 100 (important because when you compare values they are rounded!) and then use them in equotations.



The formulas I have in mind shall be like calculating the IDS-gain. (not for food, there I have this other system in charge, I'm testing right now) and then bring it in connection with the build-times to see if it is worthwhile.
0Send private message
12 years ago
Aug 26, 2012, 2:13:56 AM
Can someone summarize the changes in the other thread?



Also did we ever figure out if the AI takes Industry costs into account when building improvements, or if the cost needs to be "baked" into the weights? Also, how does the AI select "replacer" constructions, i.e. exploitation and terraforming--does it compute the change in score?
0Send private message
12 years ago
Aug 26, 2012, 2:44:30 AM
Evil4Zerggin wrote:
Can someone summarize the changes in the other thread?



Also did we ever figure out if the AI takes Industry costs into account when building improvements, or if the cost needs to be "baked" into the weights? Also, how does the AI select "replacer" constructions, i.e. exploitation and terraforming--does it compute the change in score?


I'll try to summarize it. Currently I'm having problems to test the standalone-version of the mod... Same problem as usual: Game won't start anymore once I selected the mod.



The AI indeed already does take Industry cost into account and it does not necessarily need to be baked into the weight.



Terraforming and Exploitation are treated differently:



The AI, without further help by modding is smart enough to only terraform when the Tier changes and of course will never go back to a lower tier. A typical Terraforming-Chain of the AI looks like that: Lava => Desert => Arid => Terran

I tried to mess around with terraforming-priorities but I eventuelly put it back to default because my changes made it terraform too soon. The original parameters work pretty well here.



Exploitations are treated completely differently. The AI will always switch those when it thinks another one is better for the moment. I think it is treating them as a value 2.x-Building it does not have yet. Here a modder can have a huge impact and I think my new changes to that are really good as they consider the Sowers working differently and differentiate between the levels of one exploit. (As in "Why should a terran like Finance2 more then Industry2, when it only gets a bonus on Finance3?")
0Send private message
0Send private message
12 years ago
Aug 26, 2012, 5:59:21 PM
I have done an experiment to compare my play for the first 60 turns against the AI. If we still find significant differences, perhaps this will help tune the AI more. Not that I am such an expert player; but when we have done these experiments before, we have seen such obvious things wrong that we just stopped. Now maybe it will be better.



Here is my process.



1. Start a two player game, large map, both amoeba, hard difficulty, using community mod serial 04 to get ail's "better AI 1.1".



2. Save the turn zero game.



3. Play 30 turns, doing nothing but "wait one minute, click next turn". Note that we have found a bug; if you click next turn fast, the AI player is not, in fact done, and it won't do some things which it does if you wait longer. This is an exploit you could use against the AI.



4. Save after 30 turns. Repeat and save after 60 turns. The AI player has now had 60 turns of development, without interacting with me at all. (Maybe a scout landed.)



5. Jailbreak the turn 0 game. Load as the other player, which the AI has just played 60 turns of.



6. Play 30 turns on my own, save, play another 30 turns, save.



7. Compare the four saves: on the other position, me vs AI after 30 turns, me vs AI after 60 turns.



Statistics after 30 turns: I had 25 pop in 7 systems, AI had 23 pop in 6 systems. I had science value 34 in the "end game" screen (not sure what this means) and AI had 46. I had zero MP, AI had 420. In the tech tree, the main difference is the AI had all the tier 1 and 2 techs in all four trees; I hadn't bothered with weapons but I had nonbaryonic shields. I had one L3 admin hero (civil engineer natch), the AI had 3 L3 heroes, all on planets, all with fleet skills (due to the mod).



Commentary after 30 turns: There isn't much notable difference. I expanded slightly faster, and I had "better" techs, and I hadn't wasted any industry on ships. This is a little unfair, because I knew from the map setup that warfare wouldn't be that important.



Turn 60 stats: I had 83 pop on 10 systems compared to the AI with 112 pop in 14 systems. I had 152 science compared to 145 for the AI. I still didn't have any warships but the AI had 12K MP. I had one L5 hero with pure admin abilities, the AI had 3 L5 heroes.



Turn 60 commentary: Here is where we can probably learn useful things.



a. The AI had 17x 5CP fleets, which seems like quite a lot.



b. The AI still did not have nonbaryonic shields even researched, nor any of the industry boost techs in the south part of the science tree. I had antimatter, hexaferrum, and 3D replication plants. I did not manually total up the industry values and science values since jailbreaking discards the AI approval advantages; but I bet my industry and science were quite far ahead even though my pop was behind.



c. The AI had colonized every nearby system, even ones with pretty poor planets. I don't know the exact approval bonus the AI gets, maybe this makes sense.



d. This map layout didn't have much opportunity for monopolies. Some players (on some maps) make a strong effort to go after these and this could have a big impact. The AI doesn't "appear" to go after them at all.



e. The mod attempts to make heroes more useful by forcing them to take all fleet abilities, since we cannot force "specialization". I used the standard technique of an L3 admin hero, moving to a new starting system every 6 turns. I suppose this helps new systems start much faster, and the AI does not use this technique.



f. Although "community mod serial 4" is used, I saw the AI building cis-oort satellites, which is impossible according to the mod, and building xenotourism quite early, which should not happen. Since ail has found that copying files into the game directory "seems" more reliable than loading via a mod, I wonder if this has had a strong effect. If so, then the experiment is kind of wasted.



If anybody has comments on the methodology, I will probably do this again when either, (1) ail releases a new systemimprovements.xml, I will copy it into the game directory, or (2) the dev team includes some version of this into the release.
0Send private message
12 years ago
Aug 26, 2012, 9:41:42 PM
Want to comment a few things:



"Note that we have found a bug; if you click next turn fast, the AI player is not, in fact done, and it won't do some things which it does if you wait longer. This is an exploit you could use against the AI."

I'm not sure we should call this a bug. It seems to be a design-choice. The ways to exploit it are pretty limited as ending the turn ASAP won't give you much time to do better than the AI either.

I think it should be an option in the menu. "Always wait for AI to finish everything. Warning: Depending on your hardware that might cause longer turn times."



"b. The AI still did not have nonbaryonic shields even researched, nor any of the industry boost techs in the south part of the science tree. I had antimatter, hexaferrum, and 3D replication plants. I did not manually total up the industry values and science values since jailbreaking discards the AI approval advantages; but I bet my industry and science were quite far ahead even though my pop was behind."

Don't know if the community mod v4 already has the changes I made to "AIParametersTechnology.xml". Actually I changed exactly one thing. I trippled the AI value of Nonbayonic Shields there so it should research it as soon as it has the prereques. This file offers great potential to force the AI to make better choices in teching.



"e. The mod attempts to make heroes more useful by forcing them to take all fleet abilities, since we cannot force "specialization". I used the standard technique of an L3 admin hero, moving to a new starting system every 6 turns. I suppose this helps new systems start much faster, and the AI does not use this technique."

Well, you found out how we could force the other thing: We could also force the AI to use all system-heros. But I think in the long run all fleet would be better because wars are won in battle not by outproducing.



"f. Although "community mod serial 4" is used, I saw the AI building cis-oort satellites, which is impossible according to the mod, and building xenotourism quite early, which should not happen. Since ail has found that copying files into the game directory "seems" more reliable than loading via a mod, I wonder if this has had a strong effect. If so, then the experiment is kind of wasted."

Well, if that's the case then it would be really bad. :\



"If anybody has comments on the methodology, I will probably do this again when either, (1) ail releases a new systemimprovements.xml, I will copy it into the game directory, or (2) the dev team includes some version of this into the release."

I have included a new systemimprovements.xml in my Ai-Mod 1.2. It has mainly a better logic for food improvments. But needs to be taken together with the slightly tweaked AIParametersBuilding.xml.
0Send private message
12 years ago
Aug 27, 2012, 12:50:22 AM
(FYI, instead of putting quoted text in quote marks, could you use the
and
tags? It is easier to read and only a few more characters to type.)



Ail wrote:
Don't know if the community mod v4 already has the changes I made to "AIParametersTechnology.xml". Actually I changed exactly one thing. I trippled the AI value of Nonbayonic Shields there so it should research it as soon as it has the prereques. This file offers great potential to force the AI to make better choices in teching.


I have included your file. Apparently the game doesn't like loading it. Next time I play a full game, I will retry with your technique of copying mod files over the original game files. This is a bad bug in the game which we cannot easily diagnose from the outside.



We could also force the AI to use all system-heros. But I think in the long run all fleet would be better because wars are won in battle not by outproducing.


I feel we have tried enough different hacks to get good behavior from heroes. Let's wait till they expose more hooks, or fix the code.
0Send private message
12 years ago
Aug 27, 2012, 1:31:19 AM
davea wrote:
I have included your file. Apparently the game doesn't like loading it. Next time I play a full game, I will retry with your technique of copying mod files over the original game files. This is a bad bug in the game which we cannot easily diagnose from the outside.


Be aware that it depends on 2 new variables I introduced in StarSystemDescriptor. Those are required for the smart food-management won't work.



Unfortunately the smart food-management is not smart enough to work well with the Planetary-exploitations. I did not take into account that when you switch between exploitations you tend to lose the prior one and this easily means the system goes from "enough food supply" to "too little food supply".



So before I come up with a good idea on how to fix that, I'd not put the new version for "PlanetInfrastructure.xml" it into the community-mod yet.
0Send private message
0Send private message
12 years ago
Aug 25, 2012, 5:47:37 PM
We have done quite a number of things deep in the "AI Modding" thread, and these improvements will hopefully be rolled into the game soon. What else can be improved about the AI? That is, what *can* be improved? It is different from "what would we like to improve if the modding hooks were only there"?



I know ail is still working on improved numerical calculations for systemimprovements.xml, and we "hope" the dev team will fix the tonnage issue.



I played a game this morning using governors. If we are "done" with systemimprovements.xml and it works, then the governors should work fine. Actually I was surprised to find that they do work fine, with two major exceptions:



a. If I put a planet on ind->dust, and the governor wants to build something, it builds it, and takes away ind->dust. This makes the governors unusable unless you have a high trade game going, where you never need ind->dust. This is odd, because if I put an actual building or ship into the queue, it stays there. Only the ind->dust/sci get removed by governors.



b. If a small system gets done building everything, it stays at "no production" instead of at least going to ind->dust/sci.



Is it possible to give "some low" priority to ind->dust/sci in the xml? It appears to be "never", which is too low.
0Send private message
12 years ago
Sep 2, 2012, 6:13:05 PM
If they are way ahead, why waste money on ships? And why make new schematics, if you are not building ships? What would be interesting to test is, what happens when that AI is suddenly no longer ahead. For example, if you give yourself a billion dust (!!) and build a huge fleet and attack, does the AI switch gears and build modern ships?
0Send private message
12 years ago
Sep 2, 2012, 6:47:33 PM
Tried it out and bought Ships for all the Money I had saved.



2 Turns later all their queues were filled with ships. They did not use their money to buy something though. (They have 2 M, I had only 300k)



There seems to be a bug with their designs.



They have 8 regular designs. One or two per Hull-Type.

But they also have 12 "Large1bishoratiotemplates".

Instead of Modifying their Large1Bis-Template they made new ones.

Which means they

a) cannot upgrade them

b) will still build them



Their queues are filled randomly with new and old versions of this template.
0Send private message
12 years ago
Sep 2, 2012, 7:43:13 PM
Unfortunately, I am no longer surprised that this works badly. The logic for (a) when to make a new schematic, (b) when to buyout ships, (c) when to retrofit ships is invisible to us, and apparently not very good. If they can fix the tonnage bug, which we agree is even worse, then perhaps we can push for this next.
0Send private message
12 years ago
Sep 2, 2012, 8:03:18 PM
I'd really like to have a look at the actual sourcecode for some of the annoyances. :\
0Send private message
12 years ago
Sep 3, 2012, 12:26:41 PM
I've tried a lot of things to get the AI to build ships instead of nothing.



Unfortunately none of the parameters that looked like they would probably affect it, did anything. The only way to get the AI to build more ships was getting more ships myself.



Considering how many and precise options there are to tell the AI what to research and what improvements to build in what order the decisions when to make ships remain pretty mysterious.



There are hints that there is 2 triggers for them when to build ships.



a) In emergencies, independently of how well developed a system is.

b) Once a certain degree of development is reached and "the limit" is not reached yet. Only on well developed systems.



For "The limit" there again seems to be 2 different factors.



a) The size of the military of others. AI will try to match that.

b) If military size is already bigger than that of others then there seems to be a formula connceted to population.



While some of the parameters in Personality.xml seem to be variables of that formula, changing them does nothing.

[code]



1

1

1

[/code]



Also the values here appear far to low. Pop^1*1+1 = Pop+1... which is very low so this does not really seem to be what is used.



I'd love if a dev could enlighten us here as to if and how increase the number of ships the AI will build when ahead.



Personally I think it shouldn't ever stop as long as it can afford the maintenance.
0Send private message
12 years ago
Sep 6, 2012, 4:06:14 PM
I hope I'm allowed to do that. ThorTillas pretty much answered my question regarding the ship-limits and I thought that whoever read this thread might be interested as well.



So I'll post his answer for everyone to read. I don't think I hurt his privacy when doing so ^^:



ThorTillas wrote:


I can make a quick explanation on how it works, but I am not sure this will help you very much... but still.

We base our AI on three layer.

1st the "System layer", each system is responsible to choose a building and move population according to its "Governor" settings.

2nd the "Empire layer" which is responsible for all technology choices, AI ship design generation and according systems' governors with empire needs

3rd the "Master layer" which is responsible for all "intelligence" choice. Defense, diplomacy, economy, exploration, expansion and acadamy (hero) ministers try to choose what the empire can/cannot/must do.



The building are chosen based on two things. First, the possibility to build it (pathPrerequisites + AIPathPrerequisites) and second the need of it based on the AIParameter and the governor settings. We sort all available buildings and take the most interesting one.



The ship process is a little more complicated because it is based on the 3rd layer and include Defense, exploration and expansion needs.

Each minister evaluate his needs in ships and push some ship request on a big "black board".

Each ship request contains a ship design to build and a priority.

The economy minister take all ship requests and try to find an appropriate system to push it. We use a factor (which should be named "DevelopmentPercent") to define if a system has built most of his building.

so we sort the system by development percent and next by industry and as long as the system is developed we push a ship request.

If the ship request priority is over 1, then we allow the economy minister to push ship on system that are not well developed. This is to avoid some starving of military ship or colonization ships.

When a "System layer" get the request to build a ship, it will override the current construction with the ship. No matter of what was in the queue (for now).



So for the military priority computing.

We compute our current military power. We compare it to "the minimal military power" allowed (which is something like (population^coeff * coeff) + coeff as you already see it in the personality) and the higher other empire military power * diplomatic coeff (something like 0.5 when in alliance, 1.5 in war, etc).

If we are under the minimal military power, we are really bad and we push some ship request with a priority of "1.1" and limit the ship production at 80% of the available empire production.

If we are under the other empire military power, we are bad, but ok, we still can handle it, so we push request at "0.7" and limit the ship production at 50% of the available empire production.

otherwise, we are the most powerful empire, keep a little production up but with a priority of "0.2" and limit the ship production at 20% of the available empire production.



All these variables could be modify in the Public/Simulation/Registry.xml or via the personalities.xml. The personalities are just some modifier to add to the registry one. So if you modify the registry this will be done for all AI but when you do it in the personalities this will be done only for the faction you modify. You will found them under the "ShipRequest" tags.



There is no "PathPrerequisites" around ship request. so you will not be able to say "Don't build ship while you have less than 10 system" or anything related with simulation desciptor...
0Send private message
12 years ago
Sep 6, 2012, 4:38:48 PM
That is interesting information, although it is hard to do much with it. Is there any update on what triggers the AI to create new schematics, or rather, why old schematics seem to exist for a long time?
0Send private message
12 years ago
Sep 6, 2012, 7:09:35 PM
Well, I consider it indeed helpful. It covers up what I've seen as a problem in my last game.

The area has a lot of interesting stuff to play around with things how the AI attacks, how many ships it will want in which situation and the like.



Part of your question might be in connection with the Large1BIS-Bug... That was one of the bugs that caused Old Designs to stay around forever.
0Send private message
12 years ago
Sep 7, 2012, 8:50:41 AM
Ail wrote:
So I'll post his answer for everyone to read. I don't think I hurt his privacy when doing so ^^:




No problem for me. I don't think this is classified ^^.
0Send private message
?

Click here to login

Reply
Comment