 In this module, we're going to talk about the internal logic or schema that governs the behavior of agents within complex adaptive systems. This logic can span from the very elementary to the very complex, and thus we will break it down into two different types. We will start with the most basic type of logic, what are called algorithms, and then go on to discuss more advanced conceptual systems, what are called schemata within the language of complex adaptive systems. The most basic form of logic an agent can have is one that simply responds to a given input signal with an output action that is always the same. For example, if one taps one's knee at the right location, it will trigger the nerves to actuate the muscles into generating a sharp reactionary motion. Every time we input the same stimulus to this physiological system, we will get the same response. More advanced algorithms are able to discern between a given set of inputs and use an if-then logic to select an appropriate output. For example, the control system within a chemical processing plant might be able to select from a set of output temperature values based upon a range of input temperature values in order to regulate a chemical process chamber. Another example of this might be the basic algorithm that is thought to govern the flocking of birds. It consists of just three simple rules which are 1. Separation, meaning always maintain a certain distance from your neighbors. 2. Alignment, meaning steer towards the average heading of your neighbors. And 3. Cohesion, meaning to steer towards average position of neighbors in order to maintain long-range attraction. Here the individual bird is continuously inputting a value to these three required parameters, processing this information according to the set of instructions and then selecting from a range of appropriate motion responses in order to maintain its correct positioning. As advanced as these algorithms may become, they are essentially designed to just generate a response to a given range of stimuli. As such, they capture much of the logic behind mechanical control systems and those governing many biological systems such as in our bird example above. But the advanced cognitive capability of a modern human being far exceed a simple set of algorithms. With this cognitive capacity human agents can create conceptual representations or models of the world and we call these schemata. The word schema comes from the Greek word meaning to shape or more generally plan. A schema is a cognitive framework or concept that helps organize and interpret information. As such it is a conceptual template that determines how reality is interpreted and from this what are appropriate responses to given stimuli. With a schema an agent can create a model of what it encounters, identify similarities and differences amongst things in order to create categories and relations between categories. This allows an agent to quickly take in new information and classify it with reference to what it already knows. Every time an agent receives new information it references it against the information it already has. This process of obtaining new information and filtering it to ensure its validity is often modeled using Bayesian inference. Bayesian inference references any new information received by the agent against prior knowledge in order to ascribe a probability value to the likelihood of its validity. If the information is deemed to have a high probability of validity it is incorporated into the agent's schema and used as a reference to infer the validity of any future information it receives. For example, throughout your life you have received constant information endorsing the validity to the existence of the force of gravity. This massive amount of information confirming it gives it a very high probability of being valid and every day that probability goes up as you receive more confirmation of its existence. The result being that if you are presented with some piece of information that disproves the existence of a gravitational force on planet Earth, your immediate reaction will be to ascribe this new piece of information with a very low probability of being valid. In this way a schema can develop as it receives new information and incorporates this into the framework, both reinforcing pre-existing categories and reducing the overall state of uncertainty as new information confirms or disaffirms the space of unknown possibilities. With a schema we have not only the basic functioning of a control system that is able to respond to an immediate stimulus, but by being capable of creating a complex model of a situation we can understand what is generating this stimulus in the first place. A schema allows the agent to identify the causes that create the effects and not only this, but an agent with an advanced schema is able to also create a model of its own operation, that is how it responds to any given stimulus and can then try to alter this basic behavior. For example, we might be able to identify that every time we get stressed we start smoking and then try to alter this reaction. This somewhat self-referential capacity for a system to model and analyze its own regulatory system is the subject of what is called second order or new cybernetics. These advanced schemata of course have many benefits to an agent over a simple algorithmic logic. It is ultimately the foundation that has enabled technology, advanced civilization and humans capacity to dominate its physical environment, but of course it comes at a cost and not only in terms of the physical energy to maintain the system, but there is now a tension between the basic control system that is designed to react to stimulus thus ensuring immediate self-preservation and the schema that creates a broader vision interested in the system's long-term objectives and consequences of its actions with the possibility of these two levels conflicting and reducing the agent's capacity for action. Human agents within complex adaptive systems are not only governed by the need for physical self-preservation, but being governed by these advanced conceptual frameworks they are required to maintain both conceptual homeostasis as much as physical homeostasis. Through a number of mechanisms, information can be systematically filtered to ensure it doesn't threaten the basic assumptions that support the schema that the system is in regular contact with information sources that endorse and preserve this current schema because it is critical to the functioning of the whole system. Psychology has plenty of examples of this such as confirmation bias, which is a tendency to search for or interpret information in a way that confirms one's pre-existing schema and placing much higher validation standards on information that threatens it. Thus, in the same way agents actively seek out environments that are inducive to their physical requirements, they will often actively seek out information sources that preserve and maintain the status quo of their schema. Thus, we should not expect human agents to be rational or logical. Ultimately, humans aren't computers where logic is a precondition to their operation, but there is instead a subjective dimension to humans that is driven by emotions and independent from logical validation. This subjective domain to human agents is played out in what we call culture, often in the form of a story or set of stories about how the world is that endorse what is considered right and wrong, with people then acting out these stories as rituals in order to validate them and feel a part of them. People buy Nike shoes because advertising agencies have created a story around the brand. People want to be associated with that and they live this story out by wearing the shoes. There is no economic logic as to why people would pay an extra $50 to buy a pair of shoes with a tick on the side of them. Much of human activity only makes sense within the context of the cultural narrative that it is part of. This may add a whole new level of complexity to our models, but we pay a high price when we exclude it in terms of capacity to capture the real-world phenomenon exhibited by many complex adaptive systems. In summary then, we have been talking about the internal logic or schema that governs the behavior of agents within complex adaptive systems. We tried to show how this logic can span from the very elementary to the very complex. At the simplest end of the spectrum, we looked at algorithms that typically operate through an if-then logic that can switch to generate a given set of output states in response to some given set of input states. We then went on to discuss what are called schemata that represent more advanced conceptual frameworks or models capable of categorizing and filtering information to ensure its validity, while also being able to develop through a process that may be understood in terms of Bayesian theory. Lastly, we talked about how social agents are not only governed by a basic regulatory system driving them to maintain physical homeostasis, but also a more complex set of needs to maintain a conceptual homeostasis.