Currently Online

Latest Posts

Topic: Widelands tournament Easter 2018

einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1041
Ranking
One Elder of Players
Location: Poland
Posted at: 2018-04-05, 10:18

Congratulations hessenfarmer!

He is the first guy who managed to complete whole 24-hours game!

All files are in a regular place:

Also he prepared simple lua script for getting fully promoted soldiers count. It is available here. If somebody knows more about lua scripts, please verify if it is OK (from my perspective it is, but I want to have a confirmation from you guys).


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

Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 1135
Ranking
One Elder of Players
Location: GER
Posted at: 2018-04-05, 12:38

kaputtnik wrote:

The easiest thing would be to have a special sort of wincondition which is GameTime based. After 12 hours game time a savegame will be automatically created and after 24 hours an additional save game and the Game pauses.

Since only one map is involved, such a 'wincondition' could also be implemented as a scenario, i think.

The idea with the scenario is good, if this can be downloaded for every version. Wouldn't it also be possible to let the scenario count the top-soldiers? In 24h one can create more of them than one wants to count... But wait: There is a huge disadvantage, isn't it? I think that there cannot be replays of scenarios... At least it's not usual...

This could also be adjusted to show a message box every hour saying x time left, x time until final.

I'm not sure if I like that idea. In my opinion those messages are not really necessary and in build19, they let collectors and the replays often crash...

All what to do is to add a bit scripting to the map and upload it to the website or provide it somewhere else for download.

king_of_nowhere wrote:

a bit of a noob question here:

A noob question of someone who is probably one of the two best players in Widelands' history? face-smile.png

GunChleoc wrote:

WorldSavior wrote:

As I told somewhere, build19 shows the exact minute if you save the game. Unfortunately some developer decided to destroy this feature in trunk.

For savegames, just select the savegame from the list, and you'll see the gametime in the right-hand panel.

Thanks for the hint, I'm going to check it out at the next opportunity

Replays have always had the problem that they only show the time the game was started and don't show the time the game was finished. Fixing this has been on my wishlist for a few years now.

Why is that a problem?

If you prefer to hunt down the numbers with the b19 interface, you can still do so - you just can't open them.

We already have a bug open for toggling between the pretty names and the raw filenames.

Okay...

einstein13 wrote:

Level 10 soldiers... I assumed that level 10 soldier is fully promoted one for every tribe. If it isn't, I should change the text then. I will do it rigt after I will have a PC time (now wroting feom mobile). Thanks for getting the issue.

You're welcome. I just realized that it could be confusing that some level-10-soldiers count 11 points in the statistics....

Several tries. Yes, you can be the first in ecery cathegory with different games.

Okay...

But can you spend so long time dor the games? face-smile.png

Probably not... Even one of this 24-games is like a huge monster... Maybe I wont have time at all.

Counting max level soldiers. Yes, every soldiers in military buildings counts. In every type. Preffered is fortress because it can hold many of them and it is easy to count then. Smaller ones ca be skipped by mistake while counting. Soldiers outside of them don't count. It is hard to coumt their number, plus it would not force the type of the game and the strategy.

Okay...

Exact time. As it was tokd, after saving the game, you can see the exact time in the menu. In the statistics yoi should see approximate time. In game clock would solve all the problems. Any differebces, lets say +/- 15 minutes should be acceptable, but I don't eant to write it into the official rules. There is a possibility to calculate manpower from known values and increase through the time. My general idea is that there will not be such problems, because participants will have big differences between them. Of course it is an assumption. face-wink.png

Scenario map? I haven't tried making scenario before, but if somebody creates that, I can add an approval to the rules. That would be great for most of players. :)

king_of_nowhere wrote: I wonder if it would be too much to ask for an option "only train soldiers in evade" that automatically kicks out soldiers with evade 2 and ignores them when calling for more. Meh, probably too specific, and too difficult to code.

Maybe if you tell the labyrinth to store neither shields nor golden t-shirts? I don't know if this would be still too difficult to code?

GunChleoc wrote:

I could imagine the following buttons on trainingsites:

  1. prefer heroes/rookies, just like we have for military sites
  2. A button for each feature that can be trained to switch it on and off.

This button could be useful for evade #2. Or it could replace my idea with "not storing switches off" everywhere...

