A hungry CA

The CA is controlled by the following buttons:

Hide CA-2
 Makes CA shorter.
Longer: Makes CA longer.
Plant CA-1: CA-1 is planted.
Plant CA-2: CA-2 is planted.
CA-2 control: when true, the CA controls its behavior. When false, the observer controls it.
hungry: CA-2 adds some of its bits to CA-1 (perturbs it), which happens only when they touch each other.

Resources=  the amount of resources the CA has
Accumulation rate:
indicates when the CA meet.
CA-2 control: hungry: CA size:

Set hungry = false, CA-2 control = false

When the experiment   starts  the two CA start moving up and down. Both bounce back from  the borders. Their resources decline at a rate of 1 unit / time unit. While CA-1 gets thinner, CA-2 size is constant.  When they touch or overlap (interaction = true) resources are replenished  and CA-1  gets wider. Resource accumulation is proportional to the CA count. The fatter a CA is the more resources it accumulates. As the CA move up  or down they may briefly touch (interact=true) and  accumulate resources. When parting they lose them again

2. Set hungry = true. CA-2 control = false

This makes CA-2 hungry and when it meets CA-1, it will perturb it which has two outcomes: 1. CA-1 becomes wider. 2. CA-2 hijacks CA-1 and they travel together which prolongs interaction. However perturbation may kill part of CA-1, the  CA part and lose their resources (resource == 0). Let them interact for a while and set hungry = false. CA-2 stops perturbing CA-1 and they may travel together for a while.

3. Set CA-2 control = true

CA-2 controls its own  behavior. When resources <-50 it gets hungry (hungry = true). During their next encounter CA-2 will perturb CA-1 and hijack it. When resources > 50 CA-2  is satiated and stops perturbing CA-1 (hungry = false). They may travel together for a while and then part whereupon  they lose their resources and start accumulating  them from scratch. You may induce this state by replanting either one.

Driver: Whenever the CA are separated, they lose 1 unit / step of their resources. This loss drives the entire system.
Response:  The behavior of  the two CA, collectively regarded as the system,  is driven by the CA-2 resource level.
1. When resources decline CA-1 moves faster improving its chance to meet CA-2
2. When CA-2 is hungry it will perturb and hijack CA-1 during their next encounter.
Benefit to CA-2: Hijacking  will prolong their interaction until CA-2 attains satiation (hungry = false).
Indirect benefit to CA-2:  During the prolonged interaction CA-1 will grow more and more which will raise the probability of their encounter should they part.
Benefit to CA-1:  As CA-1  grows it accumulates resources faster. Since   accumulation rate  is proportional to its size, CA-1 strength or wellbeing depends entirely on CA-2
Perturbation benefit:  CA-1 accumulates resources faster. CA-2 gains more time to accumulate its resources.
Perturbation  risk:  Since the perturbation outcome varies, both CA may part an lose their resources.

The scheme depicts the relationship between the variables. The system in the applet is the solution of this scheme. It is a strange attractor.