Currently Online

Latest Posts

Topic: Economy, maybe a bug?

WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 1027
Ranking
One Elder of Players
Location: GER
Posted at: 2019-05-01, 18:51

hessenfarmer wrote:

Just forgot to add to this thread an observation I made with the savegame provide for one of the bug reports for this issue.

I believe it only happens in very big economies. perhaps this might be an overflow issue somewhere.

I observed the bug many times in tiny economies.

I believe also that ports are part of this issue. the more ports the often this happens.

At the other hand the bug also happens if there is no port, at least I think so.


“It's a threat to our planet to believe that someone else will save it.” - Robert Swan

Top Quote
JanO
Avatar
Joined: 2015-08-02, 11:56
Posts: 39
Ranking
Pry about Widelands
Posted at: 2019-05-01, 21:27

I had this problem, too. It was a match (against AI) on the Nile, but it was quite a while ago. The bigger the economy, the slower the pathfinding. What I observed is, when you just started a match and build your first building, the headquarters immediately put the wares onto the road. Later, when you have a very big economy and build a building somewhere, it may happen that the wares need many minutes to be put onto the road by a warehouse. Even if the constructionsite and the warehouse are close to each other and the road in between is completely idle. It feels a little bit like there is something like a critical number of nodes in the road-system where the pathfinding algorithm needs that much calculations, that the system simply collapses. From what I had read here in the forums, pathfinding checks every possible path for each ware on the roads and then picks the shortest to whatever destination. Is that correct? Would that mean a linear dependency between complexity of the road-system and necessary calculations or an exponential one? How does it react to the possibility of loops?


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2811
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2019-05-02, 07:32

What happens is that the ware loses its routing information. So, it still has an assigned destination, but no idea on how to get there.

It would help us if we could reproduce this more easily for debugging.


Busy indexing nil values

Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1029
Ranking
One Elder of Players
Location: Poland
Posted at: 2019-05-02, 10:37

@JanO: the algorithm is not picking every possible route, because there is infinite number of cases, but it is trying to find the shortest one using A* algorithm. So long story short, the algorithm stops when it finds the shortest route and make sure that it is the shortest one (any other cases are supposed to be longer).

I can remember such situations on other maps, but only when the map was with ships. The ware was in a very long queue in a port and it was expected that for a very long time it will not be picked by any ship. But removing and adding resources helped much, because the route was destroyed and any other plank/stone/whatever, which was much closer, could be picked. Maybe that was the case?

The map "colonies" is probably the best case for that, because you can produce one type of ware in one part of map and transport it via ships to another place. I remember that some of my mines were almost completely empty, but after some time (15? 30? minutes) they were filled with food.


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/

Top Quote
Tribal-Chief
Avatar
Joined: 2018-12-09, 17:16
Posts: 23
Ranking
Pry about Widelands
Posted at: 2019-05-02, 11:14

I can confirm this happens on none seafaring maps. It seems to be connected with changes to road systems while goods are in transit, but not confirmed.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 567
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2019-05-02, 12:28

Could it be an idea to collect instances of this issue in form of savefiles and replays to get a clue what is going on? Shall we call or it here in the forum?


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 1027
Ranking
One Elder of Players
Location: GER
Posted at: 2019-05-02, 12:53

hessenfarmer wrote:

Could it be an idea to collect instances of this issue in form of savefiles and replays to get a clue what is going on? Shall we call or it here in the forum?

It's not like the bug is rare. It's rather like: Load a savegame with a bunch of constructionsides, and the bug will appear.


“It's a threat to our planet to believe that someone else will save it.” - Robert Swan

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 567
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2019-05-02, 13:26

WorldSavior wrote:

hessenfarmer wrote:

Could it be an idea to collect instances of this issue in form of savefiles and replays to get a clue what is going on? Shall we call or it here in the forum?

It's not like the bug is rare. It's rather like: Load a savegame with a bunch of constructionsides, and the bug will appear.

now that you mentioned it I remember myself about this as well. In addition I noticed that after I build a new constructionside in this case it showed only around half the wares on its way (dark symbol) this changed after reducing! the priority and all of the wares were dark coloured. (and they finally arrived)


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 1027
Ranking
One Elder of Players
Location: GER
Posted at: 2019-05-02, 16:14

hessenfarmer wrote:

WorldSavior wrote:

hessenfarmer wrote:

Could it be an idea to collect instances of this issue in form of savefiles and replays to get a clue what is going on? Shall we call or it here in the forum?

It's not like the bug is rare. It's rather like: Load a savegame with a bunch of constructionsides, and the bug will appear.

now that you mentioned it I remember myself about this as well. In addition I noticed that after I build a new constructionside in this case it showed only around half the wares on its way (dark symbol) this changed after reducing! the priority and all of the wares were dark coloured. (and they finally arrived)

It's seems to be usual that not all wares are sent immediately to a new constructionside, maybe this is one of the reasons for the bug (for example not all ware delays are saved correctly in the savegame or whatever). Does anybody know why constructionsside don't get all wares immediately? Reading your post I don't see an obvious link between changing the priority of the wares and the end of their delay. I even tested it: I placed a barbarian trainings camp and tested if the priorities change the delay of the wares, it's not the case.

Edited: 2019-05-02, 22:31

“It's a threat to our planet to believe that someone else will save it.” - Robert Swan

Top Quote
manphi
Avatar
Joined: 2019-04-29, 23:54
Posts: 4
Ranking
Just found this site
Posted at: 2019-05-03, 00:23

I have a question to this: is the route stored in the savegame or calculated newly every time you load a game? Because I only can confirm that after loading a big savegame some resources are not delivered correctly- not only for buildings but also for production. And if the routes are stored there's something wrong with loading, otherwise the routifinding is broken when it has to do too much calculations at once. Or can anybody give an example for a not loaded game where wares are not delivered?

edit: I just saw an insteresting behaviour in a savegame. To explain that I have first to explain my main road system a little bit: I always build two roads to the next flag- so they have to have an angle in the middle. On a flag there where about 5 wares (fish and smoked fish). It was a main crossing, so there where 6 roads attached to it. On one side (NW) 2 normal, then (NE) 2 with horses and the last two (S) with 1 horse and one without. But no carrier wanted to pick up the wares. Then I destroyed on of the roads to NW (without horses), nothing happend. Then the one south without horse, and suddenly the other began to carry the wares. I have the savegame right befor that to show you what I exactly mean- but don't know how to upload here, or should I use a different page for uploading?

Edited: 2019-05-03, 00:37
Top Quote