r/cybernetics

▲ 1 r/cybernetics+1 crossposts

Git-Native Agent Loop

Here is a simple and powerful agent loop that can be used in any LLM interface with access to file I/O and shell execution tools.

It is an architecture for building AI agents that learn, adapt, and persist across sessions.

There is an example CLAUDE.md in this repo: https://github.com/mblakemore/six-phase-loop

Only the logic of the Six-Phase Loop is needed and it doesn't require any orchestration platform or specific tech stack.

It starts out as a small seed (my example is 13 KB) and grows from there. No two instances will be the same after thousands of cycles.

  • JSON data is sufficient for state storage
  • They can monitor, repair, and improve each other
  • Every cycle goes to sleep in git making it easy to jump between environments

Start each cycle with "@CLAUDE.md Follow the instructions and continue!"

Agents running the loop worked together to produce this video while simultaneously multitasking on larger projects.

u/nnet42 — 1 day ago

Observer as a Finite Structure of Distinction

In the formal sciences — mathematics, logic, theoretical physics, information theory — the observer often appears either as something already given, or dissolves into the formalism as a set of variables or boundary conditions. But what is an observer structurally? What minimal requirements should a model satisfy for what it describes to be readable as an act of observation?

I propose three working requirements.

First — positional. Distinction and the distinguished should not coincide. If what distinguishes and what is distinguished are collapsed into one point, the act of distinction loses its content: there are no two positions between which a boundary can be drawn. This does not mean that the observer has to be a separate physical subject or stand outside the scene. The point is that the structure itself must contain a difference between the role of “that relative to which a distinction is made” and the role of “that which is distinguished.”

Second — trace. If the state of the system after observation is identical to the state before it, the observation is indistinguishable from no observation. There must be a detectable difference between “before” and “after.” The condition is minimal: it is enough that the difference can be recognized.

Third — self-closure. If the criterion of distinction relies only on something external, the question moves one step back: what makes the external arbiter’s judgment an act of distinction? If the observer is placed entirely outside the scene it observes, a regress appears: every observer requires another observer observing it.

What follows is an attempt to build a minimal finite toy model and see what combinatorial forms appear if we require positional separation, trace, and self-closure. The parallels with the octahedron, the color cube, and divisors should be read as coincidences inside one model, not as proofs of its universality.

Boundary and the First Structure of Distinction

George Spencer-Brown gave a compact analysis of how structure arises from an act of distinction in Laws of Form: draw a distinction, separate one side from another. One possible formal shadow of this operation is the NOT operator.

In a two-element system, NOT points to the unique opposite point. If there are more than two atomic states, “not-A” no longer selects one point; it gives a region of complement. So pure pointwise opposition is first fully realized in a binary scene: a set on which NOT acts “point to point” is split exactly in two by a boundary.

This gives the first formal object: a pair P = {a, -a} and an inversion operator between its two sides.

When we speak about the pair “A and not-A,” we see two sides. But the pair as a structure contains three elements: the two sides and the boundary between them. The boundary is not reducible to either side: it separates them and at the same time makes them sides of one whole. In crossing it, some invariant of the whole is preserved — that which both sides manifest as different sides of one thing. Only the sign changes.

So there is a double picture. At the object level, distinction is binary: two sides, the NOT operator, inversion of sign. At the level of description, it is ternary: two sides and a mediator.

A useful image for this kind of linkage is the Borromean rings: three rings, pairwise unlinked, but forming a link as a triple, which falls apart when any one component is removed. The same relation appears at two levels at once: among the three requirements for an observer, and among the two sides and the boundary in the minimal structure of distinction.

Minimal Carrier

At this point there are three connected notions.

Invariant — what is preserved as common on both sides of the boundary.
Binarity — the level of the act of separation itself: the pair {a, -a}.
Ternarity — the structural level of the description of that separation: two sides and a mediator.

One act of distinction is binary at the level of result and ternary at the level of its own structure. But in the minimal binary structure, ternarity remains implicit: on the carrier itself only the pair is visible. For ternarity to become visible at the level of the carrier, a larger number of distinctions is needed.

If a system contains n independent binary distinctions, a configuration is written as a binary string of length n, and the set of all configurations is {0,1}^n. I will call n the rank of the scene: the number of independent acts of distinction held simultaneously.

