Latest Posts

Topic: Do trees grow on mountains?

einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-03-11, 11:14

king_of_nowhere wrote:

einstein13 wrote:

(...)

My tests are much simpler. I made a small map with one single type of terrain. I don't expand. I simply build one forester and one woodcutter, and I see how much wood is produced in two hours. Then I change the terrain and do it again.

It is okay, but when trees will grow more than woodcutter can cut, you will have more than 100% production face-smile.png Maybe 2 or 3 woodcutters will help with that? face-smile.png That would be a test "how many big trees can be planted by forester?", no "how much wood can be cut within one woodcutter".

If you have all the numbers, I can collect all them in a "simple" table face-smile.png

Surprisingly, it seems barbarians woodcutters are better: in two hours, one woodcutter made 144 +- 1 trunks, against 130 for both atlanteans and empire.

Hmm... didn't know that! Surprise face-smile.png

I'm using buiild 7425 for windows.

I've downloaded more current: 7428, but there should be no different between them (on working tree model). To make all the tests we should stay on one dev version. Remember that on Windows you can "install" more versions of Widelands at once, just say that it should be unpacked to another folder and remember to give different names to shortcuts you are using to start widelands (f.e. Widelands_7425, Widelands_B18 for build 18 and so on face-smile.png ). I'm using that and it is quite efficient face-wink.png


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2015-03-11, 20:19

einstein13 wrote:

king_of_nowhere wrote:

My tests are much simpler. I made a small map with one single type of terrain. I don't expand. I simply build one forester and one woodcutter, and I see how much wood is produced in two hours. Then I change the terrain and do it again.

It is okay, but when trees will grow more than woodcutter can cut, you will have more than 100% production face-smile.png Maybe 2 or 3 woodcutters will help with that? face-smile.png That would be a test "how many big trees can be planted by forester?", no "how much wood can be cut within one woodcutter".

Well, currently I make one woodcutter for each forester, so my idea was that if the forester plants enough trees to keep the woodcutter at 100%, then I'm happy with it. But you are right, 2 woodutters would be better to make sure I cut all the trees planted. I'll have to experiment with both one and two woodcutters to see if I can make more than one woodcutter for each forester under favorable conditions. My main aim is to explore conditions similar to the ones in game. I also plan to severely restrict the forester's space with roads to see how many spaces a forester needs to work at 100%.

Edited: 2015-03-11, 20:22

Top Quote
king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2015-03-13, 01:34

Ok, some more testing. As long as I only had there one forester and three woodcutters (only barbarians for now), there was a lot of wood, i got 200 trunks in two hours. but many of them just spawned spontaneously near the already planted ones. Then I made a road grid so that trees could not spawn near each other, but there was still plenty of room for them, and I got 115 trunks in two hours. Most of the time I wasn't looking, but I saw that not every tree will survive, not even on a good meadow. Then I did the same, but using additional roads to close spaces. with 10 spaces to plant trees, the forester still made 115 trunks in two hours. with 5, it made 113, which is the same within statistical error. In the future I will try with less space.

However, it is pretty clear that the production of a forester/wooodcutter system isn't simple too calcuate. Extra trees will spawn in a manner that is impossible to predict in a game, because it will depend on how roads and buildings are placed. The one conclusion I can make is that the more continuous ground the forest can cover, the better, so it's better to bunch up all your foresters in a place and keep it as free as possible from other obstacles than to spread the foresters in between other buildings (not that in some small maps you really have a choice about that).

Any equation on wood productivity will depend on terrain shape on which the forest will grow, so it is pointless to try and find one. BUt I will try different terrains.


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2434
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-03-13, 08:36

I have a feeling that you miss the point.

king_of_nowhere wrote:

However, it is pretty clear that the production of a forester/wooodcutter system isn't simple too calcuate.

The calculation einstein13 makes, is not to calculate such a thing.

