Bring back terrain affinity

Bug #1328635 reported by SirVer
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
High
Unassigned

Bug Description

The one_world branch removed terrain affinity. The problem was that for each terrain/tree combination a number (probability) was needed. This were already a lot of numbers for 16 terrains, but for the ~60 terrains that we now support it is just too much to maintain or even understand. The former model was already too complicated as proven by nodoby ever implementing terrain affinity for crops or other plants.

Without terrain affinity there are a number of issues that diminish the fun while playing though:

1) The interesting concept of where to plant foresters is gone - all trees grow everywhere equally well.
2) With all trees now in the one world, foresters have no idea of where to plan former blackland trees compared to former greenland trees - for now, all foresters plant greenland trees everywhere - looks funny on black and desert maps.
3) Crops/wine and other plants can still grow everywhere equally well. It would be more interesting if farms and vineyards needed to be placed strategically too.

This bug collects ideas of a simpler model that can group immovables into sets (i.e. "all former greenland trees") for foresters to choose from while also defining terrain affinity for these immovable groups.

Related branches

Revision history for this message
SirVer (sirver) wrote :

I go first, but I need more input from others too. I thought about defining humidity and temperature and then use a simple function to turn this into the growth probably we had before. This is handwavy - I need help with coming up with such a function.

This does not solve the issue of how to group immovables for forresters though. One idea I have here is to sample the surrounding terrain, generate a list of the top 6 most suited trees for the terrains and randomly plant one of them.

Changed in widelands:
status: New → Incomplete
importance: Undecided → High
milestone: none → build19-rc1
tags: added: regression terrainaffinity
tags: added: oneworld
Revision history for this message
TiborB (tiborb95) wrote :

Perhaps it would be best to split types of terain to categories:
-grass
-desert
-mountains/rocks (without snow)
-snow
-blackland

Each such category will have assigned group of trees, and will have onw "fertility" that would affect the speed how fast plants (crops and trees) grow...

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

In my opinion there should be 3 aspects of soil:
1. temperature
2. humidity
3. fertility
Trees can grow up, die or multiply, so every step can has its own function. Also the effect can be different:

Ex.1.:
Ashes are very fertile, but their humidity is low. Trees can grow up very fast, but probably they won't multiply there so much.

Ex.2.:
Deep soil is good for multiplying, and good for living (not death), but it is not as good as ashes in growing up.

There is another problem: types of trees. You mensioned that every tree can be different in every action. So the trees should have 3 parameters too.

This is only my idea :)
Just an idea

Revision history for this message
SirVer (sirver) wrote :

There is no need to model multiplying, only growing/dying.

Your idea is similar to my idea. I have trouble putting those ideas into formulas for implementing though. For example if a tree has 3 values, how do we come up with one percentage score for a tree to grow to the next stage?

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

I have a question before I will tell the answer. :)
Then the math model can be simple.
Is the Widelands some kind of simulation, and it is step-by-step with constant fps (as a simulation)? Or not?
And has the Widelands fast method for random numbers?
(My math model assume both things. If the second condition is not met, it will last for long time).

Revision history for this message
SirVer (sirver) wrote :

> Is the Widelands some kind of simulation, and it is step-by-step with constant fps (as a simulation)? Or not?

Each object in Widelands can register when it wants to "act" again, so trees can register to do something again in x milliseconds.

> And has the Widelands fast method for random numbers?

Yes, but random numbers are simple in Widelands. They have to be lockstepped too - i.e. each player in a game will generate the same numbers in the same order so that the simulation happens the same on each device.

That said, this is a small part of Widelands - so the model should be simple :).

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

I've made a model which should be easy to implement and easy to understand.
I'm sorry, but now I can't explain everything and come up with all the values, but some of them are given inside.
Also sorry for long introduction. Probably most of you do understand probability theory :)

Revision history for this message
Teppo Mäenpää (kxq) wrote :

The productivity of empty wells should depend on terrain type. 65% is fine for grasslands, less so for desert.

Is this related to the above, or a task of its own?

Revision history for this message
SirVer (sirver) wrote :

Awesome! I read through your model suggestions and pretty much everything makes sense to me. I want to implement the gaussian.

I started implementing something based on your ideas - immovables have 4 parameters (preferred_humidity, preferred_temperature and preferred_fertility and pickiness). Pickiness shall model how close to the preferred_parameters the actual soil parameters must be. I imagine it will be a scaling factor in the gaussian.

