Page 1 of 1

tree growth formula

Posted: Wed Dec 14, 2016 2:14 am
by rhaining
Anyone know the precise formula that controls tree growth? When I first started playing, I thought it was this

T1: Trees have a separate turn, probably after the last AI player turn. On a tree's turn, any empty hex (truly empty or graveyard) that has 1+ water and 1+ palm trees near it will get a palm tree, and any empty hex that has 2+ fir trees near it will get a fir tree.

But sometimes I think I see trees grow faster or slower than that. My current theory is:

[BEST THEORY SO FAR] T2: On each human and AI player turn, only empty hexes (truly empty not graveyard) owned by that player are evaluated for tree growth. Also, only "old" trees (trees that existed on that player's previous turn, regardless of which color territory they reside on) can spawn new trees; trees that are 1-5 human/AI player turns old are too young to spawn. Within these constraints, any hex that has 1+ water and 1+ old palm trees near it will get a palm tree, and any hex that has 2+ old fir trees near it will get a fir tree. Graveyards automatically turn into palm trees if bordering water or fir trees if not bordering water. After tree spawn and graveyard changes are evaluated, then taxes are collected, maintenance fees deducted, and if any territory has negative balance, it is reset to 0 balance and all units in that territory die and are replaced with graveyards. Then the player's turn starts.

Another thing I have never noticed for sure: if either a palm tree or fir tree could grow on a given hex, which one has precedence? Given my working theory that trees must be "old" to spawn, it's difficult to tell for sure which tree will grow when conditions are ideal for both. Someday I may have to test this by virtually winning the game (e.g. leaving just one enemy hex), letting the world be covered with trees, putting a L1 unit right on the beach, waiting a turn or two to ensure that all trees are truly old, then moving away my L1 unit far away to see what kind of tree grows there. Might have to repeat the experiment with a higher maintenance unit so I can have him starve while he's on the beach to see what the graveyard turns into.

Re: tree growth formula

Posted: Wed Dec 14, 2016 8:42 pm
by Smiling Spectre
In my observation, your T2 looks almost right. Except one over-complication: as I think, _every_ existing tree taken into account. Including "young" trees that spawned just before that by other players turns. I.e. game evaluated all cells for given player and marks them as "suitable for tree", then "grows" all trees at once. There is no any "stored" conditions that can distinct one tree from the another.

Also, as I feel, palm have precedence over fir in any occasions. I can be wrong though. :)

Re: tree growth formula

Posted: Sun Dec 18, 2016 9:09 pm
by rhaining
Yes, that's probably it. I thought that was how it worked at one point, but then it seemed like the trees along the beach don't grow as fast as they should, hence I added the complication about age.

T3: Truly empty hexes (not graveyards) for a given human or AI player are evaluated immediately before that player takes their turn. If an empty hex has 1+ water and 1+ palm tree near it, it is marked for palm tree growth. If an empty hex has 2+ fir trees near it and is not marked for palm tree growth, it is marked for fir tree growth. All new trees then spawn at once. (This is to prevent the possibility of multiple rows of trees all growing across a players territory in a single turn.) THEN all graveyards near water turn into palm trees and all other graveyards turn into fir trees. Then taxes are collected, maintenance fees deducted, starvation processed, and the player's turn begins.

Yes, that does sound more likely. So maybe it is possible to see trees zoom across empty terrain if it is split across multiple players in just the right way, and maybe the reason that doesn't happen more often is because it's surprisingly rare for those conditions to exist. Would love to see an example of such terrain to see for sure what happens.

Re: tree growth formula

Posted: Fri Dec 23, 2016 10:21 pm
by rhaining
Update: nope, T3 is definitely wrong. I think the "young trees can't spawn" rule does exist. There was one palm tree on AI player light brown's territory. I ended my turn. On light brown's turn, two more palm trees spawned adjacent to the original palm tree. Then on my turn, these "young" palm trees could have spawned two more palm trees in my territory but didn't.

Re: tree growth formula

Posted: Wed Dec 28, 2016 6:50 am
by Sauron
Raining, tanks for the tree tips! That really helped n set 3

Re: tree growth formula

Posted: Tue Jan 03, 2017 10:09 pm
by rhaining
Hey Sauron! You're more advanced than me, so I'm pleased and humbled I was able to help. :)

I think I've beaten less than half the maps overall (always on the hardest setting, of course). I've been trying to pace myself and *not* beat all the easiest maps all at once, because that would leave me with just a big block of hard maps and I might get discouraged and leave the game entirely. So I alternate between solving a page of maps (most of which end up being on the easier side) then going back and forcing myself to attack at least a few of the harder maps I had skipped, then easier, then harder, etc. etc..

At this moment, I've beaten:
  • * ~Half the maps in set 01, scattered all over the place, so I don't have a full list of truly hard maps from set 01, though I still have 3 "R" maps (page 18) which are definitely in the hard category.
    * All but ~20 maps in set 02, all of which are hard.
    * The first 3 pages of set 03, some of which were kinda difficult but I wouldn't put any of them in the hard category.

Re: tree growth formula

Posted: Tue Jan 03, 2017 10:19 pm
by rhaining
Just realized there is another open question in my mind about trees. What happens to a hex that has no water near it, but it has one old palm tree and one old fir tree near it? I *think* this hex will grow a fir tree, but I need to confirm this.

I'm still bothered by T2. It's the best theory I have so far, and it does fit all the evidence I've seen, and it's clearly true that trees don't grow as fast as they possibly could if all young and old trees could spawn on every player + AI turn. But it bothers me because it relies on a hidden variable -- tree age -- that the player can't see. The game certainly has hidden variables (aka saved taxes in enemy town halls). Still, I keep hoping to find a more zen theory of tree growth that doesn't rely on any hidden variables.

Re: tree growth formula

Posted: Thu Jan 12, 2017 7:44 pm
by rhaining
Confirmed: an empty hex adjacent to one old fir tree and one old palm tree and zero water hexes will not spawn a tree.

I assume the exact age of the trees has no bearing, only whether or not they are old enough to spawn. I assume graveyards do not affect spawning in any way but only become trees after normal spawning, and the type of tree a graveyard turns into depends on whether or not the hex is adjacent to water.

So the last open question in my mind: there is an empty hex adjacent to two old fir trees and one old palm tree and one water hex -- what type of tree will spawn?

Re: tree growth formula

Posted: Fri Jan 13, 2017 7:25 am
by rhaining
Tested my last open question. Fir trees take priority over palm trees. Screenshots: