Topic: ai doesn't make as many buildings as before
king_of_nowhere Topic Opener |
Posted at: 2016-04-21, 18:10
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. Top Quote |
Tibor |
Posted at: 2016-04-21, 18:54
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, 19:09
Top Quote |
Tibor |
Posted at: 2016-04-22, 07:54
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, 08:25
Top Quote |
king_of_nowhere Topic Opener |
Posted at: 2016-04-22, 08:26
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, 08:34
Top Quote |
Tibor |
Posted at: 2016-04-22, 08:34
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. Top Quote |
king_of_nowhere Topic Opener |
Posted at: 2016-04-22, 08:37
the ai already expanded on all the space it had. Top Quote |
Tibor |
Posted at: 2016-04-22, 08:39
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? Top Quote |
king_of_nowhere Topic Opener |
Posted at: 2016-04-22, 17:31
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. Top Quote |
kaputtnik |
Posted at: 2016-04-22, 18:27
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... Fight simulator for Widelands: |
Tibor |
Posted at: 2016-04-22, 18:50
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, 18:57
Top Quote |