ai roads getting jammed a lot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
I noticed while playing my latest map (concentric rings) that AI will get hopeless traffic jams over time. I'm not talking just about wares taking a long time for delivery, I'm talking those kind of jams where no ware moves anymore and the whole economy is completely stuck. Words fail in front on the images I'll attach to this post.
And I'm playing the map again, and I see it happening again, this time with another ai player and even earlier in the game. Apparently a long and relatively narrow land is bad for the ai roadmaking process.
I know teaching ai to make good roads is a near impossible task, but hopefully a fix for the worst cases should be possible. I noticed that the AI response to jammed roads is to build more roads, which rarely will help. One possible solution would be, instead of building short road segments, to build long road segments, which may help bypassing the critical section entirely. Or, the AI could have some way to realize carriers are not moving, and cut roads until they start moving again.
Related branches
- GunChleoc: Approve
- Klaus Halfmann: Needs Information
-
Diff: 1632 lines (+538/-466)8 files modifiedsrc/economy/flag.cc (+347/-179)
src/economy/flag.h (+25/-15)
src/economy/road.cc (+3/-2)
src/economy/road.h (+3/-3)
src/logic/map_objects/tribes/carrier.cc (+131/-230)
src/logic/map_objects/tribes/carrier.h (+9/-11)
src/logic/map_objects/tribes/worker.cc (+19/-25)
src/logic/map_objects/tribes/worker.h (+1/-1)
tags: | added: ai |
tags: | added: economy |
Changed in widelands: | |
assignee: | nobody → ypopezios (ypopezios) |
status: | New → In Progress |
Changed in widelands: | |
status: | In Progress → Fix Committed |
assignee: | ypopezios (ypopezios) → nobody |
Changed in widelands: | |
milestone: | build21-rc1 → build20-rc1 |
this is the biggest road jam i''ve ever seen, covering several screens