Open eronoobos opened 8 years ago
i will redraw the builders number when the factories system is finished
Cool. I don't mean to rush you. You just made me realize that we have an issue system I could use it to organize my thoughts / share them with you (and anyone else who works on this in the future).
in order to rewrite the builders number i write here but if is the case we can open a new issues. in my experiment i have used a system so made: 1 dividing the builded units in groups: 1.1 mobile 1.2 immobile 1.3 mtypes 1.4 groundrange arirange subranged 1.5 weaponed 1.6 builders 1.7 needwater 1.8 dontneedwater 1.9 other if needed 2 combined if needed so a unit can be 2.1hoverAA (the hover antiair) 2.2 needwaterMobileBiulder (a water builder) 2.3 dontneedwaterImmobileGrounranged (a turret) 3 count how much unit per groups we have 4 proportions the units one with other like: 4.1 builder per name are at least one at max 10 and under mtype weapon groundranged units ; some concrete example can be armck = math.min (2,math.min(10,allTheBotThatCanAttack/5)) armack = math.min (1,math.min(6,allTheBotThatCanAttack/10)) armap = math.min (1,math.min(10,allTheAirThatCanAttack/5)) armaap = math.min (1,math.min(10,allTheAirThatCanAttack/10)) lv1botAA = math.min (1,math.min(10,allTheBotThatCanAttackground/7)) lv2botAA = math.min (1,allTheBotThatCanAttackground/7) and this can be the same for all the tipes of units, in the case of ship we can upraise a bit the level so lv1boatBuilder = math.min (1,allTheBoatThatCanAttackground/4) so you can see how to the number are selfthrottle-selfregulated: at start you build a builder, and after few combat another and go in this direction until the war is coming, if you loose many combact you rebuild it and dont build builders, if you have not much builder proportionated with combact units you build combact units
this is my idea and in a few experiment it work very well what do you think it about?
if you've already made it and it works, let's use it
how does the ai currently decide to build construction units? i've forgotten
ah, a limit based on how many metal spots are on the map, and then further restricting them in CategoryEconFilter
with
if metalBelowHalf or energyTooLow or ai.nameCount[value] > ai.conCount + ai.assistCount / 3 or notEnoughCombats then
value = DummyUnitName
end
Your system seems better. I suggest that if you end up not using CategoryEconFilter
, retain some way of preventing construction units from being built when the economy is doing badly and there are already enough to build more metal spots and energy plants.
btw, if you put your experiments in the testing branch (or another branch) of your repository, I can take a look at them
Nanoturrets can't be built on water. Currently, the AI relies on nanoturrets to assist factories. When it can't build nanoturrets, as on water maps, it needs to build more construction units. The extra construction units should start assisting the factory automatically, but that may need some work also.