Temporality

Temporality

Cause and effect. Two core pillars of cybernetics. But there is another—time. It binds the first two—temporality, the state of having some link with time.?

Time is the measurement of motion (flow), yet motion is not evident without time—conjoined; one cannot exist without the other. Time is proven only by motion; either both exist, or neither does. Consequently, in cybernetics, an effect is evident only out of motion over time—cause.

Conveniently, time is a natural insulator—by temporal knowledge. Neither the producer nor the consumer needs to be present at the same time to realize it. Still, too much time may lead to forgetfulness—but even this has merit.

Consistently, space is a natural insulator—by spatial knowledge. Too much knowledge may lead to sensory overload and a reduced ability to discriminate against an overabundance of information[1]. In other words, it's about scope.

Time and space are natural insulators that provide a context from which to observe cause and effect. Time is a variable that gives an order to things, and space is their medium—not just physical (body) but mental (mind)—cognition.

Detecting motion demands comparisons between intervals. Yet, an interval is nonspecific unless bound to a rhythmic device—a clock. In this idiom, an interval is termed a tick—a constant; what varies is its resolution.

[1] An ant who sees the entire nest at once can no longer sort its brood—organized in concentric circles, each contains items of a different type. Eggs and small larvae are in the middle whereas larger larvae increasingly appear further out towards the periphery.

Overview

In Cyborg—our game, time is measured in 100-nanosecond intervals (ticks) that have elapsed since 12:00:00 midnight, January 1, 0001. The flow of time occurs once a second (10 million ticks), called a frame. Change is detected by quantifying effects between frames, which may or may not cause an action. Collective behavior emerges from a series of actions at ~60fpm (frames per minute).

In Cyborg, time is a first-class concept. A clock provides ticks; a timer provides flow and, thus, a way to calculate gradient values[2]. These low-level concepts offer themselves to higher-level concepts of behavior that afford knowledge acquisition, preservation, reuse, and sharing.

Each high-level concept has two or more domain-specific knowledge types:

  • Structural: relationships and properties of measurement such as scale, scope, and units
  • Classification (functional): defining state, conditions, and rules
  • Semantic (logical): inferring state from a series of conditions over time
  • Dynamic (probabilistic): interpolation of data—detection and reaction

So, given a set of time-stamped data (events) and defined goals, we can interpret past and present states or relevant trends—temporal reasoning by way of:

  • Intervals: limits the scope of inference to a single time-frame
  • Inference: interpolating state at each interval (frame)
  • Interpolation: accepts two points and a timespan as input over which an approximation is calculated (positively or negatively)

Identifying abstractions for extracting information over time is valuable—it affords reasoning. Here, we offer four: Clock, Timer, Temporal, and Kit. The first three are time centric, while the last (Kit) is space centric. Jointly, they provide a framework in which to reason—cybernetics.

  • Clock: a way to mark a point in time—epoch
  • Timer: a way to create the flow of time—cause
  • Temporal: a way to interpolate state over time—effect
  • Kit: a way to hold state and scopespace.

Note: the Kit is a proprietary IoC (Inversion of Control) container and beyond the scope of this article; it is referenced here for completeness. Essentially, it holds and isolates state—a behavioral context.

[2] things that increase or decrease over time like absorption or evaporations.

Clock

A clock provides actual time (in ticks); a time-stamp to mark events and calculate variances—change.

public class Clock
{
??? public static long Ticks
??????? => now();

??? private static Func<long> now
??????? = Stopwatch.GetTimestamp;

??? public static void Set(Func<long> actuator)
??????? => Interlocked.Exchange(ref now, actuator);
}        

Note: Stopwatch.GetTimestamp uses the underlying (high-resolution) system timer mechanism. Yet, this is variable, providing an alternate way to control the flow of time. In this way, a 'Clock' becomes testable; its actuator method (now), although static, is mutable and allows for a custom function, a way to control time programmatically, or provide an alternative mechanism altogether.