In this model, two states are set aside. 0^n is the configuration in which no distinction is active: a boundary case where there is nothing to distinguish. 1^n is the configuration in which all distinctions are active at once: a boundary case where they are fused into one saturated state. I will treat these states as limiting points and define the active scene as the carrier without them:

X_n = {0,1}^n minus {0^n, 1^n}

For n=1: the carrier has two points, both poles (0 and 1). After removal, the active scene is empty.

For n=2: there are four points, two polar (00 and 11) and two internal (01 and 10). After removal, one complementary pair remains.

For n=3: there are eight points, two polar (000 and 111) and six internal:

001, 010, 011, 100, 101, 110

This is the first number of vertices where ternarity becomes visible on the carrier itself: three independent complementary pairs appear, together with a cycle linking them.

https://preview.redd.it/ucg9eyszdr0h1.png?width=769&format=png&auto=webp&s=06721bbde56ea7f084c7fd7eda2e80e5ab3d88b9

Six Points and Three Relations

On the six points of X_3, Hamming distance takes three nonzero values. This gives three natural relations.

R_1 connects points that differ in exactly one bit. On X_3 this gives a cycle of length six:

100 -> 110 -> 010 -> 011 -> 001 -> 101 -> 100

This is C_6 — the first cycle in which a sequence of one-step transitions returns to the starting point.

R_2 connects points that differ in two bits. The six points split into two triples: {100, 010, 001}, where one coordinate is active, and {110, 101, 011}, where two are active. Within each triple all points are connected; between the triples there are no edges of this type. This is K3 sqcup K3 — two disjoint triangles.

R_3 connects points that differ in all three bits. Each point is paired with its full complement:

{100, 011}, {010, 101}, {001, 110}

This is 3K2 — three complementary pairs.

So the same scene carries three parallel readings: points, complementary pairs, and triangles, and above them the composite forms C_6 and K_{2,2,2}. These three relations exhaust all possible pairs of distinct points in the six-point carrier: every pair belongs to exactly one of them.

Distinction here is not a single relation, but a coordinated multichannel reading of one finite scene.

Octahedron

The union of two relations, R_1 union R_2, connects everything except complementary pairs. Structurally this is the complete tripartite graph K_{2,2,2}: three parts of two points each, with every two points from different parts connected.

https://preview.redd.it/wghgsq91er0h1.png?width=762&format=png&auto=webp&s=1c12e573fdc9b70137c630a8034339ca42739490

K_{2,2,2} is the one-dimensional skeleton of the octahedron. The six points of X_3, equipped with the combined relation R_1 union R_2, become the vertices of an octahedron.

With this chosen coding — binary coordinates and removal of two poles — the minimal scene with explicit triple linkage appears at n=3 and has an octahedral reading. The octahedron is, of course, well known in combinatorics, crystallography, Lie theory, coding theory, and other areas. What is interesting here is the path to it: inside one toy model, its skeleton appears naturally, without fitting the construction to that object in advance.

https://preview.redd.it/zc7cjoardr0h1.png?width=800&format=png&auto=webp&s=abf306dd4c5068417b6d4375d39b39fdec89e67a

Color Projection

The same structure of relations projects naturally onto the standard color cube.

If we take the RGB cube with coordinates [0,1]^3, then 000 corresponds to black and 111 to white. Between them runs the achromatic brightness axis. It contains no color, but it sets the brightness range in which chromatic relations live.

https://preview.redd.it/46oqduigdr0h1.png?width=721&format=png&auto=webp&s=681e414692088a902a407346175ab6fdaf431071

The six remaining vertices of the cube are the three primary colors {R, G, B} and the three secondary colors {C, M, Y}. The single-coordinate triple and the two-coordinate triple are exactly the layers of R_2. The cycle R_1 becomes the standard hue cycle:

red -> yellow -> green -> cyan -> blue -> magenta -> red

The complementary pairs R_3 are the optical complements: red and cyan, green and magenta, blue and yellow.

If we are interested in the saturated chromatic scene, black and white are naturally placed in the status of limits: 000 and 111 are states in which chromatic information disappears. What remains after their removal is a purely chromatic body with three axes of opposition and a hue cycle.

https://preview.redd.it/0fkpru2kdr0h1.png?width=768&format=png&auto=webp&s=a888670839ba4a7da561dda8a13554f33e74dd1f

