Topic: main roads becoming normal again
WorldSavior |
Posted at: 2018-04-26, 13:31
It's difficult to watch this discussion... How will the new concept work if you link two flags with several street-segments at once? (In most cases two segments.) And what about street-segments at buildings? There the carriers don't only walk between the flags, but also beyond, into the buildings. Wanted to save the world, then I got widetracked Top Quote |
ypopezios |
Posted at: 2018-04-26, 14:46
It is difficult as well for everyone involved in it. Such threads need regular updating on their first post with the relevant information. But this is a task for either the first poster or a moderator.
The short answer for your scenarios and every other scenario is this: The new concept will work better than the old concept. A longer answer is that the algorithm makes the most of what information is available to it. If someone could provide me with code to bring more information, I could certainly incorporate it into the algorithm, thus improving it. The same is if someone could provide me with line numbers in the code of other files where special events take place. As long as we have the wallet, we can add/remove coins from it whenever we want to affect the things it controls (in this case the promotion/demotion of the road). A detailed answer could also be given, if a question gets more detailed. Top Quote |
Tibor |
Posted at: 2018-04-26, 19:42
Finaly it works - I am able to see promoted roads: I had to divide by 1000 as discussed above Edited: 2018-04-26, 19:44
Top Quote |
hessenfarmer |
Posted at: 2018-04-26, 19:50
wouldn't that skip the concept of integer Math? Top Quote |
hessenfarmer |
Posted at: 2018-04-26, 19:53
that should be the basic requirment of every change. But as with all requirments it has to be verified that it does. Top Quote |
ypopezios |
Posted at: 2018-04-26, 20:58
In the log, gametime and last_wallet_check are always identical. If you placed the printf after last_wallet_check_ = gametime , move it higher. If it's already higher, something is going on. Inform us when and how we can test the debug build ourselves.
The property wallet_ is defined as an integer, so any decimal digits get probably truncated. In any case, coins are whole numbers.
That's not the basic requirement, but the ideal one. Still I'm confident that we'll meet it.
We are getting there, one step at a time. And there is plenty of room for further improvements. Top Quote |
Tibor |
Posted at: 2018-04-26, 21:17
OK, modified printf:
the revision is pushed to launchpad, feel free to pull and compile. Also the merge request should compile windows binary I believe... Top Quote |
ypopezios |
Posted at: 2018-04-27, 07:01
One build timed out, but the rest work. Promoting happens very rarely, for no obvious reason. So it's not ready for testing by users.
Is there a way to get similar prints in Windows? Also, could you find me the files which contain notify_ware, as well as the file where class Carrier is defined? We are close to show-time, but not there yet. Top Quote |
Tibor |
Posted at: 2018-04-27, 07:32
On my test map there was simply not much reason (too low traffic) for roads to be promoted
Ou, printf() should be changed to log()...
grep is your friend:
oops, not found, but this will find it:
Edited: 2018-04-27, 15:27
Top Quote |
king_of_nowhere Topic Opener |
Posted at: 2018-04-27, 13:06
Depends. If the old algorithm promotes both roads in two minutes, and the new algorithm promotes the busyest road in one minute, then yes, I'd call it a small improvement, because one minute does not matter too much. Do not take it personally. I am not saying it to bash your work. I would not turn down improvements. But as long as roads that needs promoting are promoted in reasonable time, and are not demoted if they keep enough traffic that they need the second carrier, if just occasionally, then there are no large problems and only small improvements are possible. Top Quote |