Not fully sure though how I can compare the values. If i have a plant (273 K, 0.8 fertility, 0.3 humidity, .5 pickiness) and a terrain (300 K, 0.3 fertility, 0.7 humidity) how do I turn this into one probability of growing? I thought about using a multi-dimensional gaussian and just calculating the mahalanobis distance between the vectors - but maybe you have a simpler idea?

Revision history for this message
SirVer (sirver) wrote :

#8: not really related. But the humidity of terrains can be used to model that too.

Revision history for this message
SirVer (sirver) wrote :
Revision history for this message
Albert Einstein (w-aaaaa) wrote :

> Not fully sure though how I can compare the values. If i have a plant (273 K, 0.8 fertility, 0.3 humidity, .5 pickiness) and a terrain (300 K, 0.3 fertility, 0.7 humidity) how do I turn this into one probability of growing? I thought about using a multi-dimensional gaussian and just calculating the mahalanobis distance between the vectors - but maybe you have a simpler idea?

Your plant is described by 3 gausses:
probability_fertility(soil_fertility):=exp(-(soil_fertility-0.8)^2/sigma_fertility^2)
probability_humidity(soil_humidity):=exp(-(soil_humidity-0.3)^2/sigma_humidity^2)
probability_temperature(soil_temperature):=exp(-(soil_temperature-273)^2/sigma_temperature^2)

Here you are describing "pickness". I'm not sure if you mean how pick or width is the gauss?
Pickness=1 -> narrow gauss
Pickness=0 -> flat function

If so, I propose:
sigma_fertility=sigma_humidity=[(1-pickness)*0.25]+0.01
sigma_temperature=[(1-pickness)*12.5]+0.1

1-pickness, because pickness is something opposite to width.
value is multiplyed by 0.25 or 12.5 because we want to have significant changes with pickness (those values are given by some visualisations of gauss functions).
addition 0.01 or 0.1 is for pickness==1 where sigma==0 and then in gauss funciton we have a division by 0. We want to skip this problem.
Also I want to say, that values 0.25 and 12.5 have to be tested in Widelands. Maybe some changes will be needed in this model.

Last part is to merge the results. Just multiply them:
probability_of_survival/growing_up=probability_fertility*probability_humidity*probability_temperature*factor

The factor is lower than 1. Why? We want trees to die. Even on best soil. Also we want them not to grow on that soil. Factor should be almost 1, but not exactly 1 :) it should be tested too. It can be changed with trees too (then some trees will grow and die faster).

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

And I forgot about the calculations :)
sigma_fertility=sigma_humidity=[(1-0.5)*0.25]+0.01=0.135
sigma_temperature=[(1-0.5)*12.5]+0.1=6.35
probability_temperature=exp(...)=1.4*10^-8
probability_fertility=exp(...)=1.1*10^-6
probability_humidity=exp(...)=0.000154

I choose factor=0.9
probability_of_survival=0.9*1.4*1.1*0.000154*10^(-8-6)=2.15*10^-18

This value is almost 0.
During further calculations it WILL be 0 (less than 10^-15 for double in range 0...1 it is 0).
So there are two possibilities:
1. Change the values in sigma definition
2. Change the soil ;) It is quite inhospitable for your plant

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

>Okay, I whipped something together. Does that make sense? http://bazaar.launchpad.net/~widelands-dev/widelands/terrain_affinity/view/head:/src/logic/terrain_affinity.cc#L74

I didn't noticed the comment.
In my opinion your work is good. But there should be any factor added at the end.
-->
std::0.95*exp(...)

That will be great ;)

Ps.: how can I edit my posts here?

Revision history for this message
SirVer (sirver) wrote :

> Ps.: how can I edit my posts here?

you cannot. Launchpad does not have this functionality.

> The factor is lower than 1. Why? We want trees to die. Even on best soil. Also we want them not to grow on that soil. Factor should be almost 1, but not exactly 1 :) it should be tested too. It can be changed with trees too (then some trees will grow and die faster).

dieing is already modeled in the game. Each tree has a constant chance of dying on each stage of its development. I decided to not touch this at this point in time.

Thanks for your help with this so far! I tested a bit and the code basically work, so I think I am done implementing the model. Now I need help figuring out the values (3 for each soil and 4 for each tree). I added NOCOMM() in each place where change needs to be done. I would be thankful if somebody could take that off of me and figure out suitable values that fit the engine, makes all worlds (the old winter, green, black and desert maps) playable and looks nice. I'd rather continue fixing bugs and review the many open pull requests. Volunteers?