Any equation on wood productivity will depend on terrain shape on which the forest will grow, so it is pointless to try and find one. BUt I will try different terrains.

einstein13 calaculates the values for the terrain affintys to make f.e. palm trees do only grow on an appropriate terrain. So in the end you should make the same test on a map with one terrain type. After that test is finished (after 2 hrs) give the same map another terraintype and make a new test with this terrain. I think the values which einstein13 needs are:

  1. terrain type
  2. Which trees grow/are planted on this terrain type

einstein13 than calculates the values for the terrain affinity.

The problems you have described in your first post here, is a result of this calculation. To prevend this problems , there are more tests needed to get a good solution for each terrain type.

einstein13: correct me if i am wrong face-smile.png


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-03-13, 10:49

Ok, both of you are right face-smile.png

First: I did tests with old system for greenland. The conclusions are on the pdf file mensioned before: There is an approximate equation for forester-woodcutter system. It depends on space between buildings, terrain type and that is all I remember now face-smile.png

It is impossible to calculate exact number of trunks, so that I make approximate calculations within 2 hours. Maybe making longer period will help? I don't know face-wink.png

All I need now are two parts:

1) making some tree-terrain tests for terrain affinity to see which tree is growing better on which terrain types. It makes about 40*16=640 tests (no. terrain types x tree types). Already, on some tests, I've noticed that palms can grow on ice! I want to test all the cases to get those suprises face-smile.png

2) To make some tests for forester-woodcutter system. This part will include growing trees on random spots, but not beeing planted by forester. The terrain factor miu (number of grown trees/ number of planted trees) can be more than 100%. It is normal, king_of_nowhere. But your tests are also very good - see what radius should be empty to have best growing results.

All the results will be good for both editors and players: editors will know which type of tree can grow on which type of terrain (from test 1), and the players will know on which terrain type they can grow more trees.

Of course you can make more tests to see the differences, just as you want face-smile.png It is up to you!


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2015-03-13, 22:00

well, the thing is that the affinity of the terrain for the tree is not a fixed number. the probability that a tree will spontaneously spawn in a place is dependent on how many other trees of the same type are already there. Strongly dependent on it, it seems. to the point that when i built roads to prevent trees from spawning close to each other, I got almost 50% less trees produced. The miu factor is not a constant, but it is dependent on how many trees are already there.

This is not just an effect of having less terrain where trees can spawn. the roads were around the forester, but there was a lot of terrain without roads around that, and it didn't produce trees. That shows that the probability of trees randomly appearing is very small without other trees nearby. And that's quite realistic, by the way. that's why you tend to find trees clumped in forests.

So, you can calculate the probability that a forest will appear after some hours, and einstein does just that, however that for a player is useless. A player does not need to know how many trees will be there if he let a forester grow trees for 2 hours and then cut them, because a player wants to cut those trees for wood all the time, not leave them two hours. And a player doesn't have much use for how many trees can grow in an empty place, cause a player needs to make buildings and roads and those will reduce the space trees have to spawn and will change radically the spawned amount.

To make a comparison, what einstein is doing is like calculating the equations of motion in the absence of attrition. Yes, they are scientifically sound data, but they are useless to decide how to build a car. You can tweak them to include attrition, and that's what we do in science, but in the case of widelands that would require calculating how many adjacent spots are there for trees to spawn near each other, that would be different for every map and for every configuration of buildings that you can make, so no chances you can calculate that scientifically. What I instead do is doing some empirical trials to see the factors that affect tree production. it's not very scientific data, it doesn't teach you much about the universe, but it gives some rules of thumb on how to place foresters, rules that you can actually apply in a game.

but we both produce useful data. our data is different because we measure different things because we have different goals. He wants a good mathematical model of tree growth. I want to know what are good terrains for foresters and how close I can clump them. therefore, we are both going to keep making tests in our own different ways.

Edited: 2015-03-13, 22:01

Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-03-13, 22:57

