Topic: ai doesn't make as many buildings as before
king_of_nowhere![]() Topic Opener |
Posted at:
2016-04-21, 19:10 UTC+2.0
Something I noticed a while back, but assumed it must be an isolated case for a while; until a few months ago, when given a large land, ai would fill it out with buildings. Now, after a while it stops. most of its land remain empty, unused. It seems like there is some command "expand until you reach a target number of buildings, then stop". Obviously, it is better to have a bigger economy if possible. So what's happening? Of course I0m not playing with a difficulty level where such limits are acctually implemented. ![]() ![]() |
Tibor |
Posted at:
2016-04-21, 19:54 UTC+2.0
You are talking about productionsites, I presume. Well look at the issue from other end - can you identify productionsite that is needed, but not built? Definitely, there is no hardlimit for productionsites, all should be decided by utilization of existing ones... EDIT: Also AI behaves differently if it there is an enemy nearby - it is more willing to build new productionsties
Edited:
2016-04-21, 20:09 UTC+2.0
![]() ![]() |
Tibor |
Posted at:
2016-04-22, 08:54 UTC+2.0
I looked at target quantities because it seemed to me that there can be some relation, and I found a small bug or bad design. If ware has no target quantities set in init.lua, f.e.:
it is resolved to 254. F.e. water. It misleads the AI, should not it be set to 0? Or is it not meant that 'no default = 0'? EDIT: so it seems there is constant kInvalidWare = 254 and it is returned when ware is invalid for tribe as well as when default target is not set in init.lua ....
Edited:
2016-04-22, 09:25 UTC+2.0
![]() ![]() |
king_of_nowhere![]() Topic Opener |
Posted at:
2016-04-22, 09:26 UTC+2.0
well, you can never have enough economy. while the ai with enough space and time will manage to build a healty economy, a bigger economy would be better in any case. EDIT: and I distinctly remember than it did use to fill all the space, like, 9 months ago. when I was playing "the big escape", around the time when I posted it, the ai always used up all its land.
Edited:
2016-04-22, 09:34 UTC+2.0
![]() ![]() |
Tibor |
Posted at:
2016-04-22, 09:34 UTC+2.0
But generally AI has to pick whether to expanse or built an economy, because sources are limited. But I am aware that the algorithm controlling territory expansion vs economy expansion is not very good, I am willing to look at it but no before build19. Any such change needs time to be tested. But for now I will look at that default targets issue, it seem to be "nondisruptive" change and low-hanging fruit. ![]() ![]() |
king_of_nowhere![]() Topic Opener |
Posted at:
2016-04-22, 09:37 UTC+2.0
the ai already expanded on all the space it had. ![]() ![]() |
Tibor |
Posted at:
2016-04-22, 09:39 UTC+2.0
Oh, ok then. It has no place to expand but still not building economy? Did it have a lot of unfinished buildings or shortage of some materials? ![]() ![]() |
king_of_nowhere![]() Topic Opener |
Posted at:
2016-04-22, 18:31 UTC+2.0
I can't say that for sure because i didn't set the game on "all explored". I previously played the same map and found the same behavior, but I just assumed it to be an isolated case at the time. But in this case, I can only see that the number of buildings of the AI reached a peak 6 hours ago, then it decreased; while land size kept growing up to 4 hours ago. My scouts can see several patches of unused terrain, and though the ai has many buildings (some 260) I know more could be made with that land. The previous time when I played the same map with all the map explored I could see clearly that the AI only used maybe one third of its terrain. That time it was playing barbarians, this time empire, so it's not strictly tribe-related. ![]() ![]() |
kaputtnik![]() |
Posted at:
2016-04-22, 19:27 UTC+2.0
This was introduced with bug: Buildings produce more than set in "configure economy". If we set "default_target_quantity" to zero, the icons in configure economy menu appears again... ![]() ![]() |
Tibor |
Posted at:
2016-04-22, 19:50 UTC+2.0
I already have a workaround, I will test it a bit and propose for merging afterwards... EDIT: The workaround is that when value will be kInvalidWare, it will be set to 5, I mean internally, for AI only
Edited:
2016-04-22, 19:57 UTC+2.0
![]() ![]() |