Changed in widelands:
assignee: nobody → SirVer (sirver)
status: Incomplete → Opinion
status: Opinion → In Progress
Revision history for this message
Albert Einstein (w-aaaaa) wrote :

I will try to make up some values, but it is qute confusing in wastelands and desert:
which is hotter?
Are all the wasteland soils fertile?
And so on ;)

Revision history for this message
Teppo Mäenpää (kxq) wrote :

If the widths of the Gaussians are same, then should the parameter ranges be similar, too?

Naïvely, if preferrred_humidity=0.9, actual =0.1 and preferred=temperature ==295, actual 300, I would expect the humidity to be greater problem, but the formula makes the temperature to be the greatest evil.

Temperature in Kelvin, other in zero-to-one range might cause unexpected results.

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

> Temperature in Kelvin, other in zero-to-one range might cause unexpected results.
You are right. But we can also change gaussian sigma for temperature.
In SirVer patch there is another definition for sigmas:

(code)
 const double sigma_fertility = (1. - affinity.pickiness()) * 0.25 + 1e-2;
 const double sigma_humidity = (1. - affinity.pickiness()) * 0.25 + 1e-2;
 const double sigma_temperature = (1. - affinity.pickiness()) * 12.5 + 1e-1;

If there is still a problem, just change 12.5 into another value. I proposed 0.25 and 12.5 just for the beggining. I don't know how it works in Widelands. There is a chance that we will increase it. Values needs tests.

Revision history for this message
SirVer (sirver) wrote :

[wasteland vs desert]
> which is hotter?

I think desert is hotter. But keep the following in mind: there are a lot of old maps in the world, they must still be playable with the one_world branch. So desert should have an affinity for palm trees (similar to how it behaved before, more or less). And blackland should have an affinity for the mushroom trees and so on.

Revision history for this message
Teppo Mäenpää (kxq) wrote :

It would be nice if the parameter-humidity would approximately follow the real-world wetnesses of such landscapes: It would be nice if those parameters could be used to tune the behaviour of empty wells, too!

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

I've tried to create numbers connected to the real world. The most problematic was Winter landscape- cold lands with only 2 species of trees? They won't fit wih greenland too much.
Every specie has it's own "best land" or mix of lands on one land (Wasteland, Greenland, ...)

The numbers are in the attachment, also in pdf & xls file on my site:
http://student.agh.edu.pl/~rak/widelands/

There is also an original excell file (may be useful for better copying)

ALL THE NUMBERS NEED TESTING! I don't know how it works :(

information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
Albert Einstein (w-aaaaa) wrote :

I was thinking about the idea of gaussian behaviour. It is good, but in Widelands it can cause strange look: some trees will grow very fast, other will never grow up.
The answer for that will be 2 things:
1. maximum and minimum values.
2. maximum value is not a point, but a range (Max_X-deltaX, Max_X+deltaX).

The deltaX value will be connected to the pickness value, but not in the direct way ;)

So current code is:

 const double sigma_fertility = (1. - affinity.pickiness()) * 0.25 + 1e-2;
 const double sigma_humidity = (1. - affinity.pickiness()) * 0.25 + 1e-2;
 const double sigma_temperature = (1. - affinity.pickiness()) * 12.5 + 1e-1;

 return std::exp( -pow2(affinity.preferred_fertility() - terrain_fertility) / (2 * pow2(sigma_fertility)) - pow2(affinity.preferred_humidity() - terrain_humidity) / (2 * pow2(sigma_temperature)) - pow2(affinity.preferred_temperature() - terrain_temperature) / (2 * pow2(sigma_temperature)));

I would change it into:

 const double sigma_fertility = (1. - affinity.pickiness()) * 0.25 + 1e-2;
 const double sigma_humidity = (1. - affinity.pickiness()) * 0.25 + 1e-2;
 const double sigma_temperature = (1. - affinity.pickiness()) * 12.5 + 1e-1;

 const double pure_gauss=exp( -pow2(affinity.preferred_fertility() - terrain_fertility) / (2 * pow2(sigma_fertility)) - pow2(affinity.preferred_humidity() - terrain_humidity) / (2 * pow2(sigma_temperature)) - pow2(affinity.preferred_temperature() - terrain_temperature) / (2 * pow2(sigma_temperature)));

 double advanced_gauss=pure_gauss*2.2+0.05;
 if(advanced_gauss>0.95) advanced_gauss=0.95;

 return std:: advanced_gauss;

