Polls

Default Game Speed

Log in to vote!

Latest Posts

Topic: Measuring working time of productionsites

hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 913
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2019-05-21, 20:33

Tibor wrote:

Also, as I said few times, there will be no change for players... this statistics is only for AI use...

Now that I got the concept right I would vote to try this for UI as well, as said above.


Top Quote
Tibor
Joined: 2009-03-23, 23:24
Posts: 1270
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2019-05-21, 20:54

I am really glad, if we use it for UI I am eager to hear the feedback of players....


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

Tibor wrote:

I am really glad, if we use it for UI I am eager to hear the feedback of players....

me too


Top Quote
stonerl
Avatar
Joined: 2018-07-30, 00:03
Posts: 278
Ranking
Tribe Member
Location: Earth
Posted at: 2019-05-23, 14:28

Just one question. As far as I understand, the maximum time a program is “allowed” to run are 180s. But this concerns only the main work program. All Subprograms that are called from the main program are part of it. That means the tool smithies work program would run 10 minutes, if all tools are produced. Did you consider this?


Top Quote
Tibor
Joined: 2009-03-23, 23:24
Posts: 1270
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2019-05-23, 15:42

stonerl wrote:

Just one question. As far as I understand, the maximum time a program is “allowed” to run are 180s. But this concerns only the main work program. All Subprograms that are called from the main program are part of it. That means the tool smithies work program would run 10 minutes, if all tools are produced. Did you consider this?

Well, I am not that familiar with the productionprogram code. If it is the case - than this is not what I wanted....


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

stonerl wrote:

Just one question. As far as I understand, the maximum time a program is “allowed” to run are 180s. But this concerns only the main work program. All Subprograms that are called from the main program are part of it. That means the tool smithies work program would run 10 minutes, if all tools are produced. Did you consider this?

i think it doesn't matter as the code only counts the time between the last program end and the current program end. It doesn't know if it is a main or a subprogram. So only subprograms matter for the 3 minutes count. At least that is my understanding


Top Quote
stonerl
Avatar
Joined: 2018-07-30, 00:03
Posts: 278
Ranking
Tribe Member
Location: Earth
Posted at: 2019-05-24, 15:51

Hessenfarmer is right. I just had mixed things up here face-sad.png


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 913
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-01-10, 10:17

I have made a branch now for using the time based AI statistics in the display of Productionsites. https://github.com/widelands/widelands/tree/productionsite_performance
for me it looks good and reasonable. Saving and loading of a game is not yet tested. We might consider renaming some variables in case we take this (e.g. the stats are no longer crude)
as a side effect the calc_statistics no longer calculates them but only formats them which was a very old TODO from Sirver.
happy testing.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 913
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-01-10, 10:44

here is the related Appveyor windows build.
https://ci.appveyor.com/project/widelands-dev/widelands/builds/30019795


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 913
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-01-12, 19:49

ok I made the game save the current stats so in a loaded game we don't start with 0 productivity. side effect is that now the AI knows about productivity in a saved game as well.
However there is one shortfall: productivity never reaches 100% it sticks with 98% for most buildings. I believe this to be an effect of the asymptotoc function we use. Question is whether this is acceptable or if we should fake 100%


Top Quote