king_of_nowhere wrote:

the affinity of the terrain for the tree is not a fixed number.

It is a fixed number. Or more exact: fixed probability of growth. You can calculate on your own using simple adding, multiplying and not very simple (but for computer yes) exponential funcion.

the probability that a tree will spontaneously spawn in a place is dependent on how many other trees of the same type are already there.

That is true

The miu factor is not a constant, but it is dependent on how many trees are already there.

It is a constant for the terrain type. I assumed only that all the foresters are working in the same speed face-wink.png

To calculate more complex model you use another equation, not only terrain type, but also the distance between foresters and woodcutters. You should see the old calculations one more time. They include constant growth

however that for a player is useless. (...) because a player wants to cut those trees for wood all the time, not leave them two hours.

I have to disagree!

If you have limited space, you want to have as many wood as possible. If you calculate that after 2 hours in one condition you have 1000 more wood in stock and second condition will produce only 100 of them, which conditions will you pick? Simple calculation: first: 1000/(260)=8,333 wood per minute, second: 100/(260)=0,833 wood per minute. Which would you choose? I would the first one, because I can produce more wood. Simple.

And a player doesn't have much use for how many trees can grow in an empty place, cause a player needs to make buildings and roads and those will reduce the space trees have to spawn and will change radically the spawned amount.

To make a comparison, what einstein is doing is like calculating the equations of motion in the absence of attrition.

"Attrition" (or "friction") in this case is very small. If you are a good player (and I know that you are, king_of_nowhere), you should know that around the forester you should build as less buildings as possible. Also placing foresters in different spots make difference. That is why we are doing those tests.

I will not tell you how many trunks and planks you will have in your warehouse, but I will tell you where and how you should built foresters to have the highes efficiency. Simple.

What I instead do is doing some empirical trials to see the factors that affect tree production.

Good, I did that before face-smile.png And now I have empirical factors, also miu factor is empirical face-wink.png

it's not very scientific data, it doesn't teach you much about the universe, but it gives some rules of thumb on how to place foresters, rules that you can actually apply in a game.

Hehe face-smile.png I did that before, as you can read now face-wink.png

Rules:

Place foresters on meadow 1-3, with 3 units spaces between foresters and woddcutters (between all the buildings). You will have the highest efficiency (using the same amount of territory for foresters and woodcutters) on Build-18, greenland.

but we both produce useful data.

Yes it is face-smile.png

our data is different because we measure different things because we have different goals.

No it isn't face-wink.png We are producing the same data, because we have the same goals: have the highes efficiency for forester-woodcutter system.

He wants a good mathematical model of tree growth. I want to know what are good terrains for foresters and how close I can clump them.

I know the second part, only I don't know is new miu factors.

therefore, we are both going to keep making tests in our own different ways.

You made a bit different test than I did before face-wink.png

Good for you- you will know some things better- but most of data is already shown.

To be specific: file, points 7 and 8.

Ok, there is only one difference: now the forester can't plant tree on existing one, on Build-18 it was possible.


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2015-03-15, 20:14

Well, I have to disagree on a few points:

"the miu factor is a constant for the terrain type."

ok, the way you are defining it, it is. but that requires letting trees grow on open terrain. the probability of spawning trees is depending on how many trees are already around it, but on open terrain that will average out and give a consistent value. however, if you start making roads on that terrain, I'm sure it will start to go down after a while. Without calculation, I'd guess the decrease would be sigmoidal.

"If you calculate that after 2 hours in one condition you have 1000 more wood in stock and second condition will produce only 100 of them, which conditions will you pick?"

Well, there are other considerations. for example, I know that I will produce more wood if, instead of letting the woodcutters work, I stop them, let a forest grow, and then let them chop everything. But in the time I wait, I am not growing, and my opponent may arrive and kill me before I start to chop. Or, if I chop wood immediately I will chop less wood in the long run, but I will make farms sooner, so I'll produce more farm resources. And last, to grow a big forest one needs a lot of space, that one wants to use for other buildings.

