Biological Models of Reactionary Networks

Biological Models of Reactionary Networks

Note: newsletters are progressive; each augments the previous. Reading them in chronological order is suggested for context. Previous: Reaction Networks

Introduction

"The single biggest problem with communication is the illusion that it has taken place." ~George Bernard Shaw

We asserted that blood, a mixture, expresses state. It reflects the net effects of consuming air, water, and food. Four vital signs of life, temperature, pressure, pulse, and respiration, are measurable in and by it; rules validate bodily conditions when applied against it.

We asserted that chemical reactions, a model of circular causality, lead to emergent, goal-directed behavior. That behavior is the effect of reacting to signals caused by (internal and external) disturbances as we move about our environment.

Circulatory systems are biological models of reactionary networks. They are fault and noise-tolerant systems that parallelize the movement of information. They express abstract relationships between systems, even natural and artificial. These bio-inspired models imply designs for writing, emergent, autonomous software.

We assert that viable, goal-directed software is possible by emulating nature. That it behaves better if modeled as a reactionary network. It can regulate itself by coordinating behaviors reacting to disturbances; it can tolerate a varying, potentially harmful environment given adaptive capacity.

But adaptive capacity is more than correlating events to effects. It entails understanding relationships between events and deducing rules or forming new combinations of them to achieve the desired goal. Creating compositional models is vital to this effort and our work's focus; it is challenging but exciting.

Disclaimer

We do not assert expertise in mathematics, biology, or neuroscience; instead, we borrow ideas from them to solve control and behavior issues in software.

We take liberties in fundamental biological behavior if it proves a solution. Yet, we try to provide enough validity to make a compelling metaphor and basis for our models and methods.

Our intent is not to perfectly emulate biological or neural systems or study their underlying science; instead, it is to mimic their structure, behavior, and elegance in software exhibiting complex behavior.

Overview

To communicate requires a medium, gas (air), liquid, or solid, to transmit information. Blood, a liquid medium, contains chemical information in the form of substances with varying degrees of saturation. Pressure differences push it through channels that deliver nutrients, and hormones, expel waste and regulate heat—flow.

In Cyborg, channels are pipes—a structure that facilitates flow. Signals flow in from one end, past various receptors, and out the other end if not consumed. Pipes form arcs in a simple, weighted directed graph. Simple in that there are no direct loops and weighted by way of signals.

Such graphs emulate circulatory and neurological systems—nature's models of indirect communication. How these systems connect and evolve is part of our study, not in the pursuit of science but in the goal of writing better software.

Note: we show actual code to support our claims, but not all the code—like the Kit—an IoC container, or a Gadget—a thread-based execution loop. The intent is to provide context, not implementation details. Later, when we release our library, we'll provide code and in-depth documentation.

In Cyborg particular, and cybernetics in general, disturbances manifest as waves. See Cybernetic Waves. Sensors interpret and convert them to signals passed through channels (pipes).

No alt text provided for this image

Along the way, and if signatures match, receptors consume them and apply zero, one, or more rules. If not, they flow downstream—collectively, a circulatory system. Each aspect has a solitary role; the separation of state and behavior is by design, and there is no central control point.

Feedforward and feedback, two basic tenets of cybernetics, occur through pipes. Behavior emerges from functions that align toward a goal—survival, functions that react to events—receptors, functions that interpret these events through rules applied to state-reactors, and functions that cause movement—actuators.

Survival is predicated on successfully applying and adopting new behavior that rectifies conditionslearning by continuously validating a model of a world against internal and external disturbances; by creating new rules or patterns of behavior if the model is wrong—archetypes.

Directed Graph

A directed graph is a set of nodes connected by edges. It differs from others in that flow is only unidirectional. In Cyborg, a node (a container) can hold data, and an edge (a gadget) is something that can consume, transform, and send it.

No alt text provided for this image

Node

A node is a disposable, thread-safe data structure from which data is both retrievable and receivable; get and put, respectively.

No alt text provided for this image

Edge

An edge is a thread-based execution loop that gets input (from the left), acts upon it, and puts what's not applicable onto the next node (on the right).

No alt text provided for this image

As shown, execution continues to try and get input until disposed. Markedly, unseen code uses a monad, a functional programming design pattern that wraps return values in an object. The details are irrelevant (for now); essentially, if there is some input, it is passed to receptors for processing, and if there are (Any) unprocessed items, they are passed (Put) to the right (Node); otherwise, a fault likely occurred, the 'None' will equate to true, and execution stops.

Rule

Rules are applicable or not. The rule, the whole rule, and nothing but the rule determine applicability and application. Note: It is possible to combine two or more rules with the logical AND, OR, and NOT operators (not shown).

No alt text provided for this image

Pipe