Timer

A timer provides transient time—flow. Once a second[3], in the absence of input, the system can update its state—a game loop.

private static void Update(object? _)
{
??? lock (timer)
??? {
??????? timer.Change(Timeout.InfiniteTimeSpan,
???????????????????? Timeout.InfiniteTimeSpan);

??????? update<IRenewable>();
??????? update<IUpdateable>();

??????? timer.Change(interval, interval);
??? }
}        

Once a second, in Cyborg—the game, the Update method:

  • Disables the timer (inhibits reentry, ensuring sequential frames)
  • Updates any/all ‘Renewable’ (cache) entities
  • Updates any/all 'Updateable'?(game) entities
  • (Re)Enables the timer with the original intervals

[3] Importantly, intervals must be short enough to detect meaningful change and long enough not to use resources excessively.

Temporal

No alt text provided for this image

A temporal is a linear approximation of some value within some range over some timespan.?Note: In Cyborg, all values are normalized between ?1.0 and 1.0. Normalization affords shared algorithms regardless of the data.

These low-level numerical time-series variables are transformed into a high-level qualitative form useful for triggering neuron action potentials and calculating depolarization[4], chemical evaporation, and absorption rates.

As shown (below), the constructor takes a starting and ending value of 'x' & 'y', respectively. Note: a factory method (New) is used.

The Temporal value decreases if 'x'> 'y'; otherwise, it increases until the timespan has expired, when the value of 'y' is returned. Here, a declared temporal increases from 0.0 to 1.0 over a ten-second interval:

var temporal = Temporal.New(0.0, 1.0, TimeSpan.FromSeconds(10));        

After 1 second, temporal == 0.1; after 2 ? seconds, temporal == 0.25; and so on until 10 or more seconds have elapsed, at which time temporal returns the (initial) value of 'y': temporal == 1.0;

public sealed class Temporal
{
???? public static readonly Temporal Zero
???? ??? = new(0.0, 0.0, TimeSpan.Zero);

???? public static Temporal New(double x, double y, TimeSpan t)
???? ??? => new(x, y, t);
?
???  private Temporal(double x, double y, TimeSpan t)
???? {
???? ??? this.x = x;
???? ??? this.y = y;
?
???? ??? m = Clock.Ticks;
???? ??? n = m + t.Ticks;

???? ??? if (t > TimeSpan.Zero && x != y)
 ??? ??????? this.t = t.Ticks;
???? }

???? private readonly double x;?????? // left limit
???? private readonly double y;?????? // right limit

???? private readonly long m;???????? // lower complexity limit
???? private readonly long n;???????? // upper complexity limit
???? private readonly long t;???????? // timespan

???? public static implicit operator double(Temporal other)
???? ??? => other.Interpolate();

????  public static implicit operator Temporal(double x)
???? ??? => new(x, x, TimeSpan.Zero);

???? public Temporal Add(TimeSpan operand)
???? ??? => new(x, y, Extrapolate().Add(operand));

???? public bool Assert(Func<double, double, bool> action)
  ???    => action(Interpolate(), y);
   ?
  ?? private double Interpolate()
  ?? {
  ?? ??? var now = Clock.Ticks;
  ?? ??? if (now >= n)
  ?? ??????? return y;
  ?? ??? 
         var w = Convert.ToDouble(now - m) / t;
  ?? ??? 
         return x > y
             ? Max(y, x - (x * w))??? // decrement
             : Min(y, x + (y * w));?? // increment
     }
      
???? private TimeSpan Extrapolate()
 ???     => new((long)(Abs(Interpolate()) * (n - m)));
}        

A temporal is immutable. While its (interpolated[5]) value varies, its properties do not. To add time is to create a new instance representing an aggregation of the new and remaining (extrapolated[6]) amounts.

var temporal = temporal.Add(TimeSpan.FromSeconds(10));        