einstein13 wrote:

Also he prepared simple lua script for getting fully promoted soldiers count. It is available here.

Will that influence the rules of the tournament?


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

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2891
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-04-05, 13:00

Script looks OK in principle, but I don't see a timer on it. So, the game will be paused with a message box popping up all the time.

Better send a message to the player instead, this will also mean that it will be possible to watch the replays. The problem that the scenarios have in replays are the story message boxes, as far as I know.

For the script to work with older versions of Widelands, you'd need to delete the Frisian stuff. I don't remember if we changed anything else in the API about those particular functions, we'll just have to try it out and see what happens.

As to the replays gametime, I always found it confusing that it only shows the start time of the replay and not the length.


Busy indexing nil values

Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1307
Ranking
One Elder of Players
Posted at: 2018-04-05, 14:59

teppo wrote:

king_of_nowhere wrote:

We really need a better roading algorithm. I built two parallel roads to speed up ware transportation, and all the traffic got stuck. Looking in detail, I notice there was a point where the two roads were connected, and the carriers were shifting all the traffic on just one road, possibly because it was one step shorter. One road unused, another stuck. somebody with the right skills should develop a sorting mechanism that allows for ring roads.

Was this a temporary thing?

I have done something similar, and a jam like you describe appeared for a short while.

I suspect that the router found a busy path and empty path, and started assigning all new stuff to the not busy new way. Since there were no carrier animals on the new road segmants, the road got badly stuck. When the new road stopped being significantly better, the situation stabilized.

I wrote this from memory, did not check code, could be wrong.

No, it's permanent. I had lines of wares waiting to be transported from several screeens over, but there were still many carriers sitting idle. wares arrived faster than one single road could remove them, and parts of the second road were not used.

There are also traffic snags that are completely permanent and willl never, ever fix by themselves. It happens when there are three roads connected in a triangle with corners A, B, C. It may then happen that: - carrier AB wants to move a ware from A to B, does not want to take anything back, can't unload ware because flag B is full. Flag B is full and is not being emptied because - carrier BC wants to move a (different) ware from B to C, does not want to take anything back, can't unload ware because flag C is full. Flag C is full and is not being emptied because - carrier CA wants to move a (different) ware from C to A, does not want to take anything back, can't unload ware because flag A is full. Flag A is full and is not being emptied, we've already covered carrier AB.

such snags can only be fixed in two ways: building new roads from one of the aforementioned A, B or C flags (not always possible) or cutting one of the roads. I have seven screenshots detailing one such snag happening to the AI, it completely locked it in a 50 hours game.


Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1041
Ranking
One Elder of Players
Location: Poland
Posted at: 2018-04-05, 15:30

@GunChleoc

The script was designed to run from console at the end of the time. So I open replay game, then pause, then open a console and run the script. So it is partly-automated thing.

@king_of_nowhere

It is strange thing you are describing. Sometimes I have seen similar case (one road never used) in a small scale. Triangle ABC, many wares going -> A -> B -> and nothing through the "C". But it is understandable (twice long way).
The second case is a roundabout problem. And as far as I know, from mathematical point of view it should not happened ever. But with one condition: wares on roundabout have priority. In Widelands it can happen in two major cases: wares going -> A -> B -> are put faster to "A" than wares going -> C -> A ->. The same condition in every node. So wares going outside to inside are going faster than inside wares. That is very unlikely (but possible).
Second case is when you destroy a road/building immediately. Then some wares changes the route and it can be "confusing" for roundabout itself.

So I guess that you could see the first case, but it should happened once or twice in the whole game. If it is more than two times, you should be a winner of European lottery prize face-smile.png


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

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 635
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2018-04-05, 19:04

Problem with routing is as far as I know that the ware gets its whole route when it is send on the way so if a flag is heavily overloaded it wouldn't just solve itself cause the old wares still want to keep their old way. Have seen it some times in very special combinations. But hey problems are there to be solved


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1307
Ranking
One Elder of Players
Posted at: 2018-04-05, 19:55

einstein13 wrote:

@king_of_nowhere

