Topic: main roads becoming normal again
ypopezios |
Posted at: 2018-05-16, 16:12
You can always solve it locally for your computer ;P
Of course another topic, but it has to belong in some subforum. "Technical Help" doesn't sound appropriate for it.
The idea is to rebuild the whole system, but one patch at a time. I'm open to proper ways of communication. Top Quote |
GunChleoc |
Posted at: 2018-05-17, 06:50
It works with this really simple fix, so there is no need to add any complicated code instead. The only time this is not called if there is no ware transport happening in the whole economy at all, in which case we don't care anyway. I have tested it. Swapping the ware routing is a good project
Game Suggestions fits best I think. Edited: 2018-05-17, 06:53
Busy indexing nil values Top Quote |
ypopezios |
Posted at: 2018-05-17, 12:39
I wish it was that simple. Actually I already tried an almost identical fix (the commented-out charge) and it didn't work. I tested your version and it doesn't work either. Fully-idle roads never get demoted, they fall into endless sleep, even if attached flags are full of traffic. Moreover, the debug version doesn't compile anymore. There are many ways to fix this, but they depend on your coding style. Top Quote |
ypopezios |
Posted at: 2018-05-17, 16:03
Edited: 2018-05-18, 02:29
Top Quote |
GunChleoc |
Posted at: 2018-05-22, 06:13
According to the log output, my new line for demoting idle roads is working:
The problem is that the empty wallet doesn't trigger a demotion, so that is where the fix needs to be.
One of the website binaries isn't linking - I have no idea why yet. I'll be separated from my development machine over the summer, so I won't be able to look into this any time soon. I have to concentrate on bugfixing for Build 20. Just use the release builds for testing in the meantime.
Agreed, but not in this branch. The bigger a branch, the harder the review, and it has nothing to do with road promotions. There are many cleanups like this that need doing, but we don't have enough people to do them. Busy indexing nil values Top Quote |
ypopezios |
Posted at: 2018-05-22, 12:55
The log confirms that your line is executed for some roads (my line did too). But those roads are only temporarily idle (and most of them are not promoted either, so the "DEMOTE idle road" message is misleading). Fully idle roads never reach that line, because no code is executed for them during their sleep.
The debug version doesn't compile because it complains for your implementation of constant kMaxWallet. The release version escapes that because it optimizes constants. It's all explained here.
Release builds don't give me any info, so testing with them is like in blind-mode. If you don't plan to address that soon, better revert to function-level constants, for debug version to be available.
Is there a place where those cleanups are listed for someone to address them in the future? Or is the mess so big that only a general cleanup is planned (and postponed for ever)? Top Quote |
Tibor |
Posted at: 2018-05-22, 13:16
I think if you was able to compile the game by yourselves, a lot of issues would be gone: kMaxWallet issue, you could have any debug output you wish... Also there is no sense to have a list of needed cleanups as there is no pool of developers aching for such list... Top Quote |
GunChleoc |
Posted at: 2018-05-23, 06:49
We do have a list of wanted cleanups: https://bugs.launchpad.net/widelands/+bugs?field.tag=cleanups Feel free to open new bugs and add the tag
I know. I can read the logs. The problem isn't what, it's why, and I won't have any time for tracking this down for at least 2 months. I have a bunch of already finished features that won't make Build 20 because we're short handed on code review. So, I won't delay the release any further for an unfinished feature - this feature will be just as great in Build 21. Setting up a build environment in Windows does take time, but simply having bzr explorer so that you can pull and push branches would take you about 15 minutes. Then, you could try fixing this yourself - it's probably just a missing include somewhere Busy indexing nil values Top Quote |
WorldSavior |
Posted at: 2018-05-23, 16:48
I would be very interested if you could give some examples. I don't see how you could free Widelands from such shortcomings without changing the game too much. I hope that the official Widelands will be always as complex as it is now (approximately), so in this case one has to improve the AI instead of changing the game, if one wants to get a better AI.
How? Maybe it would make a lot of sense to teach the AI a clever road system for maps with perfect building ground, like in this description here: https://wl.widelands.org/forum/topic/2834/?page=1#post-19815 Wanted to save the world, then I got widetracked Top Quote |
hessenfarmer |
Posted at: 2018-05-23, 20:08
I fully aggree to this. However the Ai thing is complicated. I think Tibors effort to implement a generic algorithm solution is good for tuning the values in the algorithms. But the algorithms and the models need to be working efficiently as well. This is leading to two possible fields of work to improve the AI. Problem might be that after an algorithm change the training is set back to a state worse than already achieved, but some weaknesses in algorithms only appear after Ai has been trained sufficiently. Short story having a look in the AI algorithms might be a good idea to identify any weaknesses.
Problem is that an algorithm of road building should be working for all maps. The suggestion in the discussion as far as I understand is to first build a road system then build the buildings. Currently AI is evaluating the need to build a building and afterwards tries to link all buildings by roads. So the change would rather be big and can't be tested easily. For the beginning a clever algorithm to find the shortest road to the closest flag could be an improvement. Perhaps another algorithm to identify and solve bottlenecks could be an improvement as well. Edited: 2018-05-23, 20:08
Top Quote |