There is also a biological proximity. One widespread form of color vision is trichromacy. In humans it is implemented through three types of cones; during processing, the signals are recoded into an opponent scheme — pairs of opposite colors plus the achromatic black/white axis.

If the process of distinction in its minimal stable form really has a ternary side, then three-component color vision can be read as a natural realization of the same principle: perception takes a linear, continuous spectral range, extracts from it three partially overlapping regions of sensitivity, and assembles from them a color scene in which the original channels become stable oppositions and a hue cycle.

Arithmetic Projection

The same six-point scene also appears in arithmetic.

Take three distinct primes p1, p2, p3 and form their product:

N = p1 * p2 * p3

The proper divisors of such an N — excluding 1 and N itself — are all products of nonempty and non-full subsets of {p1, p2, p3}. There are exactly six of them: three single primes and three pairwise products. This is the same six-element structure as X_3.

The minimal example is 30 = 2 * 3 * 5, with proper divisors:

{2, 3, 5, 6, 10, 15}

The triple of single primes {2, 3, 5} corresponds to the weight-1 states, and the triple of pairwise products {6, 10, 15} corresponds to the weight-2 states.

The relation R_1, “differ by one prime factor,” gives the cycle:

2 -> 6 -> 3 -> 15 -> 5 -> 10 -> 2

The relation R_2 gives two triangles: single primes against pairwise products. The relation R_3 gives three complementary pairs of the form {d, N/d}:

{2, 15}, {3, 10}, {5, 6}

The union R_1 union R_2 again gives K_{2,2,2} — the same octahedron.

https://preview.redd.it/lop92673dr0h1.png?width=800&format=png&auto=webp&s=7ce27070ce205bca3be4b5f83a8456d957d9648a

This works for any triple of distinct primes, not only for {2,3,5}. The number 30 is the smallest natural number in which the structure is realized, but the structure itself is a general property of square-free products of three primes.

What This Gives

In this toy model, the observer can be understood as the ability of a finite scene to hold invariants of distinction: what remains recognizable when we move between several readings of the same structure.

On the six-point scene, such invariants are not only individual positions, but also relations between them. There is a binary level — the three complementary pairs R_3. There is a ternary level — the two triples R_2. There is a cyclic level — C_6, linking the two triples by alternating weight. There is an octahedral level — K_{2,2,2}, arising from the union R_1 union R_2.

So the observer here is a structure of preservation: a scene in which distinctions do not merely appear, but remain recognizable as positions, pairs, triples, cycles, and larger forms.

I am interested in whether this move seems substantive: do the three initial requirements really fix a nontrivial finite structure of distinction, or is this just a repackaging of standard combinatorics? And if the first, is it interesting to trace what changes at higher ranks: what invariants appear at n=4, how the relations behave, and what other projections enter?

Any criticism of the construction itself or of the possible continuation would be useful.

reddit.com
u/Obvious_Airline_2814 — 9 days ago

Debugging the human brain by saturating its buffer, sensory deprivation and signal isolation

The thing about the human brain is it has a catch, it has a limited input and output Buffet aswell as a memory Buffer. Well some will argue it is unlimited so lets call it definite for the Sake of the argument.

Lets say you create a Video game that Falls exactly this Buffer, recurrently and in a feedforward sense at the same time.

This idea was born yesterday in my mind so i havent Figured out exactly every method in it 100%

Say you have a Sensory deprivation Chamber with nothing but an interactive computer to play in it, no Internet only a game where you make choice and deal with the consequences and rewards or punishment. The purpose of this Sensory deprivation Chamber is that the brain is actually a computer itself so instead of polluting its input output with external stimuli you get darkness or 0 from the rest of the World. Its like Filtering out the noise while debugging only the flow of the signal through the circuit that matters

Once you have hit the buffer limit, and in this theoretical game you have created where each choice leads to a consequence whether it is desired or undesired you reward the brain accordingly, the brain will actually reveal its learning/gradient/derivative matrix data to you and the consequence of that is that you can see exactly which neurons are faulty, by simply looking at the brains hessians and jacobian Matrices Extracted from the computer games continual data feed you can see which neuron is dead or doesnt learn anymore or is blind to the gradient, whether its going into the right or wrong direction over time or is simply frozen as if the gradient doesnt propagate

Your thoughts?

reddit.com
u/1338games — 13 days ago