The second case is a roundabout problem. And as far as I know, from mathematical point of view it should not happened ever. But with one condition: wares on roundabout have priority. In Widelands it can happen in two major cases: wares going -> A -> B -> are put faster to "A" than wares going -> C -> A ->. The same condition in every node. So wares going outside to inside are going faster than inside wares. That is very unlikely (but possible).
Second case is when you destroy a road/building immediately. Then some wares changes the route and it can be "confusing" for roundabout itself.

So I guess that you could see the first case, but it should happened once or twice in the whole game. If it is more than two times, you should be a winner of European lottery prize face-smile.png

it's not so rare, the bigger the map the more likely to happen. it does not require different speed of wares, it merely requires that wares are accumulated faster than they are removed. At some point with 8 wares on the flag the flag can't take any more, and the carriers stop. And it's actually all the rerouting that generates those locking triangles. It is not rare to see it on AI in long maps with cramped spaces (like concentric rings), because the AI tend to make bottlenecks and to solve them by building additional roads at random. If the bottleneck cannot be solved trivially, the AI will just build new roads around it, and they will progressively get more cramped as more wares are accumulated than they are removed from the bottleneck. At some point the formation of a dead triangle becomes inevitable. Knowing that you like big maps, I'm surprised you didn't see it happen more often.

A human makes much better roads than the AI, but he also produces many more wares.

I am sorry I cannot make a better mathematical treatment; I know there are several mathematical theories that can be used to describe the situation much better. But my knowledge of advanced math is not so deep. Also, the dead triangle is a bit of speculation on my side, but I have seen triangles where everyone is stuck and no one is moving, and it's the only consistent description I can find. You know what, I'll send you by mail the screenshots. Have fun figuring out what happened face-smile.png


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 635
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2018-04-05, 20:28

I agree it is more often than it shoulod be. In my experience it is not only a triangle problem it is very often a problem with a star road (one flag with many different roads connected ) the nucleus of this star condition could be more than one flag so maybe what you call a triangle might be just the center of a star roadnetwork. Can't explain it in math but that is what I feel to have experienced. But as I said as far as I know a ware will not be rerouted un less its preprogrammed route is not existent anymore so building new roads doesn't solve the problem always but sometimes worsen it.


Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1041
Ranking
One Elder of Players
Location: Poland
Posted at: 2018-04-05, 20:33

Here is a major screenshot:

Between those 4 outposts there is a major traffic jam. From my perspective it was caused by road deletion (somewhere), not the flows of wares. If you will see, in other screenshots you can find at least one place where there are two flags, one is dead end and you have two roads between those flags. Both flags contains full resources and carriers are full too. So for sure AI deleted road from one side.

Another thing is when the road change, the wares can change destination way, but carriers have to finish their work first. So the situation is not changed in a second. So traffic jams can happen more often. Especially when you have low flow somewhere, 8 wares everywhere, but moving and at once you change the road somewhere in the neighbourhood. Then you can spot such situations.

Knowing that you like big maps, I'm surprised you didn't see it happen more often.

I never spot such situations. Why? The only bottleneck in my roads are around warehouses. All my (main) roads has length of 2 and have the same capacity/max traffic. So from math way, there is no possibility to add more wares than to deplete wares. The only exception are processing places (but they get more wares than gives to the roads) and warehouses (which normally suck wares from outside). The exception is that a carrier has to move 3 units instead of normal 2. The second thing is that I used to build a complete road hexagon around the warehouse and literally no other building. So even if warehouse flag is full, I can bypass easily the flag around it.

And you can ask about complete rebuilding of roads. My method bases on building scrap bypass road, then destroying one single tile of rebuilding road, wait until first one is empty, then destroy and rebuild. Not very efficient way, but I don't have any problem of traffic jams and ware problems around this place. Any ware can easily change the road to the bypass one (and I expect that the algorithm does that).


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

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

WorldSavior wrote:

einstein13 wrote:

Also he prepared simple lua script for getting fully promoted soldiers count. It is available here.

Will that influence the rules of the tournament?

No it definitly will not change any rule. It just eases the work of einstein as the fully promoted soldiers of each tribe are counted by the script if run from the debug console. If anybody wants to use this for personal counting feel free to do so. If you are running a build older than that when the frisians came in you need to delete (or comment out the frisian parts). Einsteins question I think was asking if anybody has any objection for him using the script instead of counting the soldiers by hand.


Top Quote