The min value for gauss will always be 0.05
The max value will be 0.95
The values 2.2, 0.05 and 0.95 aren't tested yet. Only by printing some equations.

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

Sorry for a mistake.
The value 2.2 should be 1.1
2.2 is too big :)

The code should look like:

 const double sigma_fertility = (1. - affinity.pickiness()) * 0.25 + 1e-2;
 const double sigma_humidity = (1. - affinity.pickiness()) * 0.25 + 1e-2;
 const double sigma_temperature = (1. - affinity.pickiness()) * 12.5 + 1e-1;

 const double pure_gauss=exp( -pow2(affinity.preferred_fertility() - terrain_fertility) / (2 * pow2(sigma_fertility)) - pow2(affinity.preferred_humidity() - terrain_humidity) / (2 * pow2(sigma_temperature)) - pow2(affinity.preferred_temperature() - terrain_temperature) / (2 * pow2(sigma_temperature)));

 double advanced_gauss=pure_gauss*1.1+0.05;
 if(advanced_gauss>0.95) advanced_gauss=0.95;

 return std:: advanced_gauss;

Revision history for this message
Teppo Mäenpää (kxq) wrote :

Minimum tree growth is important for gameplay: In some maps, there are places were one more or less must build something in order to advance. Port spaces are the easiest examples. A tree at such place, which is large enough to prevent building and too small for the woodcutter to consider and takes forever to become a log would be a real fun-killer.

The alternative would be a way to request the lumberjack to cut a particular tree. I do not think that we want that, though.

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

In last Widelands' terrain afinity there were always possibilities for trees to grow up. On some terrains (ex. Barren steppe, Greenland) only 1-2% of trees was grown up. In calculations where (about) 5% of trees can grow up one level there is a chance of 0.05^4=0.00000625<1% for trees to grow up (4 levels= whole tree) on some types of soil. So still there will be some places without trees.

I was thinking about a map with only barren steppe (no trees at all) and small spots with meadows (lots of trees). I know that we want to bring last behavior back.

Revision history for this message
SirVer (sirver) wrote :

I did not have time to put in the values in the branch yet. Everybody from widelands-dev can do it theoretically. If somebody wants to pick up and do it, so we can merge a version of this feauture into trunk for further tweaking, go for it please!

I might be able to finish this next week.

Revision history for this message
SirVer (sirver) wrote :

I implemented the suggestions from #23 and Tino put in the suggested numbers.

I went ahead and merged this into trunk now as r7058. @Albert: as you understand the model the best, I would appreciate if you could test and tweak the values in game. All values are defined in worlds/terrains/init.lua and in the immovable init files.

When you come up with changed values, just zip the whole 'world' directory or use the 'diff' tool to make a patch. Please do not put them into a table, because it is extra work to move them out of there again.

Changed in widelands:
status: In Progress → Fix Committed
assignee: SirVer (sirver) → nobody
Revision history for this message
Albert Einstein (w-aaaaa) wrote :

Hey!

I've tested the terrain afinity and mostly it looks OK. Some soils seems to be very good for growing the trees, some not.

Only some palm trees need changes, but all the others works fine to me.
Of course it is only my subjective look.

I will try to work on that in few days.

Revision history for this message
SirVer (sirver) wrote :

Cool. Keep us posted!

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

Hi!
After some tests (3) I've decided to bring some changes. They are in zipped file.
The file was here:
world/terrain/init.lua
I guess that it is good now.
I've cheked if the trees can grow in exact terrain (wasteland tree on wasteland terrain). Some species can grow on other terrain, but it looks fine (f.e. greenland mountains are good for pine trees).
The model brings about 5% probability of growing a tree on bad soil, so it is a bit more than before, but still not a high value :)

Of course the values can change more if you want! :)

Revision history for this message
SirVer (sirver) wrote :

Cool, thanks! I added the file in r7062.

Since you contributed in the development now, I would like to add you to txt/developers: https://wl.widelands.org/developers/.

What should I put there?

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

I'm there :) In "Maps and Missions" part ;)
Einstein13

It is great to do something constructive!

Revision history for this message
SirVer (sirver) wrote :

