From Signals and Boundaries, MIT Press: when a system is capable of reprogramming itself in response to outside signals, it can be modeled as an adaptive agent.

In machine learning, fitness pressure for evolution is often provided by a fitness function that produces a reward for agents that move closer toward some desired goal.

In a complex adaptive system, this doesn't cut it. The behavior of a CAS is too complex to be easily expressed as a fitness function. In a real sense, complex adaptive systems don't have a singular "goal". They are autotelic. To model these systems in a way that will produce realistic evolution:

A challenge for modeling complex adaptive systems: finding a generative grammar that can produce both the signals and the boundaries of the system.

The actor model expresses computer programs as networks of adaptive agents.

Agent-based modeling is often used to derive models for aspects of complex adaptive sytems.

Most can agents turn out be persistent patterns imposed on flows. As was mentioned earlier, the human body turns over most resident atoms within days, and no atom resides in the body for more than a year or so. Similarly, in a great city, individuals arrive and depart daily but the overall pattern of activity persists.
— John Holland, Signals and Boundaries