A temporal can calculate its extrapolated value and pass it and the value of 'y' to a predicate function. This way, determining expiration is application-specific[7]; it offers extensibility without modification (the Open-closed Principle). For example, an extension method (Like) could impose tolerance limits.

if (temporal.Assert(() => x.Like(y)
{
????// do something when within a tolerance of 3 decimal places
}

public static class DoubleExtensions
{
    public static bool Like(this double @this, double other)
        => Math.Abs(@this - other) < 0.001;
 })        

[4] The period between possible action potentials. This ensures that an action potential travels forward down the axon but not backward.

[5] An estimation of a new value based on the range of discrete known data-points

[6] An estimation based on a relationship between calculated unknown data-points

[7] For example, when comparing values, precision (tolerance) becomes relevant

Memory

"… but there's one great advantage in it, that one's memory works both ways"

"I'm sure mine only works one way," Alice remarked. "I can't remember things before they happen."

"It's a poor sort of memory that only works backwards," the Queen remarked.

An excerpt from Alice in Wonderland

In Cyborg, backward memory is strengthened or weakened using a matrix of sparsely distributed temporals; forward memory is the art of prediction using these same representations. Learning and predicting occur through the maturation of these memory models—neither is possible without some record of past events.

Paradoxically, forgetfulness is equally important; pheromones evaporate over time—a convenient side effect of erasing ancient paths. That said, forgetting is as complex as learning; it has state transitions—weakening of some variable(s). Time is entwined with memory. Longevity is dictated by it. Mixed with space, which dictates magnitude, yields spatial-temporal reasoning.

Mentally manipulating spatial patterns over time sequences is essential for conceptualizing solutions to problems—a computational model of grid and place cells organized in a feedback loop—intelligence.

Neurons, Dendrites & Synapses

Our work contains neurons, dendrites, and synapses. Their details are beyond the scope of this article; however, know that they leverage Temporals to strengthen or weaken their connections. Nonetheless, state is inferred by recursing up dendritic trees and aggregating their (temporal) synaptic weights. Each tree represents some high-level behavior. If the aggregated weight exceeds a threshold, its associated behavior is invoked.

Remarkably, behavior is declarative—in terms of dendritic trees[8]. Collective behavior emerges from a forest of trees arranged in columns, layers, and regions consisting of conditions and rules that cause effects over time.

In Cyborg—our game, perturbations are introduced that cause a 3rd person (Cyborg) to adapt by adopting new behavioral patterns or assimilating artificial devices to compensate for a worsening environment—ultimately, adopting enough devices to identify as a Cyborg. Here, players don't win; they survive—honors are bestowed upon those who survive the longest under the worst conditions.

[8] This is an over simplification for convenience of explanation. To effect behavior may involve two or more trees followed by voting on their conclusions, which invokes other trees.


Conclusion

"Time and space are not conditions of existence,
time and space is a model for thinking."
~Albert Einstein

Time is a complex notion. Modeling its effect in a structured way is tricky; even so, we have presented temporal patterns with a promise to do so. Perhaps what is tricky is that things happen asynchronously, but our brain (eventually[9]) sees things synchronously. Sadly, we lose things in this translation. To us, time is sequential, but this, too, is deceptive.

Our brain can travel backward (memory) and forward (prediction) in time. Modeling this without catastrophic forgetting or flawed forecasting is tricky. In his books "On Intelligence" and "A Thousand Brains," Jeff Hawkins suggests that our brain is but a prediction engine built upon common algorithms replicated across the neocortex. So too, might such algorithms exist across cybernetics.

The Temporal is such an algorithm.

[9] Our brain takes multiple inputs, then votes on a single concept—Jeff Hawkins


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/

No alt text provided for this image
Ivan Valiente

Staff Software Engineer at GRUBBRR

2 年

Interesting and thought provoking newsletter. Keep them coming!

回复

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

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 条评论
  • 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 条评论
  • 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…

    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…

社区洞察

其他会员也浏览了