Ah Okay, didn't see you. Then all is good.

Revision history for this message
TiborB (tiborb95) wrote :

Hi,
I am testing Atol map and it seems to me that growth of trees is too slow. Could you please look at it?

I dont understand most of what was written here, but a layman question: What is the proportion of best soil : worst soil in regard to trees "production"?

I think the difference should not be more then 5:1 or so, now I think it is more then 10:1

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

Atol map is made of mountain and high mountain meadow. It is very hard to plant there trees.
Also I've found a small bug in line 119 of file:
http://bazaar.launchpad.net/~widelands-dev/widelands/terrain_affinity/view/head:/src/logic/terrain_affinity.cc#L74
There should be a "sigma_humidity" instead of "sigma_temperature"

In my opinion we should make lots of new great maps and test if old are still playable. Atol is, but it is very hard to play.

Revision history for this message
TiborB (tiborb95) wrote :

Uhm, I still think you might consider reducing the gap between worst and best terrains.

Player should be able to compensate for infertile land by huge amount of rangers. At least on 90 % terrain types.

Also it would be sweet if editor showed the fertility of the field somewhere :)

I dont like idea throwing away a lot of old maps, perhaps just adding trees to worst terrains would mitigate the problem.

Revision history for this message
SirVer (sirver) wrote :

I agree with Tibor - Atoll should be playable, as should be all the other old maps. I agree that it will be awesome when people build new maps with the current growth in mind, but old maps (especially those we ship) must still be playable as before. So the model paramaters probably need some more tuning. This should be tracked in a new bug. Tibor, could you open one and add a list of maps/terrains that you think need looking at?

Revision history for this message
TiborB (tiborb95) wrote : Re: [Bug 1328635] Re: Bring back terrain affinity

Hi, dont have good overview, which terrains are especially bad. I run into
Atol map and also one of my new Patchland map has the similar problems -
some players of course.

So I could open a bug, but I am not able to provide extensive list of
problematic terrains

2014-07-25 20:59 GMT+02:00 SirVer <email address hidden>:

> I agree with Tibor - Atoll should be playable, as should be all the
> other old maps. I agree that it will be awesome when people build new
> maps with the current growth in mind, but old maps (especially those we
> ship) must still be playable as before. So the model paramaters probably
> need some more tuning. This should be tracked in a new bug. Tibor, could
> you open one and add a list of maps/terrains that you think need looking
> at?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1328635
>
> Title:
> Bring back terrain affinity
>
> Status in Widelands:
> Fix Committed
>
> Bug description:
> The one_world branch removed terrain affinity. The problem was that
> for each terrain/tree combination a number (probability) was needed.
> This were already a lot of numbers for 16 terrains, but for the ~60
> terrains that we now support it is just too much to maintain or even
> understand. The former model was already too complicated as proven by
> nodoby ever implementing terrain affinity for crops or other plants.
>
> Without terrain affinity there are a number of issues that diminish
> the fun while playing though:
>
> 1) The interesting concept of where to plant foresters is gone - all
> trees grow everywhere equally well.
> 2) With all trees now in the one world, foresters have no idea of where
> to plan former blackland trees compared to former greenland trees - for
> now, all foresters plant greenland trees everywhere - looks funny on black
> and desert maps.
> 3) Crops/wine and other plants can still grow everywhere equally well.
> It would be more interesting if farms and vineyards needed to be placed
> strategically too.
>
> This bug collects ideas of a simpler model that can group immovables
> into sets (i.e. "all former greenland trees") for foresters to choose
> from while also defining terrain affinity for these immovable groups.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/widelands/+bug/1328635/+subscriptions
>

Revision history for this message
SirVer (sirver) wrote :

Fine, I did it then :P. Followup is in bug 1328635.

Revision history for this message
SirVer (sirver) wrote :

Correction: bug 1348800.

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

I've tried to test current terrain affinity. But it is LOTS OF WORK.
When I was designing the values for trees and soils I had in mind some things.
I'm quite busy now, and I can't do all the work alone.

Currently I've checked only 3 species of trees and described what I remember about the designing.

Everything is on my site, and here is the direct link to the table (green- good soil, red- barren soil):
http://student.agh.edu.pl/~rak/widelands/files/TreesModel-explanation/Data01.pdf

Hope it will help a bit...

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

