I’m not sure if this adds anything but at the risk of muddying the waters, in two related threads we have been discussing the biological underpinnings of intelligence.
The evolutionary history of integrated perception, cognition, and action
and
Affordance Competition Hypothesis
In both the basic premise is that there are control loops that go from senses to motors, with some degree of processing between the two. In all cases, the goal is to select the best motor plan.
The cortex part that adds “intelligence” has morphed considerably over time but the basic function really has stayed much the same. See:
Rather than the minimizing energy expenditure model as described by Firsten, Cisek replaces this with control loops; some error signal that is reduced by some response.
This suggest that this stimulus-response processing exists on some sort of continuum, from some rather simple stimulus-response actions to the extending of these control loop to very far outside the body and over very long time scales. At some point, these control loops start to look pretty smart.