The way I think about this comes from reading John Holland's "Hidden Order". If you read that book not as a book but as a way to build a Complex Adaptive System, then it comes down to a few essentials. An environment, a bunch of entities, a read/write messaging bus so the entities can interact. The entities need a set of rules and sensors. Put it together and what have you got? Thinking. Or intelligence. Try building…
Complex adaptive systems can be nested. Human families, communities, societies, governments all form greater gestalts in which humans, themselves complex adaptive system are a part of.