I was thinking about the model: how can we easily change values? It is very easy with values described in post #12 (https://bugs.launchpad.net/widelands/+bug/1328635/comments/12)
The values 0.25 and 12.5.
Consider increasing the values and checking if it is working as you want.

Revision history for this message
TiborB (tiborb95) wrote :

Einstein,

I looked at this, this is too complicated for me... :(

2014-07-26 15:42 GMT+02:00 Albert Einstein <email address hidden>:

> I was thinking about the model: how can we easily change values? It is
> very easy with values described in post #12 (
> https://bugs.launchpad.net/widelands/+bug/1328635/comments/12)
> The values 0.25 and 12.5.
> Consider increasing the values and checking if it is working as you want.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1328635
>
> Title:
> Bring back terrain affinity
>
> Status in Widelands:
> Fix Committed
>
> Bug description:
> The one_world branch removed terrain affinity. The problem was that
> for each terrain/tree combination a number (probability) was needed.
> This were already a lot of numbers for 16 terrains, but for the ~60
> terrains that we now support it is just too much to maintain or even
> understand. The former model was already too complicated as proven by
> nodoby ever implementing terrain affinity for crops or other plants.
>
> Without terrain affinity there are a number of issues that diminish
> the fun while playing though:
>
> 1) The interesting concept of where to plant foresters is gone - all
> trees grow everywhere equally well.
> 2) With all trees now in the one world, foresters have no idea of where
> to plan former blackland trees compared to former greenland trees - for
> now, all foresters plant greenland trees everywhere - looks funny on black
> and desert maps.
> 3) Crops/wine and other plants can still grow everywhere equally well.
> It would be more interesting if farms and vineyards needed to be placed
> strategically too.
>
> This bug collects ideas of a simpler model that can group immovables
> into sets (i.e. "all former greenland trees") for foresters to choose
> from while also defining terrain affinity for these immovable groups.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/widelands/+bug/1328635/+subscriptions
>

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

I understand that the model can be too complicated for someone, but in fact it is very simple :)
I will try to make something to explain it better, but now I don't have much time.

the values of "sigma_X" mean how wide is the Gauss function of model. Wider- means more terrains is good for the tree. If you try to change the values to bigger ones (0.25 and 12.5: for example to 1.0 and 25.0) and recompile the Widelands, you will see that the trees are growing in more places.
Extreme case for the values (f.e. 1000. and 10000.) will let the trees to grow everywhere.

Revision history for this message
TiborB (tiborb95) wrote :

Alright, I changed it and now it works better, but it will need testing to
find reasonable values.

2014-07-31 13:13 GMT+02:00 Albert Einstein <email address hidden>:

> I understand that the model can be too complicated for someone, but in
> fact it is very simple :)
> I will try to make something to explain it better, but now I don't have
> much time.
>
> the values of "sigma_X" mean how wide is the Gauss function of model.
> Wider- means more terrains is good for the tree. If you try to change the
> values to bigger ones (0.25 and 12.5: for example to 1.0 and 25.0) and
> recompile the Widelands, you will see that the trees are growing in more
> places.
> Extreme case for the values (f.e. 1000. and 10000.) will let the trees to
> grow everywhere.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1328635
>
> Title:
> Bring back terrain affinity
>
> Status in Widelands:
> Fix Committed
>
> Bug description:
> The one_world branch removed terrain affinity. The problem was that
> for each terrain/tree combination a number (probability) was needed.
> This were already a lot of numbers for 16 terrains, but for the ~60
> terrains that we now support it is just too much to maintain or even
> understand. The former model was already too complicated as proven by
> nodoby ever implementing terrain affinity for crops or other plants.
>
> Without terrain affinity there are a number of issues that diminish
> the fun while playing though:
>
> 1) The interesting concept of where to plant foresters is gone - all
> trees grow everywhere equally well.
> 2) With all trees now in the one world, foresters have no idea of where
> to plan former blackland trees compared to former greenland trees - for
> now, all foresters plant greenland trees everywhere - looks funny on black
> and desert maps.
> 3) Crops/wine and other plants can still grow everywhere equally well.
> It would be more interesting if farms and vineyards needed to be placed
> strategically too.
>
> This bug collects ideas of a simpler model that can group immovables
> into sets (i.e. "all former greenland trees") for foresters to choose
> from while also defining terrain affinity for these immovable groups.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/widelands/+bug/1328635/+subscriptions
>

GunChleoc (gunchleoc)
tags: added: world
removed: oneworld terrainaffinity
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.