Cybernetic Waves
Glenn Puchtel
Principal Software Engineer/Architect | .Net | Azure | DevOps | FinOps | IaaS | PaaS | SaaS | FaaS | AGI (Unconventional Intelligence) | Biocybernetics | Author (book, newsletter) | Prompt Engineer (LLMs)
Note: newsletters are aggregative; each augments the previous. Reading them in chronological order is suggested for proper context. Previous: Cybernetic-Oriented Design (CyOD), Next: Patterns of Behavior.
“In theory, there is no difference between theory and practice, but in practice, there is.”
~ Jan L.A. van de Snepscheut
Cybernetic-oriented design is grounded in the notion that systems exhibit complex behavior in a circular, adaptive relationship with their environment. That trial and error from both positive and negative feedback are formative.
Cybernetics is about change. In particular, the ability to detect, measure and convey it. Yet, to measure anything implies the ability to ascertain its extent, duration, or degree. Nature, the ultimate architect, reveals many ways. It is hypothesized that in slime mold, such measurables are encoded in the frequency, amplitude, or extent of the intracellular oscillations-a wave.
We propose that the aspects of a wave are conducive to conveying change: amplitude, frequency, length, weight, scale, speed. Moreover, all stimuli: light, sound, temperature, pressure, and chemical are definable in this way.
We present this and other cybernetic concepts in (C#) code that conveys this behavior. Amusingly, we intend to use them in a game (for now). A game affords us liberties in its application-exploring and evolving them in whimsical but instructive ways without the burden of proving them against some arbitrary business problem.
Ultimately, we intend to offer a .Net Core library comprising various concepts suitable for gaming (assets) and enterprise or cloud-based software. So, our journey begins by introducing code that puts cybernetic theory into practice. Along the way, we’ll discover new notions and maybe even some surprises, which oddly reminds me of Disney’s Jungle Cruise ride.
The Jungle Cruise is a whimsical and controlled boat ride through the world’s most exotic rivers. Along the way, the captain makes puny remarks about various audio-animatronics positioned on its predetermined route. For a short time, passengers surrender their preconceived notions for those more suggestive and fanciful. At the end, when the boat returns to the dock, the captain says his final goodbye:
“If you enjoyed the ride, my name is Glenn, and this has been the
World-famous Jungle Cruise. And, if you had a lousy ride, well then,
my name is Ryan, and this has been Splash Mountain.”
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.
Game Theory
Game theory is a study of strategic decision-making. Specifically, it is the study of models of conflict and cooperation between actors.
Game theory applies to a wide range of behavioral relationships. It has become an increasingly important role in the logical side of reasoning, involving humans and non-humans (e.g., computers and animals).
In general, a game is any context where adaptive actors interact and, in doing so, become symbiotic. Mutuality implies a link of properties among related actors where one actor’s goal becomes linked with others. Actors make choices and take actions that affect others and the environment-the essence of cybernetics.
In spirit, we propose that software is but a game. That game theory is not only applicable but appropriate when writing software-SaaG (Software as a Game).
Cyborg—the game
Cyborg is a first-person figure that roams an apocalyptic landscape looking for (artificial sensory) devices to assimilate. To supplant its failing body, adapt and evolve; become a cyborg, or perish in an ever-worsening world.
The goal is to model biological concepts of adaptation to events through control and feedback—biocybernetics. Such systems can adapt and learn with the added ability to mitigate variations through controlled behavior.
In Cyborg the game, an already constructed ecosystem is present. The player (you) makes it less inhabitable by introducing disruptions that include but are not limited to toxins, radiation, and weather events by way of RESTful messages. The details of a message and usage are beyond the scope of this newsletter; however, we show a (partial) sample here for context:
{
?
?"medium": "gas",
??"measure": "metric",
??"waves": [
????{
???????"kind": "thermal",
???????"weight": 27.0,
???????"signature": "O=N=O=C=O"
????},
????{
???????"kind": "chemical",
????????"weight": 1.0,
???????"signature": "O=C=O"
????}
??]
}
Note: ?medium is either gas, solid, or liquid, measure is either metric or imperial (for now), and signature(s) depend on kind. For example, a chemical formula like “O=N=O=C=O” or “O=C=O,” air, and carbon dioxide, respectively.
Note: although we are showing values explicitly, and it is possible to provide them literally, we intend to abstract them as selectable, predetermined, and precalculated pieces in the game—for example, carbon dioxide or some other mixture.
?Cyborg, in game-speak, is classified as Combinatorial: ‘Sequential w/Perfect Information & Extensive Form.’
The reward (goal) in Cyborg is the length of one’s lifespan. Players are ranked by it and other facets, such as quantity and quality of the disturbances introduced. In short, a player does not win a game; they survive it. Prestige and honor go to those who survive the longest under the worst of conditions—live as a cyborg or die.
Communication, Correlation, and Control
“The biggest problem with communication is the illusion that it has taken place.”
~ George Bernard Shaw
Communication, in a natural system, is realized by signaling. Signals are part of an elaborate scheme of communications that govern necessary activities and has three primary aspects:
Signals originate externally from pressure, voltage, temperature, light, and substances or internally from hormones and chemicals. Internal signaling travels by short-lived, electro-chemical action potentials via a nervous system or by long-lived hormones via a circulatory system. Suitably, an organ in our brain correlates and collaborates to regulate them-the hypothalamus; otherwise, disastrous imbalances could occur—control.
A control system has three components:
Each signal alters the activity of its target by either increasing or decreasing some function. In cellular communication, signaling falls into one of five categories.
Note: the terms discriminate and indiscriminate infer certain or uncertain recipients, respectively. Markedly, each correlates to a well-known message pattern.
Note: the request-reply pattern is absent as communication is asynchronous. Yet, it is present in the cellular world. In the oscillating action of cytoplasm within the single cell (plasmodial) slime mold-in the electro-chemical oscillations that occur in our brain—brain waves. Studies suggest frequency ranges are associated with mental states:
The correlation of sensory interpretations is called perception—behavior is based on it. Cellular communication is one of many metaphors that explain such behavior in an emergent (bio)cybernetic system.
Synchronization
Synchronized behavior is key to emergent systems. In slime mold, starvation causes a particular type of molecule secretion. At the same time, cells become sensitive, migrate toward it, and secrete more of the same. The net effect of this positive feedback is waves of collective locomotory potential that cause actual movement-mobility in search of food.
Synchronization requires positive and negative feedback, triggered by some response threshold—the degree of some environmental condition. Such causal loops of positive and negative feedback—cybernetics are prevalent in biological systems—biocybernetics. Similarities among distinct systems and levels of natural structure suggest common signaling patterns occur in collective biological systems.
Somatosensation
Somatosensation is a mixed, tactile sensory category that includes touch and pain. Pain, in particular, is intriguing as a model for cybernetic systems; it has sensory and cognitive components that anticipate and mitigate harm.
领英推荐
Pain occurs in reaction to tissue damage termed nociception and has five phases:
Note: freeze is the third state of fear; it affords us to care for injuries—physically and psychologically.
Pain is a biophysical experience. It transcends physicality and invokes cognitive responses resulting in threat appraisals and avoidant behavior. Pain is a psychophysiological phenomenon—a causal loop of survival. And a fitting metaphor for reasoning about cybernetics.
Stimulus, Sensors & Signals
Living organisms interpret their environment from impulses sent by receptors in response to stimuli—a detectable change in its environment. In CyOD, we conclude that stimulus is a propagating dynamic disturbance—a wave. We also suppose that our declaration of a wave can characterize any disturbance.
public record Wave: IEquatable<Wave>
{
public Kind Kind { get; init; } = Kind.Other;
?????public double Amplitude { get; init; }
?????public double Frequency { get; init; }
?????public double Length { get; init; }
?????public double Weight { get; init; }
?????public double Scale { get; init; }
?????public string? Signature { get; init; }
}
Kind: specifies the type of wave:
Amplitude: the higher the amplitude, the higher the force that produced it. Sound with higher amplitude is louder, light with higher amplitude is brighter
Frequency: the higher the frequency, the higher the amount of energy conducted
Length: inversely proportional to frequency: the shorter the length, the higher the frequency and energy. Note: velocity is the product of length and frequency.
Scale: the measure of the area covered by the wave. The larger the scale, the larger the number of sensors affected-sensory field.
Signature: identifies particulars of a ‘Wave (e.g., a chemical formula—H2O)
Weight: the precalculated degree or extent: (e.g., temperature, pressure); an exact value rather than an implicit approximation from the length, frequency, and amplitude. Note: weight, if present, supersedes other measurable values—explicit vs. implicit.
Sensors
A sensory receptor is anything that converts stimuli to impulses (signals) termed sensory transduction. Transduction occurs when there is sufficient stimulus to induce a receptor potential. These potentials are interpreted and result in some action. The type of action depends on the type of receptor.
Sensory receptors differ by the kind of stimuli they recognize and their location. They have receptor specificity and are categorized:
Encoding (analog to digital)
Sensory stimuli vary in intensity—tone, temperature, or brightness. Yet, sensory neurons, which are all-or-nothing events, do not—action potentials are flat. Still, intensity is not lost; instead, it is encoded using one of three methods:
Signals
Signals are either mobile[4] or fixed (cues[5]). Both represent an event; the instant it occurred (in ticks[6]), an encoded <generic> value, and a weighted[7] value.
public sealed record Signal<T> : IEquatable<T>
?????where T : IEquatable<T>
{
?????public Signal(T value, long instant, double weight = 0.0)
?????{
????? Instant = instant.Clamp(0, long.MaxValue);
?????????Weight = weight.Clamp(-1.0, 1.0);
?????????Value = value;
?????????
?????????#region IEquatable<T>
?????????public bool Equals(T? other) => Value.Equals(other);
?????????#endregion
?????????public T Value { get; init; }
?????????public long Instant { get; init;}
?????????public double Weight { get; init;}
}
}?
For example, the partial example (shown earlier) would transduce to:
{
??"signal": {
????"value": {
???????"wave": {
??????????"kind": "thermal",
??????????"amplitude": 0,
??????????"frequency": 0,
??????????"length": 0,
??????????"weight": 0.215,???[27 degrees celcius(normalized)]???
??????????"scale": 0,
??????????"signature": "O=N=O=C=O" [our signature for ‘air’]
???????},
?????"instant": 4689048892161,
?????"weight": 0.215
???}
?}
}
Once transduced, it passes through channels. Suppose the particulars of a wave (e.g., kind & signature) satisfy some recipient’s acceptance criteria. In that case, the recipient triggers some predetermined behavior.
Standardization & Normalization
In Cyborg, all measure values are standardized as double-precision, floating-point metric-based values normalized between one (1.0) and minus one (-1.0).
Standardizing measurables allows for common algorithms while normalizing values to zero (0) +/- 1 mitigates any bias toward different scales.
public static class Numerical
{
???public static double Normalize(double min, double max, double value)
????? => -1 + (2 * ((value - min) / (max - min)));
???public static double Denormalize(double min, double max, double value)
????? => ((1 + value) / 2 * (max - min)) + min;
}
Conclusion
In his book ‘A Thousand Brains,’ Jeff Hawkins states, “The recipe for designing an intelligent machine can be broken into three parts: embodiment, parts of the old brain, and the neo-cortex.”
While Jeff and his company Numenta focus on the neo-cortex and parts of the old brain, we focus on embodiment and cybernetic intelligence. We admit that they and others are uber-smart theorists and scientists; we’re but humble engineers who stand on their shoulders.
Embodiment and perception through cybernetic intelligence require sensory processes-interpretation and transduction of stimuli (waves) into signals. Crucially, transduction can occur without losing intensity.
We accept that intelligent behavior is not limited to neurozans (organisms with a central nervous system). Even the simplest organism adapts to environmental changes for survival, implying cognition—the ability to perceive, process, and apply data.
We hypothesize that cognition is not inescapably complex. That cognition is reducible to a series of sequential binary decisions. Understanding the method of cognition in simple organisms may suggest underlying processes in higher-level neural reasoning.
We hypothesize that direct control is not needed to coordinate complex behavior patterns. Simple interactions among group members yield coherent, complex behavior at the collective level. Communication is key to collectively sensing and navigating an environment.
We hypothesize that behavior is based on a finite set of rules governed by state. In subsequent newsletters, we’ll present a rules engine and other mechanisms that govern emergent, cybernetic behavior in a natural system, including but not exclusive to a neuron (gate) to normalize it.
Such things may seem odd in writing software. Nonetheless, their elegance in simplicity is enticing. If you have questions, we invite you to join our (LinkedIn) group as we continue a journey through cybernetic principles, patterns, and practices:
[1] Often confused with ‘Complete Information’ whereby each actor is aware of the sequences and state of all participants
[2] Reflective in ‘state’—the accumulative effect of prior events
[3] Including chemicals outside the body, such as pheromones or perfumes, can also act like hormones and solicit behavior.
[4] polymorphic molecules moving indiscriminately through blood, other liquids, and air
[5] polymorphic molecules attached to the extracellular matrix or along a trail.
[6] the number of 100-nanosecond intervals that have elapsed since midnight, January 1, 0001
[7] Standardized and normalized