And you know that yourself, because I've seen your games and you neither make foresters and woodcutters in what would be considered the optimal way by your calculations, nor wait for a forest to grow as would be considered better. So yeah, I know fully well that I should leave free space around a forester, but I also want to cram as many buildings as possible in my land, hence the trials to see exactly how little space I can leave a forester before the production goes down too much. Basically, I'm not interested in the tree production per forester, but in the tree production per occupied space.

Anyway, I finally made the tests that spurred my interest in the topic in the first place, and I can finally say that, as of build 7425, trees do NOT grow on mountains. Not even on summer-type terrains.


Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-03-15, 20:51

king_of_nowhere wrote:

Well, I have to disagree on a few points:

I like that face-smile.png good disagree make true science face-smile.png

"the miu factor is a constant for the terrain type."

(...) the probability of spawning trees is depending on how many trees are already around it,

That is true, and because of that to get the miu factor I assume only one more thing: the fully grown tree have to be cut imidiatelly. This always decrese the spawning factor to basic one.

Without calculation, I'd guess the decrease would be sigmoidal.

probably you are true face-smile.png

for example, I know that I will produce more wood if, instead of letting the woodcutters work, I stop them, let a forest grow, and then let them chop everything.

Yes, that will work on some soils. But it is very hard to proove in experimental work now. I don't know what is the timing for growing- not growing trees (good values!). Also it is very hard to place in a real game (human- human). Usually you don't have mind for such work and you'd better choose constant, sligtly worse, but still good results.

I guess that improving the trees efficienty here is also sigmoidal.

But very good idea! If you have time- do it durig the game.

And you know that yourself, because I've seen your games and you neither make foresters and woodcutters in what would be considered the optimal way by your calculations,

You have seen the 2 games with me face-smile.png (or maybe another too?)

  • The crater.

The game was pretty fast and the soil very good. I didn't need any forester to win the game. I placed them only to be sure that I will not get rid of trees. Prevention rather than production.

  • Desert tournament.

I didn't have any place to put more than 2 or 3 (in one game!) foresters. They weren't optimal, because I never use there so much wood. 2 foresters are eonugh for Empire. Empire needs there more farm spots. I'd rather to get crops -> flour -> bread instead of wood face-smile.png Also desert type of map is out of my tests. I did them only on greenland map.

but I also want to cram as many buildings as possible in my land

Why for? I don't like to see that my buildings are not working well because they have no space (farms -> ...; foresters -> woodcutters -> ...) In a smaller maps- ok, that is very important. But on larger ones? Why for? face-smile.png

but in the tree production per occupied space.

Simple calculations: you had 10 x 10 space has 311 nodes, that produced 1999 trunks in 2 hours.

  • 1999/311/120 ~= 0.05356 trunk per minute per node
  • 1999/311/2 ~= 3,214 trunk per hour per node

Other spaces around were filled by grid of roads, like in your idea of limiting the space.

Anyway, I finally made the tests that spurred my interest in the topic in the first place, and I can finally say that, as of build 7425, trees do NOT grow on mountains. Not even on summer-type terrains.

Do you have any numbers I can publish? I would like to include your tests too.


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
king_of_nowhere
Avatar
Topic Opener
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2015-03-16, 00:26

Do you have any numbers I can publish? I would like to include your tests too.

I didn't use the chronometer this time, cause I was in a train with the laptop on my knees and a bag under my legs and trying to not invade too much space from the guy next to me so I didn't have time to pull out my phone :) but I've looked for one or two minutes, with speed 10x, and I saw that virtually all trees planted died. with mountain 1, in that minute or 2 only 1 tree managed to grow up fully. with a mix of all four mountain types, not even one. So, I'd say the chance of a tree growing on a mountain terrain of any kind could be around 3%


Top Quote