A pipe is a directed graph; it receives input from the left (Node) and passes through (optional filters—receptors) to the right (Node). What's key is that input is applied against a set of rules (in a receptor). These rules elicit behavior that, in turn, can cause effects that cause more input—a causal loop.

No alt text provided for this image
No alt text provided for this image

As implemented, a pipe is a node composed of an edge (gadget) and an applicator containing a collection of rules. The edge (gadget) pulls information from the node, passes it through an applicator (filtered by rules), and propagates any unfiltered information.

Applicator

An applicator applies one or more rules against a collection of things. And, it returns a collection of things that were not applicable—a subtle but essential point; nothing happens if nothing is relevant.

No alt text provided for this image

In execution, a collection of applicable things (participants) are selected from all possible things (operands). For each participant, this rule is applied (in parallel). If not successful, add the operand to a collection of unsuccessful things (waste), which are returned.

Vascular System

The vascular system carries oxygen, nutrients, and hormones to cells and carries waste from them—where the stuff your body does not need is swapped for what it does need.

In Cyborg, the vascular system is a pipe that carries chemical signals. It has an applicator that applies rules against signals and a thermal regulator to monitor temperature—a balancing with delay archetype—think thermostat.

No alt text provided for this image

A (biological) thermostat, the hypothalamus, continually checks blood temperature. If too warm, it releases chemicals to trigger cooling responses like sweating. It releases chemicals to trigger warming behavior (shivering) if too cool.?

In Cyborg, another loop (not shown) periodically checks blood temperature; it asserts conditions like hypothermia and hyperthermia. If true, actions like taking shelter and adding or removing clothing are viable.

Admittedly, correlation and terminology are whimsical, but that is beside the point; instead, the cybernetic archetype (balance with delay) is at play. The vascular circulatory system is a metaphor for cybernetic behavior—induced behaviors mutate state (blood), creating a causal loop.

The vascular system allows us to study cybernetic-oriented design using a well-known model for validation. At the same time, the pain pathway embodies feedforward and feedback mechanisms—perception and control, proving Gate Control theory—the ability to short-circuit signals.

Conclusion

Speaking in biological terms when talking about software design may seem nonsensical. Yet, software is just the written instructions of behavior in reaction to events. Nature, the ultimate architect, shows us elegant yet straightforward ways to convey this; we need only look with an open mind.

We assert that the leap from biological to artificial systems is small. That software engineers can benefit from eons of evolution if they are willing to accept nature's models. We seek inspiration from these models proven by eons of testing what works and what does not.

Finally, as we reveal cybernetics’ effect on writing more resilient software, we'll expose our coding style, an object-oriented and functional programming hybrid. I'll dedicate a newsletter to it later as we aim to offer a C#, .Net Core library promoting cybernetic-oriented development (CyOD).

Links

We invite you to join us in constructive debates on our (LinkedIn) group as we continue a journey through cybernetic principles, patterns, and practices:

Group: https://www.dhirubhai.net/groups/14027931/

Page: https://www.dhirubhai.net/company/gplicity/

Ivan Valiente

Staff Software Engineer at GRUBBRR

2 年

Excellent!

要查看或添加评论,请登录

Glenn Puchtel的更多文章

  • I write Dumb/Disposable code

    I write Dumb/Disposable code

    "Every line of code is written without reason, maintained out of weakness, and deleted by chance." Jean-Paul Sartre's…

    1 条评论
  • Cyborg - (bio)Cybernetics Group

    Cyborg - (bio)Cybernetics Group

    To all interested subscribers. If you'd like to engage in an interactive discussion (debate), please join my group:…

  • Periodic Table of Cybernetics

    Periodic Table of Cybernetics

    Good news, bad news. First the bad news.

    1 条评论
  • Software as a Game [SaaG]

    Software as a Game [SaaG]

    Software as a Game [SaaG] A game is a rule-based system with a quantifiable but variable outcome (value). Each outcome…

    1 条评论
  • I'm writing a book

    I'm writing a book

    The August edition of my newsletter on 'oscillation' is (sadly) postponed as I'm writing a book instead. The book…

    1 条评论
  • Bio-Cybernetic Patterns

    Bio-Cybernetic Patterns

    This month's (upcoming) article is on 'oscillation'; however, not till mid-August as I am still writing it. In the…

    4 条评论
  • Temporality

    Temporality

    Cause and effect. Two core pillars of cybernetics.

    1 条评论
  • Software is Evil

    Software is Evil

    Software is evil—it has two faces: composition and behavior. One reflects the author's view of how best to structure…

    1 条评论
  • Reaction Networks

    Reaction Networks

    Note: newsletters are progressive; each augment the previous. Reading them in chronological order is suggested for…

  • Patterns of Behavior

    Patterns of Behavior

    Note: newsletters are progressive; each augment the previous. Reading them in chronological order is suggested for…

社区洞察

其他会员也浏览了