AI reports basic economy built to soon.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Won't Fix
|
Low
|
TiborB |
Bug Description
AI reports the basic economy as done as soon as the buildings are completed, even if there are no workers in one or more so the buildings are complete but they are not necessarily operating. It seems the basic economy built is used to trigger the next phase of buildings, if it is not used they why output the message?
I recently was testing Empire late game operations and in 25 test with just one AI player on crater map the basic economy message was seen after 15 - 20 minutes but it was usually over an hour later before the basic economy is working, in some cases they are still deadlocked 3 hours later.
The problem starts early as they build about 7 wood cutters and foresters, usually two foresters are stopped as soon as they are manned as they have no where to plant trees, two or three do not have workers as spades are used up. This would not be to much of a problem but the last two buildings to complete the basic economy are normally the marble mine and the vineyard, which has no worker due to missing shovels.
The basic economy message seems to cause the immediate building of many buildings that need marble, or columns, but without wine the mine stops and there is often not enough stone to build so many buildings, even the smelter and toolsmith can take an hour to build as they wait for marble together with training site and large military buildings, even wells and farms. If the building phase was not triggered until the basic economy was operational then the deadlock would be minor.
Work arounds can be to limit the number of foresters in the basic economy, aihints do not work for them though. Perhaps only one sawmill would reduce the requirement (not tested) adding the toolsmith to the basic economy does help as the vine planter gets his tool earlier from the starting iron. Sometimes the AI builds a weaponsmith first and uses all the iron for weapons.
Related branches
- Widelands Developers: Pending requested
-
Diff: 151 lines (+64/-12)4 files modifiedsrc/ai/ai_help_structs.h (+1/-0)
src/ai/defaultai.cc (+43/-12)
src/ai/defaultai_warfare.cc (+11/-0)
src/main.cc (+9/-0)
Changed in widelands: | |
milestone: | none → build20-rc1 |
assignee: | nobody → TiborB (tiborb95) |
tags: | added: ai |
Changed in widelands: | |
status: | New → Confirmed |
importance: | Undecided → Low |
status: | Confirmed → In Progress |
Well, basic economy was intended as it is now - to make sure that some critical buildings are built before AI runs out intitial critical building material. What you suggest is a step further and some complication to the code. But makes sense, of course.... Now, if AI gets some building, it is scratched from a list of remaining/missing buildings.
Do we have some notification for when a building becames fully staffed? This could be used to avoid too much code....
I will think of the problem of course.