I thought it would decline equally after adding more colonists into colony.

Do not expect my algorithms to be linear.

(They almost

**never** are. I like to challenge players a bit to figure out how it works.)

In this test game it even increases after adding the sixth colonist

This may be because you have hit a threshold that triggered an additional happiness bonus.

-------

Actually my algorithms are usually so complicated and consider so many variables that even I cannot fully predict them.

(Directly after coding the algorithm I usually still can, but half a year later, I would also have to study it again due to all the variables and thresholds included.)

The only thing I can tell you is "trends", like e.g.

- Food --> Good
- Bells --> Good
- Open Borders --> Good

- ...
- Overpopulation --> Bad

- Slaves --> Bad
- War --> Bad
- ...

-------

**All my algorithms are either:**
A) Non-Deterministic (Chance-based)

B) Non-Linear (Thresholds or Self-Enhancing or Self-Balancing)

C) A mixture of those

Happiness is just:

**B)**
- There are many variables influencing each other
- Thresholds that trigger different gradients / behaviours

So, some effects are only triggered if you hit a certain

**threshold**.

(Below that threshold there will not be any effect.)

---------

There are in total

**14 "sub-algorithms"** (each with a

__formula of its own__) that Happiness / Unhappiness uses.

Also they may have side effects with each other. Thus potentially self enhancing or self balancing.

(As I said, do not expect my stuff to be "linear" or that easy to explain / calculate.)

----

But there are also "thresholds" in these "sub-algorithms" as I tried to explain.

(Once you hit them the algorithm / curve may "jump" or change its gradient.)

Here is a simple case where the population component of "Unhappiness" is not calculated if the village is to small.

---

**By the way:**
There are also

__rounding issues__ with integers.

e.g. as Integers

So the adding just 1 more colonists may acually make a big difference.

(Because you overcome the rounding cliff and a 0 may become a 1.)