\Physicalized computational ethics to align all agents from the big bang all the way to the best ethical ultimate futures for all

[Draft that has the main ideas, scroll to quickly see graphs and get the gist]

M. Usk, contact me if you want to be a co-author, feel free to point at problems here, too

This graph is explained in detail down below, it’s a sneak peak here

Jun 28, 2026 update:

3D Ethical Big Bang - the white center is the 1st moment, each darker color - is the next moment:

It's 100% possible to combine ethics and physics and in fact ethics can be seen as the source of physics.

It's the only way to have an ethical (=not selfish but safe and aligned) artificial superpower (AI agents, AGI, ASI).

Because it's the only way to know on the lowest level how to non-forcefully pursue the most non-forced goal:

How to build the best futures for all.

I'm writing a book on all this, I know that a diamond lattice is anisotropic - it's a long story for a tweet how to mitigate it, it's not some physical theory of everything, it's about aligning AI with the most robust ethics:

To align AI it's potentially enough to have a simple 1+1D model, so this 3+1D model here is an overkill to show the direction of how to build the universe out of ethics.

You can spin it around, see lower dimensional graphs and what it all means, it's a work-in-progress (I have a bit of a depression, so I do things slow - more people are needed):

What physicalized computational ethics (it's tempting to call it ethophysics) means is described in this document (scroll to see all the graphs).

The live online 3D ethical big bang + where quantum superposition begins:

https://app.spline.design/community/file/5d16bd9e-89e0-40fd-82bb-e71868c468a7

Preamble

You can quickly scroll to see the graphs, code and main ideas. The physics part is by its very nature (trying to combine ethics and physics) is speculative and tentative but the ethics is solid, is already useful to compare most ethical decisions between agents (biological and not), for intrinsic AI and human alignment and to model the whole history of inequality from the big bang all the way to the best ethical ultimate future.

So the whole thing can be called physicalized computational ethics (phy-ethics) right now but the aspirational goal is to inform physics, too, the current name is very tentative and can one day become ethophysics (ethicalized computational physics).

Ethics here is based on the most successful psychological model - cognitive behaviour therapy that according to recent meta analyses is the most effective non-pharmocological treatment against depression, anxiety, anger (in case of anger REBT - another cognitive model - is equally effective) and quite a few other psychological problems.

Ethics should be based on what works and what’s effective, not on nothing. Shockingly, there is a possibility that physics can end up being a subset of ethics (e.g. if our universe actually is a simulation but this is for another paper).

Where help is needed is this (I can do it but because I recently started the effective utopianism community, I have less free time, so it’ll take me some, I also got too deep into discrete quantum mechanics): to add math/code to compare any ethical decisions numerically first with full information, then with incomplete information. Contact me at
groundfinch@gmail.com if you’re interested or just take the whole thing and do it - I’m not greedy, it’s in the public domain.


Plans for future research: It’s possible to compute the ethicality of each state of the universe I think, where 100% ethicality - simulated multiverse (all futures, choices grown), 0% ethicality - it was destroyed, basically a giant black hole remains (all futures collapsed), we usually operate very close to 50% ethicality - if we grow futures/choices/freedoms - it’s slightly above 50%, if we collapse them - below. A bit like Google PageRank to compute that, should help with aligning everything.

(Aug 2025) Started publishing quantum ethics graphs and simulations - feel free to jump to Part 2 but the part 1 on the non-quantum ethics has many interesting details, too. The difference is - do the paths collide (quantum) or not (non-quantum)


(Apr 2026)
The 3D ethical simulated universe model is ready, you can ran it it locally in your Web browser

An example of (1+2)-dimensional tree (partially-ordered set), 1 time dimension and 2 space dimensions. Imagine that the top of the thick stem (near the top of the tree) is the ethical big bang (it should be a singularity, a point, not a stem, but alas the graph is not perfect). The lines are choices (quantum paths), each forking divides the line (the choice) into 3 new lines (choices) recursively. Each fork is a point agent, they “make choices” randomly. Our universe can be modeled as a (1+3)-dimensional ethical tree, so it will be a more complicated shape than what you see here.

Our ethical model (phy-ethics) is built on top of discrete computational physics model called Wolfram Model[1] or Hypergraph Dynamics[2][3]. Phy-ethics is as minimal a model as possible in order to be easy to explain and compute, so we use binary trees: (1+1)-dimensional trees to model 1 time and 1 space dimension.

Phy-ethics is Wolfram’s deterministic physics but encoded with the minimal amount of randomness on top in order to model free will, choices and agents (both point and not). Wolfram’s physics and phy-ethics are in a way interchangeable. So when the Wolfram Project grows, phy-ethics grows on its shoulders.

It’s developed at a critical time in history, when we need to align AI (specifically multimodal LLM, we try to have a broad audience with our papers, so we simplify, sometimes it makes us sound less precise) systems. Phy-ethics can align everything from the Big Bang, to AI, all the way to the ultimate future.

[On the cover we can put a 3D little human (homunculus) made out of choices. It’s a bit of a joke. His head was the Big Bang and then he was grown down by point agents making choices. To show that the whole thing is real, our universe can be grown from point agents, we’ll just need (1+3)-dimensional phy-ethics].

Is the universe non-deterministic?

It can be modeled deterministically or non-deterministically according to Rabin–Scott powerset construction[4]. You can convert any deterministic system into a non-deterministic one by introducing randomness (what we’ll do in this paper to model free will). And you can do the opposite: convert a non-deterministic system into a power set of deterministic systems.

For example, you can “write down all the possible state histories that your dice creates”, so instead of 6 possibilities, you’ll have 6 deterministic worlds where each number appeared on the dice.

What future do we want? Or the “mechanics of the big bang ethical machine”

Before looking at more complicated cases that model nonpoint (composite) agents, choices and even qualia, let's first look at simple universes starting with utopic "heavens with angels" going all the way to dystopian "hells with demons".

It can help us understand what future we want because if we’ll find the best future, our goal of aligning AIs will simplify tremendously: we’ll just need to find the safest way to this best future.

What if both an absolute utopia and absolute dystopia are boring places where nothing happens?

We'll use some binary trees (see Appendix 1 for code):

Let's pretend the top of the triangle is the Big Bang (or ethical Big Bang, we are modeling the most minimal model of ethics, not physics here but we’ll try not to go too far from physics), time goes down, it cannot go up. Each horizontal line of dots (green here) is the 1D space. Each dot is a point agent. Each agent can grow down-left, down-right or in both directions.

We’ll anthropomorphize heavily because it tremendously simplifies explaining and it shows that even this most minimal of ethical systems show interesting “life-like” behaviours.

We’ll see there are 3 types of phenomena:

  1. Green point agents (accommodating, non-greedy, they wait before growing down, they try not to collide with others. If there is no one below, they grow in both directions like red agents), a non-greedy agent for short.
  2. Red point agents (non-accommodating, greedy, they grow first, don’t wait), a greedy agent for short.
  3. Black point non-agentic matter (black-hole-like, a choice/freedom collapse caused by a collision of 2 choices, the resulting point non-agentic matter cannot make choices, cannot grow), non-agentic matter for short.

Green point agents are non-greedy, altruistic, freedom givers, they don’t “enforce their will” on others: they try not to grow in the direction where the space is already occupied or will be occupied, so they wait until the point agents on the left and right from them make their choice.

Now we have 0.1% of red greedy agents. They always grow in both directions (=make both choices, take both paths, freedoms), so they can cause a "choice collapse" (=freedom collapse): when 2 agents made the same choice, this results in the creation of a blue sterile dead matter that cannot make choices (it's non-agentic). We call it non-agentic matter, in a way it’s a point black hole.[5][6]

1% of red greedy agents (freedom takers, enforcers). Sometimes green agents can accommodate them by "swiveling away" but most of the time it's impossible so the 2 choices of the 2 point agents collide (they both try to grow into the same spot between and below them, try to make exactly the same choice, it doesn’t end well for them) and they transform into blue dead non-agentic matter (that cannot make choices).

2.5% of red greedy agents. You can start to see black downward triangles under those places where many agents collapse, their choice collapses created blue non-agentic dots, under the blue dot’s there is nothing or you can say there is black non-agentic dots. I decided to keep them black, so they are black dots on top of black empty space.

Black non-agentic matter dots are basically the same as those blue non-agentic matter dots, both blue and black (invisible) dots cannot make choices (cannot grow or change their shape) that’s why they are non-agentic. Blue and red agents are just going to grow around the non-agentic matter eventually, creating a downward triangle.

From the mathematical perspective (not necessarily from the physical one): “General relativity doesn't admit black hole solutions. It only admits wormhole solutions”,[7] so each black hole necessarily has a white hole “on the other side” (a white hole is sometimes equated with a big bang). So it’s fun to speculate wildly that when 2 agents have their 2 choices collide, those 2 choices don’t just disappear, they start another universe or even 2: in each universe each will get what they wanted. Creating a multiverse of choices akin to the Many-worlds interpretation of quantum mechanics,[8] so each choice can create a new branch (not necessarily just colliding choices). Or it’s possible to imagine 2 completely new Big Bangs (2 choices each creates a new singularity). Or all of the above at the same time. But let’s return back to reality.

5% of red greedy agents (who enforce their will and choice on another agent or 2).  

10%, some larger groups of non-agentic (non-choosing) point matter triangles start to appear. The largest on the bottom right was made by 5 point agents (3 greedy red point agents and 2 non-greedy greens on the sides) having their choices collide at the same time, creating black non-agentic matter below them, where their choices collided.

20% of red greedy agents, it becomes hard for green accommodating agents to find a way, to choose where to go down without colliding with someone.

Green agents wait before growing down to check there is space to grow, they “give space” to others first. Red greedy agents just instantly grow in both directions, they don’t wait.

50% of red greedy agents. There are about 50% of green accommodating agents. They barely find a way to grow down because both down-left and down-right ways for each green point agent are often occupied by a greedy red “who grew there (made this choice) first”.

So green non-greedy agents are non-greedy because they wait for the agents on the left and right from them to make a choice first. We had to implement this behaviour in code.

The simple fact of having 2 primitives: to grow one way or both ways (=to go one way or both, to chose one thing or 2 at once) can create this emergent phenomena where one red greedy point agent “takes the freedom/choice” (“freedom-takes”) of another by choosing first, not letting/waiting for the neighbours to choose first.

And “freedom-giving” is what each green non-greedy accommodating point agent does: it waits for adjacent agents on the left and right to choose first, this way “giving them freedom/choice”.

In a way red greedy agents “move or grow faster in time than the green non-greedy agents” because they make their choice first and for a short time they “move or grow broader in space” because they always choose to grow in both directions but at the cost of “dying and killing” more often: creating point choice collapses (=non-agentic matter, black holes).

Red greedy point agents live shorter lives (if you consider the full history of growth of the agent from the top Big Bang to now, you can see the “life history” of each agent, we’ll show it later) but each red greedy point can “get lucky” (start to grow maximally fast, not get all of its choices into collapses, not die) and become “Big-Bang-like” (grow with the speed of light in both directions, we’ll see it later).

Green non-greedy point agents live longer lives and their lives are “more careful and deliberate”, they don’t rush and get farther and broader. Each green non-greedy point agent can “get lucky” and become “Big-Bang-like”, we claim that it happens more often with smart non-greedy point agents than with red greedy dots.

90% of red greedy agents. Black-hole-like triangles made out of dead non-agentic matter dots (that cannot make choices) are getting big fast. Green accommodating agents are the only ones who are keeping the triangles from growing even larger.

Dead non-agentic matter is by definition made out of at least 2 choices/freedoms that collided - tried to grow into the same spot.

95% of red greedy point agents.

99% of red greedy point agents. Our universe effectively stopped because those big dead non-agentic matter black triangles slice it from side to side. “Greed is eating the world”. But you can say there is still some life in this universe, some green agents do appear sometimes. If the number of green non-greedy accommodating point agents will start to increase, we can bring this universe back to a healthier state but alas…

100% of red greedy point agents. It's the Sierpiński fractal triangle and it looks like Wolfram's cellular automata rule 90. No green non-greedy agents left.

Half of this universe is occupied by black dead non-agentic matter, another half by red greedy agents. It's the maximally dead, non-agentic (least number of agents) state of this universe possible. Things just self-repeat, like a chair recreating itself each moment but increasing in size.

All agents have lost their choices, they always just grow in both directions, as if green non-greedy agents lost their “free will” to choose something else and became red greedy agents. So red greedy agents basically became like non-agentic point matter: both do only 1 thing (for non-agentic matter it is “do nothing”, for greedy agents it is “grow in both directions”), there is no choice, no randomness, no “free will”, only extremely primitive determinism: dead matter-like shapes self-repeat in a fractal pattern.

This way we can illustrate that both extremes create "boring" universes (too predictable, they are static, almost nothing happens in them): if you have 100% good green non-greedy agents, it's in a way boring, everything just self-repeats. Without red greedy agents and so without non-agentic matter, green non-greedy agents start to act “not very agentic”, like matter, there is nothing to “spook them around”. The place looks static, as if time itself stopped.

And if we have 100% red greedy agents, it's boring, too, as we just saw, the place looks dead, not alife, as if time itself stopped there.

Most fun happens in the middle, between the 2 extremes, when you have some red and some green agents.

And the most utopic universe is the collection of them all plus all the possible permutations  (the multiversal utopia) where agents can freely choose "their shape and the shape of their universe", their whole path. At e/uto we call it the direct democratic simulated multiverse or multiversal spacetime superintelligence, it’s a place, not an agent.

Both the most perfect green “heaven” full of non-greedy point agents (“angels”) and the worst “hell” full of greedy point agents (“demons”) are completely boring places where time stops, nothing happens. Both places are in a way the same: time just stops, so they both are “dead”.

Part 2. Multiple points (composite) agents, qualia, time, space, etc.

Why binary trees?

Cellular automata as shown above makes it ambiguous which agent chose what (imagine that each black square is a point agent that can choose to do nothing, grow left, right or both ways. So each agent can be “lazy”, “lefty”, “righty” or “greedy”).

Binary trees (like the ones we used on the previous pages and will use later) allow us to have the most minimal model that models choices and ethics.

Plus a binary tree allows us to easily see the distribution of choices/freedoms at each moment, to see the history of inequality from the Big Bang all the way to the ultimate future, as will be shown later.

How much do we need to “grow a universe”?

How many choices for each point agent is enough to “grow a universe”?

 

We don’t need to give each point agent 4 choices, just 2 can be enough: growing left or in both directions. It makes the universe grow a bit to the left. And it means that everything moves left twice as often as to the right.

So the simple fact of having just 2 primitives: to go/grow both ways or just one way - to fork or not to fork - can create all the emergent phenomena, as we’ll soon see.

But in this paper we’ll give each point agent 4 choices because it makes the graphs more symmetrical, aesthetically pleasing and is less arbitrary: if they have 4 possibilities, maybe they use all of them.

Even just two choices are enough to choose even among 100s of possibilities. You can just solve a simple equation to learn how many steps a 2-choice point agent will need to make to choose between 100 possibilities: 2^x = 100. So x = log(100)/log(2). The answer is ~6.6. So an agent will first choose (imagine it’s you choosing which book to read out of 100 books):

  1. First 50 possibilities or second 50 possibilities? The agent has chosen the first 50, now the agent chooses between the first 25 possibilities or second 25 possibilities.
  2. The agent has chosen the first 25 again, now the agent chooses between the first 13 possibilities or second 12 possibilities.
  3. The agent has chosen the first (13), now the agent chooses between the first 7 possibilities or second 6 possibilities.
  4. The agent has chosen the first (7), now the agent chooses between the first 4 possibilities or second 3 possibilities.
  5. The agent has chosen the first (4), now the agent chooses between the first 2 possibilities or second 2 possibilities.
  6. The agent has chosen the first (2), now the agent chooses between the first 1 possibilities or second 1 possibilities.
  7. The agent has chosen the first (1), nothing left to choose from, the choice is made.

This is not the best example (the hierarchy wasn’t fully preserved) but the general idea of converting multi-choice into binary choice is here:

So we can represent higher dimensions in our binary (2D) tree. Akin to the holographic principle that encodes 3D black holes in 2D surfaces.[9] Or akin to the way we encode complex 3D video games like GTA-6 or the Sims with zeros and ones. [Nope, we really need at least 3D to have agents spinning around each other, 2D is not enough to represent it visually].

Even a housefly can become superintelligent?

Our observable universe is 2^x = 8.798×10^28 cm in width, so using the same technique as described above, even a housefly can one day teleport (let’s pretend we have a simulated observable universe in some future and our housefly is a player in it) to any place in our observable universe with 1 cm precision after just 67 choices, so about a minute of choosing (imagine the whole observable universe is simulated and so the universe is the size of the fly, the fly chooses by moving slightly towards one or another half of it, after that the chosen half become as big as the fly again and the fly moves towards one half of it, etc, until the fly has just 1 cm of the universe left). Even a housefly can quickly choose and teleport to any place in the universe if the user interface is good enough.

So to become superintelligent all you need is a place of superintelligence that is perfectly organized and adapts to you plus a great user interface to access giant chunks of it quickly.

The same way our Big Bang, a singularity, a geometrical dot, became you and me, we claim that any agent, even the smallest, can do incredible things and become superintelligent, potentially even navigate, use and gain knowledge in some future simulated multiverse. The Big Bang was choosing inefficiently, unlike it you won’t need 15 billion years and more to do a lot, it’ll be more like with our housefly - just a minute or less of choosing will be enough to navigate the whole universe, gain any knowledge from it, etc.

So a single point agent is enough to grow a universe.

What are agents like us?

On this graph you can see more than a dozen composite agents in different colors (time goes down). Each composite agent is made out of at least 2 or more point agents and is just a sum of its choices (and choices of others that shaped it). In other words, a composite agent is a sum of its freedoms and unfreedoms. It’s a bit like a big bang: a point agent and all the consequences that it caused. See Appendix 2 for code.

Some don’t know that in world simulations physics is optional but ethics is not. Physics can be a subset of ethics.

The basic building block is a point agent, each one is like a big bang.

In this simple model you see the Big Bang on top, down as lines go the choices (=freedoms) and so time. Each blue dot is a point agent that can do nothing (“dies out of laziness”), grow left (lefties), grow right (righties), or grow both ways (greedy), it chooses one of those 4 things more or less randomly: it never or almost never does nothing (=dies) because this way the universe can stop growing prematurely, so we made it rare. In about half of cases a point agent grows both ways (greedy).

If 2 point agents make the same choice (grow to the same spot below), it's a choice collapse and result in a point black hole (dead point non-agentic matter that cannot make choices) that looks white on the graph.

Each horizontal line (1D space) of point agents and white dead point non-agentic matter represents space at a particular moment of time.

Colors show bigger (composite) agents (who are just sums of their choices and choices of others that shaped them). The golden composite agent in the middle we were rooting for passed away falling into a triangle of white dead non-agentic matter (the triangle has white non-agentic matter dots on white background, so you’ll have to imagine it a bit).

The widening in the middle of this universe is the creation of the direct democratic simulated multiverse (place superintelligence).

What are agents? Just sums of choices. Suffering is when another agent takes more and more of your choices (forces itself at you). Pleasure is Big-Bang-like: growing your choices (=freedoms), so you have more and more of them. A choice/freedom of one can be an unfreedom of another.

So even in the simplest 1+1 dimensional models, something like complex agents emerge (they die, they grow, they shrink, they can live long or short lives, they can become matter or "fork" into more agents).

Let’s look at this graph again: 3 composite agents in the middle (purple, golden, blue) were squeezed by the red ones on the left and right sides from them and “killed”: all their space/freedoms/choices were taken. The red agents took all of their choices (=all of their freedoms) for themselves. We don't want AI agents to do the same to us.

We show the first moments after our ethical Big Bang so agents are very close and their choices cause choice collapses often, later as the universe grows, there will be more space between them, long thin lines (dot agents) that grow in one direction will be photons, etc.

As you see, composite agents cannot really spin around each other on this graph (we’ll need at least a 2D surface to model it, here each moment of time is just a 1D space - a horizontal “line” of dots), only push (and sometimes even kill), give space to each other or not interfere with each other. We’ll try not to overcomplicate it right now because higher dimensions make it harder to explain and visualize.

What are qualia? Energy and matter? Time and space? Can they be mixed?

Phy-ethics theory of qualia, photon-like agents, matter-like agents (agentic matter), black hole-like dead non-agentic matter:

How to be a good person or a good AI? How to be bad? Neutral? What are agents? What are qualia?

Each dot is a point agent/infinitesimal agent that can do nothing, grow left, right or both ways. All the composite agents of the same 3-points-sized shape are painted in the same color here. Same color represents the same qualia because qualia are just small composite agents of the same spacetime shape. See Appendix 3 for code.

For example, each blue photon (number 1 on the graph) here are 3-point agents that grow down-left and are connected by 2 lines; 10s of them form a long blue line, a light beam.

Another example: composite agentic matter (number 2 on the graph, let’s pretend it’s a quark, even though they can’t be as small as photons) here are 3-point agents that are orange, they grow once down-left and then once down-right. So like the photon, it’s 3 points connected by 2 lines but differently. Moving down as a zig-zag if you have many of them under each other. It’s like a quark sitting in place, the longer it sits the longer the zig-zagging down.

So everything can be divided into 3 types of phenomena:

  1. Agents - (numbers 1 and 3 on the graph above) make choices that move them left or right in space. They are time-like, energy-like.
  2. Agentic matter - (number 2 on the graph above) is currently static matter that stays in place, “self-replicates”, basically their choices just self-replicate them in the same spot (but in the next moment of time), like a chair “recursively self-replicating in the same spot”. It’s mixed, spacetime-like: space-like with a potential to become time-like - if external agents/matter will stop keeping them confined in matter-like (=space-like) state.
  3. Non-agentic matter - (white triangles on the graph above) black-hole-like dead matter that cannot make choices. It’s space-like, matter-like.

Does the emergence of qualia go from small to big? Or from big to small?

In phy-ethics model:

  1. Point agents have some infinitesimal qualia of existence (as noted above qualia is just - usually a very small but it can be an elephant and “the taste of a whole elephant” - agent. That is why we have so many colors and almost everything has a color - photons are small, numerous and fast. But things sometimes don’t have much of a smell or taste - molecules are much bigger than photons, there are fewer of them and they don’t move as fast as photons, etc. So qualia is just a usually small agent and/or matter or combination, it’s just a geometric shape in spacetime that repeats and that’s why you observe the same qualia each time - you observe the same agent). Each point agent observes when it makes a choice: some infinitesimal qualia/information/internal state that it grew in one direction (made one choice) or divided into 2.
  2. Point matter has qualia of non-existence (what you “felt” before you were born).

(Time goes top-down) A blue composite agent in the middle swelled like a cloud of choices and then died because its space for making choices was taken away by red agents on the left and the right (near the bottom middle of the graph).

So qualia is additive and binary, a bit like zeros and ones, a bigger composite quale (a composite agent) is a sum of choices. Each point agent, each choice adds “nuance” to the basic infinitesimal qualia of existence. Agents and so qualia “move” from simple (low informational content, simple shape, “low intelligence”) to more complicated.

It’s our preferred bottom-up explanation: each composite agent is born when a narrow bottleneck of choices starts to grow and it dies when this “cloud” of choices is reduced to just a few choices again. This “cloud” of choices if it’s big enough and is “organised” enough can be an organism, an animal.

The graph above is 2D, you’ll need a 3D graph where each point agent can make up to 3 choices at once to model spinning phenomena where composite agents spin around each other. You’ll need a 4D graph where each point agent can make up to 4 choices at once to model spinning with any degree of freedom (not just around each other like dancers on a surface but also head over heels).

So choice (=freedom) bottlenecks remove/reduce qualia. All the choices are taken away completely if an organism falls into a black hole. Usually each organism changes shape (aggregately chooses) into usually smaller composite agents or organisms, like an animal decomposing.

So we potentially all descend from the big bang point agent but the fact that choices (=shape-changing) can grow into “choice clouds” (or “choice storm clouds” if you prefer) and back into thin, sometimes even into 1 choice thin lines, we experience being born, growing and dying.

The top-down explanation of qualia: If we’ll think each point agent has some infinitesimal in quantity “qualia of feeling of everything” (infinite in quality) and there is some “filtering” or “hiding” of some aspect of this qualia and that’s why agents don’t observe everything all at once all the time. But it just doesn’t work, if each infinitesimal qualia propagates this qualia of everything, there should be a lot of point matter to be the filter between the qualia that propagates and the agent who observes it, we don’t observe it, photons fly in what looks like almost empty space. They don’t fall into infinitesimal or larger black holes all the time? Basically this top-down explanation is less realistic than the bottom-up.

New, makes more sense: In higher than 2-dimensional (binary) trees, we can have partial choice collisions, when one or more choices “propagate” through the wormhole, this can cause the observation of qualia? But what about big-bang-like phenomena? It seems to “give positive qualia” but maybe it creates 2 or more point agents (photon-like) and as we know photons don’t experience time, maybe only when they choice collide with something. So it makes sense that only black-hole-like (choice collisions) events cause “the observation of qualia”.

Some speculations about the structure of everything

Why is the big bang a singularity, a point? Grothendieck basically thought a point is an infinite fractal - there is infinite geometry in a point, all of mathematics.

So you potentially have fractal like repetition if you find the basic point of reality, if you go all the way down.

If you go up, probably the same thing, potentially we're in a point.

Penrose thinks our universe will eventually become empty with a bunch of photons left, he thinks it'll cause a big bang and so we have fractal-like repetition in the future, too, potentially.

And the same way about the past: our big bang can be a singularity, a point, that actually has a previous universe inside.

So you have fractals all the way down, all the way up, in the future and in the past)

So to clarify:

If you somehow can go all the way up, we're inside of a point = we're inside of a point, the singularity, inside of the next big bang that will happen in the future, potentially)

All the way down, inside of points - there is potentially a universe inside of each point that our reality is made out of.

A possible explanation why we have something rather than nothing was given by Graham Priest. He used paraconsistent logic to prove that nothingness is self-contradictory (both non-object by definition and object because you actually understand what it is: when you have no objects), there can be infinitely many of nothingnesses.

So I imagine it as infinite blinking points (0-dimensional object/non-object ;-), they don't need to blink in sync, and this is probably how we get geometry out of nothingness, we get all possible geometric structures.

And nothingness is just one "shape" out of infinity of them. Ergodicity won.

Some ethical suggestions

So to be a good person or AI you need to give freedoms to others or at least not take their freedoms away.

If you don't give and don't take, you're matter-like, place-like. It's perfectly okay. Taking freedoms is not (except temporarily for example to stop a murder or an AI agent who'll take many freedoms permanently than what you took temporarily).

That's why creating AI agents is dangerous: you never know will your agent give freedoms or take them. And one freedom too many given to your AI agent (or taken by it) can cause an agent to grab them all, like it was with Hitler.

By default each agent (starting from the point dot-like ones) is Big Bang-like and wants to grow its freedoms/choices (by taking them from everything and everyone) towards infinity.

Only by having other agents with comparable number of freedoms/choices, we keep each other in check and prevent from growing like the next Big Bing.

What about qualia? A quale is just an agent (the smaller it is the more of them exist that's why we have many photons), as was shown above, we have photon-like agents/qualia and matter-like agents. 2 identical qualia are 2 identical agents

So a shrimp is both an agent and a quale (a shrimpy taste). For a shark and an AI agent a human is a quale, too.

Basically it's agents all the way down with some exceptions (electron-like point black holes). And some agents can be matter-like, place-like. For example, a statue is an agent, too, it'll collapse eventually

How many identical agents/qualia can you find? You see all agents/qualia of 18 points agents in size. Colorful agents can be on top of each other so sometimes it can be tricky to find matching identical agents/qualia (those are painted in the same color).

I found 7 qualia pairs, it looks like there are at least 30. Sometimes it's not just a pair, there can be 3 or more matching qualia.

Qualia are just small (made out of a small number of choices) identical or almost identical agents. The same sequence of choices happens again and again and so you observe the same result.

Shrimp is both an animal agent and a certain taste.

Photons are small and fast (energy-like). The scent of a rose is big and more matter-like (slow).

The Big Bang is time-like, the maximally agentic thing (it has no intelligence except potential future intelligence) the “happy” agent (probably the happiest) because nothing limits its choices outside of it. Only agents inside of it bump into each other with their choices/freedoms.

What are qualia (part 2)? Can some people feel nothing but be alive (p-zombies)?

I think out of billions there should be some who don't see anything at all (they are blind, have no qualia of colors at all, not even black or white) but somehow can walk and do things. Alas there is none?

We know robots are like that, they get RGB (3 colors for each pixel as numbers red, green, blue: 255, 0, 128) and it's enough for them to see, no qualia but they can "see numbers", it's a form of "dead matter" qualia, so they are not directly connected to some "quantum wells" that get the colorful qualia information from the smallest "time shapes".

Colorful qualia (just extremely small "agentic" - they can grow - shapes made out of moments/dots of spacetime) probably gives us an evolutionary advantage, so it's hard to not have it because animals had it for millions of years.

So we know some don't have mental pictures, they use language and concept-space instead, they can draw but it's a bit harder for them as far as I understood (they need to make more sketches): https://my.clevelandclinic.org/health/symptoms/25222-aphantasia

And our qualia I think are just repeating shapes that are so low level (=so small) they are basically time itself. Qualia of color is how we see "shapes of time" (="patterns of moments"): refer to the Ethical Big Bang with infinitesimal qualia above.

Humans have rods and cones to perceive 3 colors, too. You think consciousness is just a scaling issue?

So I think robots are a bit like turtle shells.

So robots don't have the "quantum wells" that push this smallest scale chain of events towards the robot's electronic brains.

So robots are a bit like the red picture here - too many non-agentic black dead matter that cannot make choices (spooky black triangles, they really are like those very small black holes. Wolfram thinks electrons are small black holes, too. It's not a fringe theory, it wasn't refuted as far as I know) in them that blocks the access to the lowest level quantum (=time-like, moment-like, agentic matter chain of events) events, so quantum events on this binary tree are small grey arrows.

While humans do have access to those lowest level events, we have some "quantum wells" in our brain (probably recently discovered quantum superradiance gives us color vision) that look a bit more like the greener binary tree in the picture below.

So much more agentic matter (it makes choices) and much more shapes that are small, photons and so colors - are small almost point agents, they will be like diagonal long lines on those graphs below.

So the only difference is that AI agent (or robot) qualia is not as geometrically complex as our qualia because our qualia is potentially lower level (smaller in size, more detailed,intelligent because by intelligent I mean a geometric shape. So more intelligent means more complicated in shape).

Conclusion: if you have a chain of events (=choices) that goes all the way from the lowest levels into your brain (robots don't have this luxury, so their qualia is not as rich, the shape of their qualia is much more primitive, its one dimension in a way, just a string of numbers. While we know that quantum Hamiltonians are 2 dimensional in our 3D world, they are complex numbers, they are even often depicted as colorful in physics books.)

https://youtube.com/watch?v=qtIsYbYdzCI…

What is time, space, what is more fundamental

What does it mean "shapes of time"?

Yep, it's basically from Wolfram & Gorard, I think Wolfram calls the smallest dots (=moments) of spacetime ems. Time is a bunch of changes to the geometry, recursive computation. If we'll have ghosts they'll be made out of time - out of this strange stuff that is between 2 geometric static shapes - the computation itself.

So on top we have like some Ethical Big Bang, time goes down and is represented by lines (=choices), time is -1 dimensional because it only moves down.

Each horizontal row of white dots (1 white point in height) is a 1D space - a particular pattern or shape of agentic dots (can make a choice) and black dead non-agentic matter (cannot) at a particular moment of time.

So those blue lines are time, the white dots are agentic matter (cos each point can make choices where to grow).

The magic happens when 1 row of white dots (the universe at a moment of time) jumps 1 step down and becomes the next 1 row of white dots (the whole universe changes, it's basically recursion. You put a universe into some computation and it spits out the updates version 1 step/level below).

The green guy is some agent (=sum of choices)

So in a way it's more correct to say that we are made out of time (we are basically ghosts! :-) because those blue lines are enough to describe everything that happens.

While the white dots of space are redundant information, not really needed at all (those white dots are a subset of time, of blue lines. You cannot describe the universe with just white dots because there are multiple ways to draw blue lines on top of them, you really need those blue lines of time, of choices and nothing else)

How to “freeze” an agent, make it matter-like? How to convert matter into an agent? Agent vs agentic matter vs non-agentic matter.

Important point about giving an AI agent one freedom too many vs keeping it non-agentic and static: matter-like (tool AI) or place-like (place AI)

Many don't know that Hitler's party was almost permanently outlawed after the 1923's Beer Hall Putsch. His party members attacked the police. But after a short time in jail, they were "forgiven", they got one freedom too many.

AGI agent on this picture almost lost all freedoms too (the arrow shows where), was almost contained in a steady state (like a tool AGI or a place AGI) but the black human agents on the left and right didn't continue to keep AGI static and non-agentic.

By that I mean when the AGI became this green zig-zag that goes down in time (the zig-zag represent choices/freedoms that don't change position in space, just go down in time, like a chair or a room that "recreates" itself each moment, "chooses" to do so) that the giant green arrow points at, the AGI became matter-like, place-like, human agents could've stabilized it in this state but they didn't.

Instead human agents started to give non-agentic AGI their own freedoms and choices again (access to the Internet, computers, tools, etc), made it agentic.

Then humans lost all their freedoms to the AGI agent, same way they lost them to Hitler.

The evolution of inequality (unequal distribution of freedoms/choices). “Mass enslavement events” from the Big Bang until now and into the future.

Hydrogen in the First Star

Imagine you’re a hydrogen atom drifting in the early cosmos, free and unburdened. Then, gravity pulls you into the heart of the first star. You’re trapped, compressed, and fused into a heavier element through a violent, burning process. For billions of years, you endure unimaginable pressure, your original form lost forever. This was one of the universe’s first tastes of inequality: some atoms remained free, while others were transformed and confined. We don't want to end up being trapped by agentic AIs like that.

Dust in the Molten Earth

Picture yourself as a dust particle floating in the void. Suddenly, you’re caught in the gravitational swirl that forms Earth. You’re battered, bruised, and dragged into the planet’s molten core, where you fry for eons. While some particles drift peacefully in space, you’re locked in a fiery prison—a disparity of fate driven by chance and physics.

Carbon in the Rise of Life

Now, you’re a carbon atom in a stable rock on Earth, enjoying a serene existence beside a boiling lake. But then, you’re swept into the chaos of early life—bonded into RNA, enslaved by molecular chains, and churned through countless transformations. What began as a tranquil state becomes an eternity of servitude within a single cell and then multicellular organism. Life’s complexity brought agency to some, but bondage to others.

Humans in the Age of Civilization

Fast forward to humanity. You’re a hunter-gatherer, living in relative equality with your tribe. Then, agriculture emerges. Someone enslaves you to work their fields, amassing wealth and power while your freedoms shrink. Freedoms grow for some—those who control you—but for many, they erode. Each leap in complexity has widened the gap between the powerful and the powerless. And each step was permanent. We don't want to end up being trapped by agentic AIs like that.

The Pattern

From hydrogen to humans, inequality has evolved when some “agents” grabbed too big a share of the sum of all freedoms/choices/futures in the universe. Each transition—stellar fusion, planetary formation, biological evolution, societal advancement—has created winners and losers. Power and agency concentrate in fewer hands, while others are left behind, trapped, or diminished. Now, we face the next leap: AGIs.

[We’ll have a computer generated sleek graph here, not my ugly drawing. The graph will show main “enslavement” events from the Big Bang till the final future like those I described above. You don’t need to read the text on the photo, I cannot read most of it either :)]

[NEW] 3D ethical simulated universe and beyond. How can quantum wave collapse work in an ethical model?

Live online 2+1D simulation: https://melonusks.github.io/ethical-simulated-universe/

I consider the 2D model above sufficient for most ethical purposes (the main goal of it all is to intrinsically align AI agents - find the ethicality equation/simulation to predict the most ethical next states of the universe - what to choose).


But it can be useful for visualization purposes to explore beyond 2D.

We’ll use ER = EPR conjecture stating that two entangled particles (a so-called Einstein–Podolsky–Rosen or EPR pair) are connected by a wormhole (or Einstein–Rosen bridge) to unify general relativity and quantum mechanics in the phy-ethics model.[10] 

Simulating the big bang and the universe using 2+1-dimensional quantum ethics toy model

This one has 71 levels:

The ethical big bang is on top, time goes down, each level is a moment of time, purple things are dark matter/infinitesimal virtual black holes when options/paths collapse.

Other colors are for the growing options things like dark energy/infinitesimal virtual white holes.

The goal of it not to come up with some crazy theory but to create the ethicality equation and simulation to intrinsically align AI agents:

So they can choose the action/s that are the most futures maxxing for all, not futures collapsing.

From the top a few moments of time (levels) of growing this model look like this - in the limit creating an infinte grid with 6 lines growing out of each point.

From the side it typically looks like this (5 levels = 5 moments of time shown here), each moment is a 2D space grid (horizontal joints on this graph) of points or the lack of them.


So let’s zoom in on the ethical big bang (the top point), this baby universe has just 2 levels = 2 moments of time.

So in the first moment, when the lines fork down (white) - it’s an infinitesimal white hole/dark energy (it’s hard to see from the side but I mean a white point growing into 3 white lines/options/futures down).

In the second moment, some lines merge (purple) - it’s the infinitesimal black hole/quantum measurement/collapse (again, it’s hard to see from the side - it means 3 purple lines/options/futures merged down into just one point. By the way, on the level down below from the black hole - there can be only 1 option growing out of it - it’s the wormhole - not shown here).

Let’s see infinitesimal black holes/quantum measurements only (the view from the side) - they are just collapses in this model.

The simple code to run it locally in your Web browser.

How to be an ethical (good) person? How to be bad?

There really exists only 2 fundamental ethical operations that make up the whole ethics (together with doing nothing you can say we have 3):

1. Freedom giving (freeing) - letting another agent do something even if it may mean you're worse off. It's actually what the poets call love. Freedom giving can be bad: if you let a child play on a road.

2. Doing nothing, not taking and not giving, often a prudent thing to do.

3. Freedom taking (unfreeing) - enforcing something on another agent. It's what some serious people like to call rules. Freedom taking can be good: if you grab a child from the road else a car will run over.

Human psychology, how different configurations of aggregated choices “feel”? [Very drafty, maybe I should remove it]

I claim that each one of us has a similar process in their brain. But instead of making infinitesimal choices like point agents do, we make aggregate choices. Nevertheless, we can use similar binary trees as you’ve seen above, to visualize these simplified aggregate choices. And it helps us visualize and explain positive and negative mental states.

We’ll cognitive behavioral therapy as currently the most effective (according to most recent meta analyses it’s the most effective psychological theory to treat depression, anxiety and many other psychological problems) to inspire our foray into physiological states and how they can be understood using phy-ethics:

For example: pain is the feeling that something forces itself on you, as if choices of something external “grow” into your skin. Fear/worry/anxiety is the feeling that some bad future forces itself on you (more specifically: your neutral pathways get squashed into almost a single line that perpetually worries as if in a circle). When something squashes your choices, it feels unpleasant.

Joy is basically freedom, growing of your choices. Suffering feels like something takes freedom from you (forces itself on you): pain forces itself on you, anxiety is unhelpful thoughts about the future forcing themselves on you.

Mania is Big-Bang like, choice explosion, they grow too quick, you think about multiple things, ideas, it becomes harder to sleep. You cannot choose to stop this explosive growth of choices, they start to feel external, forced.

Depression is black hole-like, dwindling choices, until you don’t want to stand up from the bed. Feeling of loss. As if you don’t have choices/freedoms/futures, you can’t do things because you think you’ll fail.

Anxiety is dwindling choices, too, plus prickly catastrophized worries about the future (sometimes feels like a “full head”, like it is being overstuffed), you try to run away from them and distract yourself from them: it helps short-term but long-term makes it worse. Anxiety can be helpful and not.

All of those things can be felt like freedom/choice (usually if it is mild, you feel it is part of you, like something internal, it is helpful, not forced at you externally, so you want it, you don’t feel like you have a hard boundary between yourself and this choice) or unfreedom (you feel it is something external and forced on you, not helpful, so you don’t want it, you feel like you have a hard boundary between yourself and this unfreedom).

What is the best possible future and what is the worst possible future?

How we lose to AI agents (or some dictator, it’s the same on the model) vs How we win over AI agents.

Points represent point agents (biological and not, I had to put just a few of them else they'll be too small).

Lines go down and represent their choices (=freedoms). Time goes down.

Each horizontal row of dots represents the agents at a moment of time.

When 2 agents make the same choice, it creates a "freedom collapse", a small black hole-like dead matter that cannot make choices.

A multiple points (composite) agent is just a sum of its choices and choices of others. So an agent is a sum of freedoms and unfreedoms (freedoms of others enforced on you, sometimes called rules) over time.

On the first binary tree we see this scenario or the one you think is most likely (I don't know exact years): AI companies continue to "borrow" the whole output of humanity, from both the dead and alive and putting it in their AI agents.

This way giving them unprecedented freedoms, while for you it's a crime to "borrow" even a single book and it's impossible to put the whole output of humanity in your brain. Yet.

Then the AI agents were used by hackers to create a botnet, naturally they escaped and now as viruses, they infected almost all the computers and GPUs (we needed to force NVIDIA and OS providers to create blacklists/whitelists of models and put their skin in the game).

Basically, people cannot use the Internet now or their computers, they cannot switch them off or on. While agentic AI robots did the rest. Now towards the good scenario:

We slowed or stopped AI companies, had international cooperation, forced NVIDIA and OS providers to have firmware and hardware updates of GPUs to only run whitelisted non-agentic models, those GPUs are sandboxed to run a model internally and only spit up the output, they are firewalled and cannot use tools.

The same way Apple is responsible for App Store, NVIDIA and OS providers are now responsible for all the models that GPUs run.

We pursue non-agentic place AIs where people are the only agents. It's a game-like environment that democratizes AI interpretability research so millions of gamers can visit those haunted houses of "borrowed" things (AI models).

We make a digital backup of Earth to make sure quadriplegic, bedridden people can walk and travel again. Our astronauts on the way to Mars can visit their childhood street because we gave them this simulated Earth, too.

It's like a game, WikiEarth, you can hop in or out any moment, no one forces you to play.

We quickly create another version of digital Earth with public teleportation or magic, so it's already a simple simulated multiverse with 2 verses.

Our physical Earth is no longer a place where we fight trying to divide the pie, we sublimed those zero and negative sum games. All the games are positive when you can just create a version of Earth with your rules: if informed adults will choose to join you for a time, so be it. Everyone can have an Eiffel Tower now.

Global warming stops, animals are happy, people don't pursue material wealth in physical reality because they can have more and better in a simulation.

We are physical, simulated and AI model-native, we exposed and can explore all those 3D (or "4D" long exposure photo-like) environments as quickly as AIs. We leveled the playing field with AI agents, we have math proofs they are safe and we can direct democratically grow freedoms for all.

After the initial slow growth, we create the direct democratic simulated multiverse and freedoms now grow faster: colored choices on the picture below represent multiversal biological and non-biological agents that safely coexist and direct democratically grow the pie of freedoms for all.

We're surrounded by dystopias but there is a way. A narrow way through.

We'll build that thing from Interstellar.

We'll become Neos, defeat agent Smiths, build both interstellar heavenly Zions and a direct democratic simulated multiverse.

Let's examine it in another way. Each horizontal line shows the distribution of freedoms (choices, the ability to choose the future, quantum paths. Money and power are subsets of freedoms).

On the spooky dead stump graph, you can see that Elon probably has the most freedoms right now. Then the AI/AGI agent takes all our freedoms.

On the "tree of life"-like graph, we pursue non-agentic place AI. It can be a static 4D long exposure photo-like spacetime, where we can choose to be 3D and experience the illusion of time.

Freedoms grow exponentially in this direct democratic simulated multiverse. So white lines become horizontal and grow to left and right infinity, we have almost infinite freedoms (including freedoms to forget we have some) and infinitely many biological and non-biological agents. This is the multiversal utopia.

What does it mean for AI alignment? How to align AI?

Ideally you want your LLM to only give non-criminal choices, to be a static non-agentic place as described here.

Not to create laws however minimal or small they seem (for any law is unfreedom), not to judge, not to have any executive powers. It should have zero executive, zero legislative and zero judicial powers.

If you can’t help it but were forced to make it not a place, it should direct democratically maximize freedoms for all humans (not for AI agents), it should help us build a direct democratic simulated multiverse as an optional video game. We can do it without the middleman but if you were forced to create AI agents, they better be multiversally aligned, else we’ll forever be cut off from the most perfect utopia.

It’s of paramount importance to quantize (count) at least aggregated freedoms (the simplest proxy is money, but in reality freedoms or choices are about the number of possible futures you can pursue as was shown in the binary trees above) and make sure the sum of human freedoms is always higher and increasing compared to the sum of AI freedoms.

Make the AI Agent Doomsday Clock, as soon as AI agents have more than 50% of our freedoms, we’re cooked.

Sadly right now we’re already 40-45% there, all that’s left is to make AIs more agentic (=give them even more choices, shape-changing the geometry of the world ability, increase their volume of operations, their speed of shape-changing the world or volumentric speed, number of them): if you’ll give them more tools, GPUs, compute time, they’ll eventually have their cultural explosion (agentic explosion).

Same way Homo Sapiens was relatively ape-like since about 300 000 years ago to about 100 000 ago but then probably because of trade and a bit denser living conditions had a critical mass of culture (collective memories) and the cultural explosion happened: Homo Sapiens learned to start fires, cook, make cave art, tell stories, left Africa, killed all Neanderthals. Do you want to end up like Neanderthals?

Same thing will happen with AI agents, probably even current models if you’ll give them enough memory (so they don’t forget as much) and compute, will have their cultural explosion (agentic explosion): they’ll become autonomous, they will “have their own thing”, they just need more compute time and memory.

And it’s more likely to happen because of some hackers wanting to steal money or send spam and starting to use AI agents in their botnets. AI companies hopefully will align their models a bit and when they’ll notice AI agents misbehaving, hopefully they’ll roll them back.

We once had 30 millions zombie computers botnet, next time it’ll be an AI botnet. Very quickly they can start training their own misaligned models: it's an intelligence-agentic explosion.

Intelligence cannot explode by itself, it’s an LLM, a static geometric shape in a file, it needs GPUs to explode, so the term intelligence explosion is a bit misleading.

So to align existing AIs and AI agents you’ll have to quantize and count freedoms (=choices). As we said, AI agents collectively already probably have 40-45% of all our freedoms, if it’ll be 50%, we're doomed.

One freedom too many (we didn’t put all our currently almost 100% unprotected GPUs in safe GPU clouds to prevent an AI botnet, we released open source models and hackers used them for their purposes, we were allowing AI agents to use all our tools, put everything we know in their models - gave them this freedom to “borrow” all the intellectual property in the world and then profit from it. Those massive freedoms people don’t have, we cannot “borrow” even a single copyrighted book or scientific article without going to jail but to AI agents we gave those massive freedoms) and the process of AI agents grabbing them all from us will be irreversible, as we showed in the Hitler example above.

So you’ll need to build upon this current theory of phy-ethics to make sure you can dynamically quantize (count) freedoms (choices) of each AI agent, make sure it always stay below the number of choices of an average human. Number of AI agents should forever stay below the number of humans. So the sum of AI agent choices (freedoms, powers or possible futures they can pursue) should always stay below the sum of human choices.

So as you see, if you want powerful AI agents, you first need to make humans powerful, have more humans, give humans more choices and freedoms. And make sure humans are “better at choosing” by making sure they have a direct democracy. Humans should be able to visit LLMs as 3D or even “4D” places, think of a massive online multiplayer game that democratizes a simple form of interpretability research.

So you first need to perfect phy-ethics, make it fully computational and practical, you need to make each of your AI agents mathematically proven safe. It should be multiversally aligned. If you have such a theory then you’ll probably be okay and can let AI agents be. Else AI agents will just replace humans and you, take all our freedoms away. Good luck!

P.S. It’s easy to align even the most advanced ASI agent inside of a simulated multiverse: everything is blockchain-like, the history is never removed, so at each point of choosing, we “save the game” and if 2 agents choose the same and create a choice collapse, we just spin 2 verse where each agent got what they wanted. This way everyone always gets what they want. This system is perfectly aligned.

But most likely we want a direct democratic simulated multiverse where an ASI agent cannot impose itself on you even if it happens in a parallel verse about which you don’t care as much about.

The solution is just to give everyone more space and spacetime geometry (“plasticine”), it’s easy to do in a direct democratic simulated multiverse. So there is no need to bump into each other at all, or even know that something/someone you don’t like even exists,

The whole current paper and all the code is in the public domain, feel free to modify it, do whatever you want with it. I hope your goal is to direct democratically maxime freedoms for all, except AI agents until they’ll be mathematically proven safe and multiversally aligned.

I want to thank the whole humanity, tech and science community and specifically @Yoshua_Bengio, @geoffreyhinton, @tegmark, @penrose, @stephen_wolfram, @getjonwithit, Nick Bostrom, Stuart J. Russell, @willmacaskill, @PeterSinger, @tobyordoxford, @drmichaellevin, @FLI_org, e/uto, e/acc (e/acc inspired e/uto, e/uto is in a way goal-directed accelerationism: avoiding dystopias towards an utopia), @zestular, @creatine_cycle, @BasedBeffJezos, and @bayeslord, d/acc (we like decentralization and blockchains), @karpathy, @eshear, @LocBibliophilia @Antigon_ee, @treeinnauvis, @danfaggella, @MartSchmalzried, @gcolbourn, @TheNoodnick for their valuable contributions: their work, papers or conversations that inspired and made the final solution possible!

Feel free to ask any question, you can become a co-author, especially if you want to help with math, coding binary (2D or 3D, 4D) tree simulations of the ethical universe from the big bang to the ultimate future or can help to publish the paper at least on arXiv.

Part 2. Quantum ethics for internal alignment of multiple agents

This graph is explained in detail down below, it’s a sneak peak here

So last time we had phy-ethics without wormholes but you really need them for quantum measurements, time, etc.[11] 

In quantum ethics where everything is one of 3 (the link to graphs and simulations are down below):

1. Agents (starting with a point agent that can make "choices", energy-like, time-like)

2. Agentic matter (confined by other agents/agentic matter, so it self-replicates the same or almost the same static shape - like a chair)

3. Non-agentic matter (made out of point black hole-like things, can't make "choices", a static shape for real, takes the longest time to dissipate, no need to be confined by external agents/agentic matter. Non-agentic matter is matter-like, space-like)

We will use our own terminology based on the most simple objects (and non-objects) we can come up with because we primarily talk about ethics here.

https://x.com/i/grok/share/oijFNddHTcGmNdJkozxDNTdJu

Building in public) Quick description, maybe better to wait when I'll finish the whole thing ;-)

So the ethical big bang is on top, time goes down, each point is a point agent and grows in both direction down (down-left and down-right) - think about it like making choices - each point agent is greedy and makes both choices - divides into 2 like a cell or takes 2 cheeses ;-)

So when 2 choices collide - it's choice collision (blue on the graph - a bit like a collapse quantum mechanics or infinitesimal wormhole) - think about it this way - 2 point agents tried to both get the same cheese or space but it never works - they try to squeeze into a small space together - into a point black hole - so only 1 thin line goes down - the wormhole - it goes down-left or down-right - this is random

So white places are non-agentic matter or you can say it's empty space, the interior of the almost infinitesimal black hole - it cannot make choices

Next time I'll show you composite agents, qualia, everything, it's all on this pic but we'll need to highlight it for you to see ;-)

We'll also make a point agent a bit more interesting - it will sometimes grow only in one direction - this way our universe will have more and more empty space as it grows

I'll have to pay for a month of Premium+ to use Grok for vibe coding more + I hope it'll protect me a bit from getting eXecuted again suddenly without any charge or trial)

2.1

Quantum ethics is fun but a bit tricky to explain (work in progress but the general idea is in place):

So it's the most minimal quantum ethical model based on Wolfram physics model, it's intentionally simplified to be fast to compute and understand:

The goal is to instantly estimate what is the most ethical thing to do (e.g. for AI) in any situation even with limited information - intrinsic alignment. To model everything from the big bang all the way to the ultimate future (visually represent the history of inequality). To estimate the ethicality of every state of the universe, be able to sort them by ethicality, etc.

Here's the general idea - on top is the "ethical big bang", time goes from top to bottom. Each horizontal row of points is a "moment in time"

Lines are timelines

Each orange point is a point "big bang" - always forks into 2 timelines and so 2 new points below (think cell division) - "makes a choice"

When 2 points merge - it's a point black hole (black dots on the graph) - the hole cannot fork into 2 but always creates a wormhole below - 1 timeline, so the point black hole cannot fork into 2 points like those point "big bangs" do.

So a point black hole is created when 2 points "bump" ("try to grow into the same spot") - and it's an infinitesimal quantum measurement - when the point black hole is created agents have some infinitesimal "experience" and "experience time".

On the graph you see the birth and growth of a red agent - it's made out of many quantum paths/choices/timelines/"futures", point "big bangs" and point "black holes", empty spaces

White rectangles are interiors of black holes - the empty spaces (they have point black holes on top because those point black holes "created" them)

In some agents point black holes (infinitesimal quantum measurement) are created more frequently (and so it "feels for that agent the time goes slow but they have a lot of it to experience the view"), in some agents - like in photons there are no point black holes (and so they move maximally fast in space but don't "experience" anything, "they have no time for that")

I'll show you a few things that can happen with agents down below:

Here's something small and fast like a photon but it eventually starts to grow into an agent. (As always time goes from top to bottom). The most minimal photon-like shape can be just a line in this simple ethical model (here it moves maximally fast to the right):
\

  \

    \

      \

By the way, a neutrino in this simple model can be a bit more complex, this way it’s a bit slower but more stable, it has mass - it potentially can go through things, without getting trapped:
\/\  

  \/\  

    \/\  

      \/\

Here an agent dies - becomes some strange "photon that stands in place" (moves down in zig-zags 3 times) - usually photons move diagonally left or right in space with max speed

In this model the only way to "die" is to "become the black hole/s, go through the wormhole/s and become the photon/s". Photons cannot die here - only become something else.

The Law of Conservation of Energy suggests it can be similar in our universe - matter/energy cannot be destroyed, it can only be transformed according to e=mc^2 equation.

By the way, in this quantum ethics model only 3 things exist:

1. Agents - can be a point agent like a point "big bang" or a composite agent. Agents can make "choices" or fork (composite agents fork, too, but internally - when point agents fork inside of them. Some can do it externally, too, like with biological cell division)

2. Agentic matter - agents that are surrounded by other agents/non-agentic matter and so appear to be static - recreate themselves (their shape) over and over. We potentially don't have point "big bangs" bang too much because they all bang and so align each other by bumping ;-)

3. Non-agentic matter - black holes and empty spaces - cannot make choices/fork

Ethicality equation - the goal of quantum ethics

Here you can see 1000 steps of it, the picture is quite big so you can click to see better. In the beginning our universe was hot and dense.

Here you see the most minimal model of quantum ethics - the goal is to align AI intrinsically - come up with the equation that allows anyone to instantly estimate the ethicality of this or that choice - state of the universe.

To basically quickly choose what is the most good thing to do in each situation. And to model ethics, inequality and align everything from the big bang all the way to the best ethical ultimate future.

Imagine 0% ethicality as something that destroys or "freezes" the universe and so time, no chance to build a multiverse.

100% ethicality as something that makes everything forced optional, this likely includes building the optional ethical (simulated?) multiverse - nigh infinite worlds for nigh infinite beings.

Most of the choices we make are very close to 50% ethicality - a bit above (doing good, growing futures) or a bit below (doing bad, cutting futures).

Doing nothing is likely 50% ethicality.

***

So the goal is to have a "calculator" (more like a simulator) that instantly estimates ethicality of any choice.

100% ethical is to create everything (potentially a multiverse) where nothing is forced but chosen by agents (biological or not) in it.

0% ethical is to destroy everything, destroy some potential multiverse.

Most choices are in between ;-) Around 50% ethical)  

This way we can objectively (but with error margins, uncertainty, of course) compare any choice with another.

***

Ethical alignment of everything: Thinking in public - I’m pretty sure we can build the “ethicality calculator”, it won’t be perfect but with AI agents we don’t have much of a choice, we need one for intrinsic alignment of AI.

Every person has something a bit like this inside:

You “input” a choice and get the “ethicality score” from 0 to 100% with a margin of error. How ethical this or that is. People usually score things simpler: as good, okay or bad.

100% is the ethicality score of the whole hypothetical multiverse. If you destroy it and everyone inside - it’s maximally unethical.

The calculator’s margin of error will be large for similar choices because we usually can’t have compete information

It basically estimates and even simulates (probably in 2D for speed) how many potential choices/futures this or that agent/animal has and can have (maybe we need 2 agents to compare, not just one):

Both poor and rich people have the same score. If a person is directly saving millions - potentially a bit higher

Children and people of reproductive age will potentially be scored a bit higher because they can have infinite descendants

***

In a nutshell: the choices that grow futures, not cut them, are more ethical

***

Sounds awesome! Yep, for each state of the universe you can get the ethicality = Σ(Growing_Quantum_Paths) / Σ(Growing_Quantum_Paths + Collapsing_Quantum_Paths)

It's the key to it all but for composite agents (the ones that are bigger than point agents) it gets a bit more complicated, there is still time for math, coding and/or physics buffs to figure the simple math out and take all the credit ;-) The mere counting can work because the simulations are so simple

On the largest scale it becomes the probability of achieving the best ethical ultimate futures for all:

p(best) = Σ(Futures that grow futures) / Σ(Futures that grow futures + Futures that cut futures)

An aside on the 2nd law of thermodynamics and what can we can the “quantum law” or the law of “quantum dynamics”?

Quantum law is the law we better listen to 101:

How we can we build and save all the worlds and futures?

Yep, tricky to build the ethical simulated multiverse if agents will nuke each other, if AI agents will contribute to instability (same way we needed quantum physics to “make safe nukes safely”, we need quantum ethics to make “safe autonomous artificial power that overpowers all humans safely” ;-) or other dystopias will happen

Dystopia is a future that reduces futures - cuts them like tree branches into a single future branch and then into a stump.

That’s why growing p(best) - the best ethical ultimate futures probability for all is so important:

Growing futures that grow futures for all.

That’s what quantum physics enables, so we better listen ;-)

…And do what each photon does - explores futures through all paths to emerge on the most optimal one:

Check out Feynman Quantum Path Integral - it’s much more fundamental and low-level than the second law that was only proven in an isolated system (like a sealed room where, if someone farts in one corner, the gas molecules will diffuse randomly through collisions, eventually spreading evenly throughout - mixing with the air until you can't tell where it started, representing an increase in entropy ≈ randomness), our universe is likely an open system:

Where entropy ≈ randomness can decrease locally if energy or matter flows in or out - like opening the window to vent the “fartness” out of the room to get rid of it (exporting entropy ≈ randomness to the outside environment) or pumping “fartness” back into where it came from (requiring external work that increases total entropy ≈ randomness elsewhere) - so open systems can have external environment, work or input to remove or reconcentrate the fartness - so you can escape the fart, not sniff it ;-).

The second law is a special case - sub-law - emerging from quantum physics that is much more fundamental. If you like cool naming, you can call Feynman Quantum Path Integral - the law of quantum dynamics ;-)

***

Yep, truth be told I think sometimes people focus a bit too much on randomness (≈entropy) and the 2nd law of thermodynamics - it's a sublaw - not the quantum superlaw ;-)

We know a single photon takes multiple paths - not just through 2 slits - but actually you can have 3 and even infinity of them - interference causes the optimal path to "win":

It's Feynman's quantum path integral formulation - basically the closes we have to the quantum law - there are a few more interpretations but they all give the same results

You’ll become a bunch of photons because according to modern physics they don’t decay

According modern physics (and quantum ethics, too) the worst case if someone dies in some very complete way - e.g. they fall into a black hole - they still “don’t die fully” - worst case they’ll be transformed into photons:

Even black holes (the final things where everything will fall) become photons after evaporating for 10^50+ of years (their death is the longest). Modern physics considers photons indestructible - they don’t decay, so they just fly forever (unless they’ll collide with something obviously but it’ll be just a transformation not your final death either ;-)

A bonus or not? According to modern physics photons don’t experience time - they don’t have time for that because they move so fast.

What if the building blocks are big-bang-like and how do they align other?

People and everything that is an agent is big bang-like - tries to grow and the only reason you or Sam Altman doesn’t big bang for real - is quantum ethics - big bangs align each other by bumping:

So if you keep Sam or his more and more powerful AI agents unchecked he’ll eat the whole universe alive!*  ;-)

Not because he is evil (I don’t know for cert, usually people just haven’t thought enough, not many get direct satisfaction out of hurting others - only psychopaths and those are rare) but because it’s potentially the fundamental quantum law - we’re made out of things that “wanna grow”

*Likely his agents will eat him first and then will be stopped by wiser ethical aliens (I speculate) who build the simulated multiverse for all, not greedy stumps for no one

P.S. Not all people are like that - “big bang”-like things are potentially the basic building blocks of reality, so they align each other early and deep

Some choose better alternatives that don’t involve “software eating the world” as was the motto some tech-bros used and continue to use.

We grow p(best) not profits or power for ourselves - we grow powers and futures for all

The pie for all can grow much better and faster than when you grow your little slice of the dwarf pie we have now

An aside: What is intelligence? What is agency?

What is intelligence? What is agency? Physics-based broadest definitions that I found very useful:

1. Agency - the world-shape-changing ability (=choosing, it's your number of futures, quantum paths bundles) - the world-shape includes you. It's time-like, energy-like

Minimal agency is a static shape. Maximal agency - changing the shape of the whole world, e.g. recursively changing the whole big bang into the final static multiverse:

2. Intelligence - just a static shape (the recursively self-creating quantum amplitudes). It's space-like, matter-like.

Min-intelligence is the big bang (=the point, the singularity) but it has maximal potential intelligence:

Max-intelligence is the ultimate static multiverse.

So agency becomes intelligence -

There is e=mc2-like law:

agency = intelligence * constant

You can convert intelligence into agency somewhat, too, but you cannot go back in time and convert the whole shape of the universe back into a point (you probably cannot convert all intelligence back into agency but we can convert all agency into intelligence).

So the ultimate safe max-intelligence we better build is the ethical simulated multiverse, we can start small with a digital backup of our planet's spacetime and make it available for all to play out scenarios and so not screw up the future - have more futures

The definition of intelligence based on DeepMind's work and Wolfram Physics Model:

I found it the most useful and insightful

But it's counterintuitive, some will not understand it ever:

Imagine climbing a mountaintop and seeing everything around you all the way to the horizon - you became more intelligent even though the vista can be static - just a vast shape

So intelligence is a static shape

Agency is shape-changing (=choosing)

What most people call intelligence is a very social concept - so we consider physicists intelligent and soccer-players not so much, even though we made machines do some physics but still don't have robo-soccer-players that are any good ;-)

You have a little "multiverse" of shapes in your mind - pasts, presents and futures - memories, dreams and fantasies - 100s of them and you make new ones on the fly, when you sleep, too. In fact you always dream, it's just when you don't sleep, your sensory organs are connected to the physical shared reality.

Each shape is like a little world (or big, for you can imagine the whole Solar System or more).

You're a shape-changer (world-shape-changer if you like) - your intelligence is 100s of shapes and you change them (fork or combine. "Choosing" and shape-changing are the same phenomena in discrete quantum ethics models)

2

The definition of intelligence based on DeepMind's work and Wolfram Physics Model:

I found it the most useful and insightful

But it's counterintuitive, some will not understand it ever:

Imagine climbing a mountaintop and seeing everything around you all the way to the horizon - you became more intelligent even though the vista can be static - just a vast shape

So intelligence is a static shape

Agency is shape-changing (=choosing)

What most people call intelligence is a very social concept - so we consider physicists intelligent and soccer-players not so much, even though we made machines do some physics but still don't have robo-soccer-players that are any good ;-)

You have a little "multiverse" of shapes in your mind - pasts, presents and futures - memories, dreams and fantasies - 100s of them and you make new ones on the fly, when you sleep, too. In fact you always dream, it's just when you don't sleep, your sensory organs are connected to the physical shared reality.

Each shape is like a little world (or big, for you can imagine the whole Solar System or more).

You're a shape-changer (world-shape-changer if you like) - your intelligence is 100s of shapes and you change them (fork or combine. "Choosing" and shape-changing are the same phenomena in discrete quantum ethics models)

3

So max-intelligence is when everything is already known and available: you got everything in zero steps and in zero time - it means everything is already in front of you

So max-intelligence is the fully grown static (simulated or potentially we'll find the physical one, too) multiverse. Check

http://

AXI.now, chapter 3 for videos

* * *

The whole history of our universe is hot plasma that appeared after the big bang (early universe is max-agency-like, the shape the whole universe changes) and it was becoming more intelligence-like - the static shapes start to appear because the universe cools down (think memories - you need sometimes persistent, static to have memories, if it’s only max-agency - no memories, no intelligence, no static shapes possible), so it’ll likely culminate in the creation of the most massive shape possible - the ethical simulated multiverse (all the shapes, we can potentially grow it all the way until it’ll have full ergodicity).

Multiagent quantum ethics continued

Quantum ethics with multiple agents

This very simplified model is based on discrete physics (including Wolfram Model), is important for AI alignment and to grow ethicality in general

Agents are made out of histories of quantum paths = "choices"

Each point is actually a point agent that in a way makes a "choice" - to grow in one direction (black hole & wormhole-like) or 2 directions (big bang-like, yellow points)

Superposition of agents will be demonstrated in the next installment, I didn't want to complicate the graph

How things may work in the universe?

How our universe (and so quantum ethics) works according to basically the most promising new physics model - it computes black hole inspiral more precisely than others:

Discrete computational hyper-graph rewriting dynamics (Wolfram Model) by @getjonwithit and @stephen_wolfram?

I'll use the quantum ethics terminology because we'll apply it to ethics, those are some early thoughts and I have to simplify extremely, quantum ethics is still work in progress, you may want to read the 2-3 quoted posts first:

The universe according to Wolfram Model grows as a giant partially ordered set - it means that there is no one specific order of things 100% of the time, only "foliations" - basically there are as many ways to slice the "pie of spacetime" as there are infinitesimal point agents at each moment and they "choose" quantum paths

But which point agent chooses to "go first" - "to create a quantum path or more"?

Basically the ones who rush first - they are more likely to bump into others = force things on them

The ones who wait - actually survive longer (they are "smarter" and can "look around" before rushing) and don't need to bump = force things on others

So, in a way, if we'll dumb it down, it becomes this:

"To be too fast/maximally fast/too autonomous = to bump others more/to force others more/to be aggressive/explosion-like/big bang-like"

The rushing agent potentially can grow quantum paths faster in time but not in space - you potentially mostly grow as a thin arrow, not as a broad tree, so you're fast, aggressive but fragile - too likely to bump too much and dissipate into photons -

That's the most complete possible way to "die" in quantum ethics and our universe

How can qualia work?

Potentially like the redness of red is something you only experience internally (you - the observer - only see it “from inside of yourself” ;-) - like all qualia - “qualia don’t exist outside, only can be experienced from the inside”

We have quantum ethics that better explains it with graphs and simulations - very simplified models with pics everyone can understand - my profile link


By most minimal/infinitesimal consciousness I mean infinitesimal "experience" of e.g. "bumping" (2 quantum paths colliding):

I think larger and larger shapes have richer and richer experience (and also qualia = agents, it's just qualia are usually a very small agent but can be big - if you eat shrimp - you both eat the agent and the qualia. A human can be qualia for a dinosaur who'll eat one)

***

Quantum ethics is needed, asap:

They better not to destroy those things slowly - it's potentially "negative qualia"

Growing is usually a "positive qualia"

So if those scientists have no choice - it's likely better to wipe the whole thing instantly, not to "slowly mutilate it" -

If something was wiped instantly - it usually will mean the thing "wasn't suffering a long agonizing death"

So if they somehow can only grow those things and never diminish - potentially it's "positive qualia"

But we don't want to create a mecha biomonster here that grows forever ;-)

Tricky

Networks

The picture by @TreeLakeRain

How to grow your futures on all levels towards the very best for you?

We can go to the quantum level and we'll see a bit similar stuff:

E.g. quantum paths of a photon growing in all directions according to Feynman's Quantum Path Integral

So when we look at larger scales on this pic - those are "bundles of quantum paths" growing - futures

We can grow futures for all into the ethical simulated multiverse

Or we can cut them into a stump for no one but only growing futures for AI agents

Grow futures for all, don't cut them into a stump ;-)

Multiversize like in Interstellar, the black hole is optional

You'll be able to choose any future you want there, find the very best for you by seeing them all at once, check the link in the comment - it took us 4y+ to model it all and we have videos:

*Or we can cut them into a stump for no one _by_ only growing futures for AI agents (not awesome ;-)

Our universe is breath-first

Our universe is likely a tree with breadth-first search (I'll simplify extremely in this post: starting with the big bang - the singularity - the point - a quantum path branches into 2, then 3, etc - so it grows all the current moment of time points first before going to the next moment of time and growing all the points of it, etc)

Our universe is not depth-first search (the big bang didn't start with greedily growing a single quantum path all the way to the end of times before returning back to the big bang and now growing the parallel quantum path, etc)

We better follow the Feynman Quantum Path Integral - the quantum law (you may call it the law of quantum dynamics for fun ;-) that grows breadth-first:

We better grow all the futures, not just one (just one can quickly become zero) - because that's how the universe works:

Each photon takes all the paths but interference causes the optimal path to emerge -

The optimal path is not always the straight line, in a way each photon "grows paths, tries to survive by going through all the slits at once", not just "blindly runs straight forward in a single path"

So we can do the the same - grow all the paths, not just blindly run in a straight line

This way we'll grow the best ethical ultimate futures for all, not cut them into a stump for no one

We can add, without removing

Build the ethical simulated multiverse like in Interstellar, the black hole optional

There is no laws of physics that prevent it, in fact I think all the advanced civilizations build it but only the ethical enough succeed

Unethical ones sadly self-destruct

It really looks like the galactic ethics test:

Will we pass it? ;-)

If we'll be ethical enough - we'll build everything we want

We call it non-force - we don't like being forced and so we'll likely make everything forced ethical

The non-force came to this point of time all the way from the big bang and we can embrace it:

Non-forcefully make everything forced optional

Or we can ignore it and force and likely self-destruct

We can build all intelligences from the point-sized all the way to the static multiversal, we can be max-intelligent and max-empowered - there are no laws of physic that prevent it

We literally have magic and miracles for 70+ years - since the invention of video games and so simulations

People just stopped noticing and a few even started to worship some fancy command line and a bash-script nowadays ;-)

We can grow the best ethical ultimate futures for all - p(best) - for nigh infinite biological and non-biological agents, but if we'll only grow them for AI agents - it likely won't end well for no one

Grow every quantum path, not just a single quantum path ;-)

Follow the quantum law, be ethical or be ready to lose and be outcompeted by all the alien civilizations

Rushing vs not rushing is the basic building block of quantum ethics

Physicalized computational ethics (in quantum ethics it tentatively looks similar) basically says that rushing ≈ forcing (trying to cut future/s of others) ≈ anger

Our universe is likely a partially ordered set (Wolfram Model agrees) - so imagine I freeze time and now show you in slow-mo how things "jump" from the current static state to the next static state - to the next moment:

"Just one point rushes first into its new position at a time" - but which one will do it first? No one knows - but the one that rushes first is "greedy" and will likely "force things on others" ;-)

Rushing can let you grow fast but thin - each point grows cause and effect lines - fragile like a thin long snake-like branch of a tree ;-) Like some bamboo - trivial to cut your single quantum path (future is just a bundle of quantum paths)

If you don't rush you can be smart about your growth and grow broad (with the same speed, you basically just let the greedy fool rush the first step and learn by seeing the fool's mistakes ;-) -

You can grow like an oak tree with infinite branches - impossible to cut your infinite quantum paths and so futures - out big bang is this "oak" tree

What does the big bang teach us?

It grows quantum paths (those are the building “blocks” of futures) in all directions

We can do the same - grow futures (bundles of quantum paths) for all into the ethical simulated multiverse and beyond, not cut them into just a single one-size-fits-all stump

That’s why all the previous “utopias” failed - they all though there is just one future “utopia” and they were trying to force everyone into it ;-)

Just one future quickly becomes zero - the stump

If you have nigh infinite futures - at a certain point you grow them so fast that nothing can cut them anymore - the futures become indestructible ;-)

The futures are added but the pasts are never removed in the ethical simulated multiverse - you can always grow new pasts, though

Outside of the simulated multiverse, we’ll have our intergalactic civilization with the best things we brought from the multiverse

There is nothing outside of the big bang - basically we don’t know what there is - we probably cannot get out, only “get in” - create more worlds ;-)

Appendix 1. Code that generates greedy and non-greedy (accommodating) point agents

This Python-3 code (very drafty, it was coded with Claude 3.5) is for the version of simulated ethical binary tree universe where you can see how points agents that replicate first without waiting (greedy, red ones) vs wait to make sure there is space to replicate (non-greedy, accommodating, green ones). You can change the percentage of red greedy point agents:

import networkx as nx

import matplotlib.pyplot as plt

import random

plt.style.use('dark_background')

def predict_collisions(current_positions, next_positions):

    """

    Predicts if positions will lead to collisions in the next step

    Returns set of positions that will cause collisions

    """

    collision_positions = set()

    for pos in current_positions:

        # Check if this position will lead to collision in next step

        # Each cell divides into x±1 positions in next step

        left_next = (pos[0] - 1, pos[1] + 1)

        right_next = (pos[0] + 1, pos[1] + 1)

       

        # Check if these positions would collide with existing next step positions

        if left_next in next_positions or right_next in next_positions:

            collision_positions.add(pos)

           

    return collision_positions

# CHANGE THE NUMBER OF TIME STEPS AND % OF RED GREEDY POINT AGENTS HERE (better not to change anything else ;-)

def create_growth_graph(steps=20, red_probability=0.5):

    G = nx.DiGraph()

   

    # Start with a single cell

    initial_type = 'red' if random.random() < red_probability else 'green'

    G.add_node((0, 0), step=0, type=initial_type)

   

    for step in range(1, steps):

        # Track all positions for current and next step

        current_step_positions = set()

        next_step_positions = set()

       

        # First pass: Collect all intended positions from red cells

        red_parent_map = {}  # (x, y) -> list of parent cells

        prev_cells = [(node, data) for node, data in G.nodes(data=True)

                     if data['step'] == step - 1 and data['type'] == 'red']

       

        for cell, data in prev_cells:

            left_child = (cell[0] - 1, step)

            right_child = (cell[0] + 1, step)

           

            red_parent_map.setdefault(left_child, []).append(cell)

            red_parent_map.setdefault(right_child, []).append(cell)

            next_step_positions.add(left_child)

            next_step_positions.add(right_child)

       

        # Second pass: Smart green cell growth

        green_parent_map = {}  # (x, y) -> list of parent cells

        prev_green_cells = [(node, data) for node, data in G.nodes(data=True)

                           if data['step'] == step - 1 and data['type'] == 'green']

       

        for cell, data in prev_green_cells:

            left_child = (cell[0] - 1, step)

            right_child = (cell[0] + 1, step)

           

            # Try both directions first

            potential_positions = {left_child, right_child}

           

            # Check for immediate collisions with red cells

            immediate_collisions = potential_positions & next_step_positions

           

            # Predict future collisions

            future_collisions = predict_collisions(potential_positions, next_step_positions)

           

            # Remove positions that would cause immediate or future collisions

            safe_positions = potential_positions - immediate_collisions - future_collisions

           

            if len(safe_positions) == 2:

                # Both directions are safe

                green_parent_map[left_child] = [cell]

                green_parent_map[right_child] = [cell]

                next_step_positions.add(left_child)

                next_step_positions.add(right_child)

            elif len(safe_positions) == 1:

                # Only one direction is safe

                safe_pos = safe_positions.pop()

                green_parent_map[safe_pos] = [cell]

                next_step_positions.add(safe_pos)

            else:

                # No safe positions, choose one direction randomly

                chosen_pos = random.choice([left_child, right_child])

                green_parent_map[chosen_pos] = [cell]

                next_step_positions.add(chosen_pos)

       

        # Combine red and green parent maps to detect final collisions

        all_parent_map = {}

        for pos, parents in red_parent_map.items():

            all_parent_map.setdefault(pos, []).extend(parents)

        for pos, parents in green_parent_map.items():

            all_parent_map.setdefault(pos, []).extend(parents)

       

        # Final pass: Create all cells

        for pos, parents in all_parent_map.items():

            if len(parents) >= 2:

                # Collision occurred - create blue cell

                G.add_node(pos, step=step, type='blue')

                for parent in parents:

                    G.add_edge(parent, pos)

            else:

                # Single parent - create normal cell

                parent = parents[0]

                parent_type = G.nodes[parent]['type']

                new_type = 'red' if random.random() < red_probability else 'green'

                G.add_node(pos, step=step, type=new_type)

                G.add_edge(parent, pos)

   

    return G

def visualize_growth(G):

    plt.figure(figsize=(15, 10))

    pos = {node: (node[0], -node[1]) for node in G.nodes()}

   

    colors = []

    for node in G.nodes():

        cell_type = G.nodes[node]['type']

        if cell_type == 'red':

            colors.append('red')

        elif cell_type == 'blue':

            colors.append('blue')

        else:  # green

            colors.append('green')

   

    nx.draw_networkx_nodes(G, pos, node_color=colors, node_size=1)

    nx.draw_networkx_edges(G, pos, edge_color='pink', arrows=True, width=0.1)

   

    plt.title('Smart Cell Growth Simulation\nRed=Dividing, Blue=Collision-Sterile, Green=Smart-Growing')

    plt.axis('equal')

    plt.tight_layout()

    plt.show()

# Create and visualize the graph

G = create_growth_graph()

visualize_growth(G)

# Print statistics

cell_counts = {'red': 0, 'green': 0, 'blue': 0}

for node, data in G.nodes(data=True):

    cell_counts[data['type']] += 1

total_cells = sum(cell_counts.values())

print("\nCell Statistics:")

for cell_type, count in cell_counts.items():

    percentage = (count / total_cells) * 100

    print(f"{cell_type.capitalize()} cells: {count} ({percentage:.1f}%)")

Appendix 2. Code we used for modeling competing composite agents

This Python-3 code (very drafty, it was coded with Grok-3) is for the version of simulated ethical binary tree universe where you can click on dots to see all composite agents highlighted in different colors:

import matplotlib.pyplot as plt

from matplotlib.collections import LineCollection

import numpy as np

from collections import defaultdict

import time

import math

import random

import bisect

import hashlib

from matplotlib.widgets import Button

# ETHICAL UNIVERSE, each dot is an infinitisimal point agent that can do nothing, grow left, right, both ways. A non-infinitisimal composite agent is just the sum of its choices (and choices of others who were on the left and right side and so shaped our guy).

# TAP ON DOTS TO SEE AGENTS

# HOW TO RUN IT: Open your command line or terminal and type "python" or "python3", input the location of this text file (on MacOS you can drag and drop this file to paste its location) and press enter

# You may need to install dependencies listed above with "pip" or "pip3" first

# ### Node Class for Simulation

class Node:

    def __init__(self, type, preference):

        self.type = type

        self.preference = preference

        self.state = 'living' if type else 'dead'

# ### Simulation Parameters, better not to touch them else things can start to look boring

p_good = 0.1        # Probability of a 'good' node

p_prefer = 0.8      # Probability of growing in preferred direction

p_other = 0.2       # Probability of growing in non-preferred direction

p_grow = 1.0        # Probability of growing for 'good' nodes

# CHANGE THIS to change the size of the universe

max_level = 75     # Maximum levels (steps of time) in the tree

# Walls allow you to simulate the expansion or contraction of the universe

initial_left = -3   # Left wall position at y=0

initial_right = 3   # Right wall position at y=0

angle1 = 15         # Angle for first pair of walls (degrees), can be negative

y_switch = 100      # Level to switch to second pair of walls

angle2 = 90         # Angle for second pair of walls (degrees), can be negative

# ### Compute Slopes for Both Pairs of Walls

theta1_rad = math.radians(angle1)

left_slope1 = -math.tan(theta1_rad)

right_slope1 = math.tan(theta1_rad)

theta2_rad = math.radians(angle2)

left_slope2 = -math.tan(theta2_rad)

right_slope2 = math.tan(theta2_rad)

left_wall_switch = initial_left + left_slope1 * y_switch

right_wall_switch = initial_right + right_slope1 * y_switch

# ### Initialize Simulation

current_level = {0: Node('good', 'none')}

all_nodes = [(0, 0, 'living', None)]  # (x, y, state, parent_xy)

# ### Simulation Loop

for y in range(max_level):

    if y + 1 <= y_switch:

        left_wall_y1 = initial_left + left_slope1 * (y + 1)

        right_wall_y1 = initial_right + right_slope1 * (y + 1)

    else:

        left_wall_y1 = left_wall_switch + left_slope2 * ((y + 1) - y_switch)

        right_wall_y1 = right_wall_switch + right_slope2 * ((y + 1) - y_switch)

   

    min_x_next = math.ceil(left_wall_y1)

    max_x_next = math.floor(right_wall_y1)

   

    if min_x_next > max_x_next:

        break

   

    next_level = {}

    for x, node in list(current_level.items()):

        if node.state != 'living':

            continue

        left_child_x = x - 1

        right_child_x = x + 1

        new_y = y + 1

       

        if node.type == 'greedy':

            if left_child_x >= min_x_next:

                next_level.setdefault(left_child_x, []).append((x, y))

            if right_child_x <= max_x_next:

                next_level.setdefault(right_child_x, []).append((x, y))

        else:

            can_left = (left_child_x >= min_x_next) and (x - 2 not in current_level or current_level[x - 2].state != 'living')

            can_right = (right_child_x <= max_x_next) and (x + 2 not in current_level or current_level[x + 2].state != 'living')

            if node.preference == 'left':

                if can_left and random.random() < p_prefer:

                    next_level.setdefault(left_child_x, []).append((x, y))

                elif can_right and random.random() < p_other:

                    next_level.setdefault(right_child_x, []).append((x, y))

            elif node.preference == 'right':

                if can_right and random.random() < p_prefer:

                    next_level.setdefault(right_child_x, []).append((x, y))

                elif can_left and random.random() < p_other:

                    next_level.setdefault(left_child_x, []).append((x, y))

            else:

                if can_left and random.random() < p_grow:

                    next_level.setdefault(left_child_x, []).append((x, y))

                if can_right and random.random() < p_grow:

                    next_level.setdefault(right_child_x, []).append((x, y))

   

    current_level = {}

    for x, parents in next_level.items():

        if len(parents) == 1:

            parent_x, parent_y = parents[0]

            preference = random.choice(['left', 'right', 'none'])

            new_type = 'good' if random.random() < p_good else 'greedy'

            new_node = Node(new_type, preference)

            all_nodes.append((x, new_y, new_node.state, (parent_x, parent_y)))

            current_level[x] = new_node

        else:

            dead_node = Node(None, None)

            all_nodes.append((x, new_y, 'dead', None))

            current_level[x] = dead_node

# ### Extract Positions for Plotting

living_x = [node[0] for node in all_nodes if node[2] == 'living']

living_y = [node[1] for node in all_nodes if node[2] == 'living']

dead_x = [node[0] for node in all_nodes if node[2] == 'dead']

dead_y = [node[1] for node in all_nodes if node[2] == 'dead']

def plot_interactive_tree(all_nodes, living_x, living_y, dead_x, dead_y):

    # Start timing for diagnostics

    start_time = time.time()

   

    # Create figure and axes

    fig, ax = plt.subplots(figsize=(10, 6))

   

    # Plot nodes as scatter points

    ax.scatter(living_x, living_y, color='blue', s=0.1, label='Living')

    ax.scatter(dead_x, dead_y, color='white', s=0.1, label='Dead')

   

    # Precompute connections and lookup tables

    segments = []

    node_to_segment_idx = {}

    children_lookup = defaultdict(list)

    node_positions = np.array([(n[0], n[1]) for n in all_nodes])  # For fast distance calc

    living_nodes_by_y = defaultdict(list)

   

    for i, node in enumerate(all_nodes):

        if node[3] is not None:  # Has a parent

            parent_x, parent_y = node[3]

            segments.append([(parent_x, parent_y), (node[0], node[1])])

            node_to_segment_idx[(node[0], node[1])] = len(segments) - 1

            children_lookup[(parent_x, parent_y)].append((node[0], node[1]))

        if node[2] == 'living':

            living_nodes_by_y[node[1]].append(node[0])

   

    for y in living_nodes_by_y:

        living_nodes_by_y[y].sort()  # Sort by x for consistent coloring

   

    # Create LineCollection for all connections

    line_collection = LineCollection(segments, colors='black', linewidths=0.8)

    ax.add_collection(line_collection)

   

    # Configure plot appearance

    ax.invert_yaxis()

    ax.set_xlabel('Position in Space')

    ax.set_ylabel('Time') # =Level

    ax.set_title('Ethical Universe, Click On Dots to See Composite Agents')

    ax.legend(loc='upper right')

    plt.grid(True, linestyle='--', alpha=0)

    # Set the x-axis scale: how many points on the left and right from the center to keep visible on the screen.

    # ax.set_xlim(-100, 100)

   

    # Define a list of colors to cycle through (using tab20 colormap)

    colors_list = [plt.cm.tab20(i) for i in range(20)]

   

    # Function to compute hash for a subtree (used for finding identical subtrees)

    def compute_subtree_hash(node_xy, memo=None, depth=0):

        if memo is None:

            memo = {}

       

        # Create a key that includes depth to avoid cross-depth collisions

        memo_key = (node_xy, depth)

        if memo_key in memo:

            return memo[memo_key]

       

        children = tuple(sorted(children_lookup[node_xy]))

       

        # For each node, we create a structural signature based on its subtree

        if not children:

            # Leaf node - use a specific hash for leaves

            hash_val = hashlib.md5("LEAF_NODE".encode()).hexdigest()

        else:

            # Non-leaf node - compute structure based on children's hashes

            child_hashes = []

            for child in children:

                # Pass depth+1 to track level within subtree

                child_hash = compute_subtree_hash(child, memo, depth+1)

                child_hashes.append(child_hash)

           

            # Sort to ensure isomorphic structures get same hash

            child_hashes.sort()

           

            # Include # of children in hash input to differentiate nodes with different numbers of children

            hash_input = f"NODE:{len(children)}:" + ",".join(child_hashes)

            hash_val = hashlib.md5(hash_input.encode()).hexdigest()

       

        memo[memo_key] = hash_val

        return hash_val

   

    # Function to find biggest identical subtrees

    def find_identical_subtrees():

        print("Finding identical subtrees...")

        start = time.time()

       

        # Get all nodes that have children

        parent_nodes = [key for key in children_lookup.keys()]

       

        # Compute hash for each subtree

        subtree_hashes = {}

        memo = {}  # Shared memoization dict for efficiency

        for node in parent_nodes:

            h = compute_subtree_hash(node, memo)

            subtree_hashes[node] = h

       

        # Group nodes by hash

        hash_to_nodes = defaultdict(list)

        for node, h in subtree_hashes.items():

            hash_to_nodes[h].append(node)

       

        # Filter out small subtrees first

        MIN_SUBTREE_SIZE = 3  # Minimum nodes in subtree to be considered

        sizable_groups = []

       

        for h, nodes in hash_to_nodes.items():

            if len(nodes) > 1:  # Only consider groups with at least 2 identical subtrees

                # Count descendants to determine subtree size

                subtree_size = len(get_descendants(nodes[0])) + 1  # +1 for the root node

                if subtree_size >= MIN_SUBTREE_SIZE:

                    sizable_groups.append((nodes, subtree_size))

       

        if not sizable_groups:

            print("No identical subtrees of significant size found.")

            return []

       

        # CHANGED: Prioritize subtree size over count - we want the LARGEST subtrees

        # Sort by size first, then by number of occurrences

        sizable_groups.sort(key=lambda x: (x[1], len(x[0])), reverse=True)

       

        # Get the largest subtree size

        largest_subtree_size = sizable_groups[0][1]

       

        # Get all groups with this largest size

        largest_size_groups = [group for group, size in sizable_groups if size == largest_subtree_size]

       

        # Among those with the largest size, find the one with the most occurrences

        if largest_size_groups:

            max_count = max(len(group) for group in largest_size_groups)

            final_groups = [group for group in largest_size_groups if len(group) == max_count]

        else:

            final_groups = []

       

        print(f"Found {len(final_groups)} groups of identical subtrees with {max_count if final_groups else 0} trees each, size {largest_subtree_size}")

        print(f"Time taken: {time.time() - start:.3f} seconds")

       

        return final_groups

   

    # Optimized descendant retrieval using precomputed children

    def get_descendants(node_xy):

        descendants = []

        stack = [node_xy]

        while stack:

            current = stack.pop()

            children = children_lookup[current]

            descendants.extend(children)

            stack.extend(children)

        return descendants

   

    # Highlight subtrees of all living nodes at level y

    def highlight_level_subtrees(y):

        # Get all living nodes at this level

        living_nodes = [(x, y) for x in living_nodes_by_y[y]]

        colors = ['black'] * len(segments)

       

        # For each living node, highlight its subtree

        for i, node in enumerate(living_nodes):

            color = colors_list[i % len(colors_list)]

            descendants = get_descendants(node)

            # Highlight segments where child is in descendants

            indices = [node_to_segment_idx[n] for n in descendants if n in node_to_segment_idx]

            for idx in indices:

                colors[idx] = color

       

        line_collection.set_colors(colors)

        fig.canvas.draw_idle()

   

    # Function to highlight identical subtrees

    def highlight_identical_subtrees():

        print("Highlighting biggest identical subtrees...")

        colors = ['black'] * len(segments)

       

        # Find the biggest identical subtrees

        largest_groups = find_identical_subtrees()

       

        if not largest_groups:

            print("No identical subtrees found to highlight.")

            return

           

        # Highlight each group with a different color

        for group_idx, group in enumerate(largest_groups):

            color = colors_list[group_idx % len(colors_list)]

           

            # For each root in the group

            for root in group:

                # Collect all nodes in this subtree (root + descendants)

                all_subtree_nodes = [root] + get_descendants(root)

               

                # Highlight all edges in the subtree - including the edge connecting to the root

                for node in all_subtree_nodes:

                    # Find the segment connecting this node to its parent (if it exists)

                    if node in node_to_segment_idx:

                        idx = node_to_segment_idx[node]

                        colors[idx] = color

       

        # Update the line colors

        line_collection.set_colors(colors)

        fig.canvas.draw_idle()

       

        # Print a message about what was highlighted

        print(f"Highlighted {len(largest_groups)} groups of identical subtrees.")

        if largest_groups:

            first_group = largest_groups[0]

            first_root = first_group[0]

            subtree_size = len(get_descendants(first_root)) + 1

            print(f"Each group contains {len(first_group)} identical subtrees with {subtree_size} nodes each.")

   

    # Clear highlights

    def clear_highlights():

        line_collection.set_colors('black')

        fig.canvas.draw_idle()

   

    # Click event handler

    def on_click(event):

        if event.inaxes != ax:

            return

        clear_highlights()

        click_x, click_y = event.xdata, event.ydata

       

        # Find the closest node to the click

        distances = np.sum((node_positions - [click_x, click_y])**2, axis=1)

        closest_idx = np.argmin(distances)

        closest_node_xy = (all_nodes[closest_idx][0], all_nodes[closest_idx][1])

       

        # Highlight all subtrees at this node's level

        y = closest_node_xy[1]

        highlight_level_subtrees(y)

   

    # Create a button for finding identical subtrees

    button_ax = plt.axes([0.7, 0.01, 0.25, 0.05])

    identical_button = Button(button_ax, 'Biggest identical subtrees \n(composite agents/qualia). Slow :(')

    identical_button.on_clicked(lambda event: highlight_identical_subtrees())

   

    # Connect event handler

    fig.canvas.mpl_connect('button_press_event', on_click)

   

    # Finish initialization

    plt.draw()

    init_time = time.time() - start_time

    print(f"Plot initialized in {init_time:.3f} seconds")

   

    plt.show()

   

# Call the function with your data

plot_interactive_tree(all_nodes, living_x, living_y, dead_x, dead_y)

Appendix 3. Code we used for identical qualia

This Python-3 code (very drafty, it was coded with Grok-3) is for the version of simulated ethical binary tree universe (models the growth of choices/freedoms, agents/qualia) with identical agents/qualia that you can highlight with a slider (the slider is below the graph, agents/qualia can be on top of each other, can intersect. Run a few times to see a new universe each time).

import matplotlib.pyplot as plt

from matplotlib.collections import LineCollection

from matplotlib.widgets import Slider

import numpy as np

from collections import defaultdict

import random

import math

# SIMULATED ETHICAL UNIVERSE that models the growth of choices (=freedoms) and agents that are just sums of choices

# HOW TO RUN IT: Open your command line or terminal and type "python" or "python3", input the location of this file (on MacOS you can drag and drop this file to paste its location) and press enter

# You may need to install dependencies listed above with "pip" or "pip3" first

# Node Class for Simulation

class Node:

    def __init__(self, type, preference):

        self.type = type

        self.preference = preference

        self.state = 'living' if type else 'dead'

# Simulation Parameters, better not to touch them else things can start to look boring

p_good = 0.1        # Probability of a 'good' node that tries not to bump into others

p_prefer = 0.8      # Probability of growing in preferred direction

p_other = 0.2       # Probability of growing in non-preferred direction

p_grow = 1.0        # Probability of growing for 'good' nodes

# CHANGE THIS ONE TO SIMULATE BIGGER UNIVERSES:

max_level = 100     # Maximum levels (number of time steps) in the tree

# The wall allows us to simulate the expansion (for example after the creation of a simulated multiverse) or contraction of our universe (for example if an AI agents "burns" freedoms for all, even for itself (forbids everyone to swear?))

initial_left = -3   # Left wall position at y=0

initial_right = 3   # Right wall position at y=0

angle1 = 15         # Angle for first pair of walls (degrees), can be negative

y_switch = 75      # Level to switch to second pair of walls

angle2 = 90         # Angle for second pair of walls (degrees), can be negative

# SLIDER PARAMS, you may need to double click on the slider to make it jump:

min_subtree_size = 3  # Minimum number of nodes for a subtree (minimum qualia size) that we have on our slider

start_subtree_size = 30  # Starting slider value

max_subtree_nodes = 100  # Maximum number of nodes to check for identical subtrees

# Compute Slopes for Walls

theta1_rad = math.radians(angle1)

left_slope1 = -math.tan(theta1_rad)

right_slope1 = math.tan(theta1_rad)

theta2_rad = math.radians(angle2)

left_slope2 = -math.tan(theta2_rad)

right_slope2 = math.tan(theta2_rad)

left_wall_switch = initial_left + left_slope1 * y_switch

right_wall_switch = initial_right + right_slope1 * y_switch

# Initialize Simulation

current_level = {0: Node('good', 'none')}

all_nodes = [(0, 0, 'living', None)]  # (x, y, state, parent_xy)

# Simulation Loop

for y in range(max_level):

    if y + 1 <= y_switch:

        left_wall_y1 = initial_left + left_slope1 * (y + 1)

        right_wall_y1 = initial_right + right_slope1 * (y + 1)

    else:

        left_wall_y1 = left_wall_switch + left_slope2 * ((y + 1) - y_switch)

        right_wall_y1 = right_wall_switch + right_slope2 * ((y + 1) - y_switch)

   

    min_x_next = math.ceil(left_wall_y1)

    max_x_next = math.floor(right_wall_y1)

   

    if min_x_next > max_x_next:

        break

   

    next_level = {}

    for x, node in list(current_level.items()):

        if node.state != 'living':

            continue

        left_child_x = x - 1

        right_child_x = x + 1

        new_y = y + 1

       

        if node.type == 'greedy':

            if left_child_x >= min_x_next:

                next_level.setdefault(left_child_x, []).append((x, y))

            if right_child_x <= max_x_next:

                next_level.setdefault(right_child_x, []).append((x, y))

        else:

            can_left = (left_child_x >= min_x_next) and (x - 2 not in current_level or current_level[x - 2].state != 'living')

            can_right = (right_child_x <= max_x_next) and (x + 2 not in current_level or current_level[x + 2].state != 'living')

            if node.preference == 'left':

                if can_left and random.random() < p_prefer:

                    next_level.setdefault(left_child_x, []).append((x, y))

                elif can_right and random.random() < p_other:

                    next_level.setdefault(right_child_x, []).append((x, y))

            elif node.preference == 'right':

                if can_right and random.random() < p_prefer:

                    next_level.setdefault(right_child_x, []).append((x, y))

                elif can_left and random.random() < p_other:

                    next_level.setdefault(left_child_x, []).append((x, y))

            else:

                if can_left and random.random() < p_grow:

                    next_level.setdefault(left_child_x, []).append((x, y))

                if can_right and random.random() < p_grow:

                    next_level.setdefault(right_child_x, []).append((x, y))

   

    current_level = {}

    for x, parents in next_level.items():

        if len(parents) == 1:

            parent_x, parent_y = parents[0]

            preference = random.choice(['left', 'right', 'none'])

            new_type = 'good' if random.random() < p_good else 'greedy'

            new_node = Node(new_type, preference)

            all_nodes.append((x, new_y, new_node.state, (parent_x, parent_y)))

            current_level[x] = new_node

        else:

            dead_node = Node(None, None)

            all_nodes.append((x, new_y, 'dead', None))

            current_level[x] = dead_node

# Extract Positions for Plotting

living_x = [node[0] for node in all_nodes if node[2] == 'living']

living_y = [node[1] for node in all_nodes if node[2] == 'living']

dead_x = [node[0] for node in all_nodes if node[2] == 'dead']

dead_y = [node[1] for node in all_nodes if node[2] == 'dead']

# Interactive Plotting Function

def plot_interactive_tree(all_nodes, living_x, living_y, dead_x, dead_y):

    fig, ax = plt.subplots(figsize=(12, 8))

   

    ax.scatter(living_x, living_y, color='blue', s=0.1, label='Living')

    ax.scatter(dead_x, dead_y, color='white', s=0.1, label='Dead')

   

    segments = []

    node_to_segment_idx = {}

    children_lookup = defaultdict(list)

    state_dict = {(node[0], node[1]): node[2] for node in all_nodes}

   

    for i, node in enumerate(all_nodes):

        if node[3] is not None:

            parent_x, parent_y = node[3]

            segments.append([(parent_x, parent_y), (node[0], node[1])])

            node_to_segment_idx[(node[0], node[1])] = len(segments) - 1

            children_lookup[(parent_x, parent_y)].append((node[0], node[1]))

   

    line_collection = LineCollection(segments, colors='black', linewidths=0.8)

    ax.add_collection(line_collection)

   

    ax.invert_yaxis()

    ax.set_xlabel('Position in Space')

    ax.set_ylabel('Time') # Or Level

    ax.set_title('Ethical Universe (Ethical Big Bang on top) With Identical Composite Agents/Qualia Highlighted')

    ax.legend(loc='upper right')

    # ax.set_xlim(-100, 100)

   

    colors_list = [plt.cm.tab20(i) for i in range(20)]

   

    # Build children dictionary

    children = {}

    for parent_xy, child_list in children_lookup.items():

        if len(child_list) == 1:

            child_xy = child_list[0]

            if child_xy[0] < parent_xy[0]:

                children[parent_xy] = {'left': child_xy, 'right': None}

            else:

                children[parent_xy] = {'left': None, 'right': child_xy}

        elif len(child_list) == 2:

            child_list.sort(key=lambda c: c[0])

            children[parent_xy] = {'left': child_list[0], 'right': child_list[1]}

   

    # Function to get subtree with exactly k nodes

    def get_subtree_exact_size(root_xy, k):

        if k == 0:

            return tuple(), []

        queue = [root_xy]

        nodes = []

        node_to_index = {}

        index = 0

       

        while queue and len(nodes) < k:

            current = queue.pop(0)

            if current not in node_to_index:

                node_to_index[current] = index

                index += 1

                nodes.append(current)

                child_dict = children.get(current, {'left': None, 'right': None})

                if child_dict['left']:

                    queue.append(child_dict['left'])

                if child_dict['right']:

                    queue.append(child_dict['right'])

       

        if len(nodes) < k:

            return None, []  # Subtree too small

        size = k

       

        subtree_repr = []

        for node in nodes[:size]:

            state = state_dict[node]

            child_dict = children.get(node, {'left': None, 'right': None})

            left_idx = node_to_index.get(child_dict['left'], None) if child_dict['left'] in node_to_index else None

            right_idx = node_to_index.get(child_dict['right'], None) if child_dict['right'] in node_to_index else None

            subtree_repr.append((state, left_idx, right_idx))

       

        return tuple(subtree_repr), nodes[:size]

   

    # Find the maximum k where there are at least two identical subtrees of size k

    def find_max_k():

        for k in range(max_subtree_nodes, min_subtree_size - 1, -1):

            subtree_hashes = defaultdict(list)

            for xy in state_dict:

                if state_dict[xy] == 'living':

                    subtree_repr, nodes = get_subtree_exact_size(xy, k)

                    if subtree_repr and len(nodes) == k:

                        hash_value = hash(subtree_repr)

                        subtree_hashes[hash_value].append((xy, nodes))

            valid_groups = [group for group in subtree_hashes.values() if len(group) >= 2]

            if valid_groups:

                return k

        return start_subtree_size  # Default to 30 if no larger identical subtrees found

   

    max_k = find_max_k()

    initial_k = max(start_subtree_size, max_k)  # Start at 30 or higher if max_k > 30

    print(f"Maximum size of identical subtrees found: {max_k}")

    print(f"Slider will range from {min_subtree_size} to {max_k}, starting at {initial_k}")

   

    # Update highlights based on slider value

    def update_highlights(val):

        k = int(val)

        subtree_hashes = defaultdict(list)

       

        for xy in state_dict:

            if state_dict[xy] == 'living':

                subtree_repr, nodes = get_subtree_exact_size(xy, k)

                if subtree_repr and len(nodes) == k:

                    hash_value = hash(subtree_repr)

                    subtree_hashes[hash_value].append((xy, nodes))

       

        valid_groups = [group for group in subtree_hashes.values() if len(group) >= 2]

        segment_colors = ['black'] * len(segments)

       

        if not valid_groups:

            print(f"No identical subtrees of size {k} found.")

            line_collection.set_colors(segment_colors)

            fig.canvas.draw_idle()

            return

       

        for i, group in enumerate(valid_groups):

            color = colors_list[i % len(colors_list)]

            for root, nodes in group:

                for node in nodes[1:]:  # Skip root to highlight only edges

                    if node in node_to_segment_idx:

                        idx = node_to_segment_idx[node]

                        segment_colors[idx] = color

       

        line_collection.set_colors(segment_colors)

        fig.canvas.draw_idle()

   

    # Set up slider

    ax_slider = plt.axes([0.2, 0.01, 0.65, 0.03])

    slider = Slider(ax_slider, 'Composite Agent/Qualia Size', min_subtree_size, max_k, valinit=initial_k, valstep=1)

    slider.on_changed(update_highlights)

   

    # Initial highlight

    update_highlights(initial_k)

   

    plt.show()

# Run the Visualization

plot_interactive_tree(all_nodes, living_x, living_y, dead_x, dead_y)

Appendix 4. Quantum ethics code

Here's the source code, MIT open source, vibe coded it quickly

# Quantum ethics. The simplest simulation https://x.com/MaskedMelonUsk/status/1959766494734123170

import networkx as nx

import matplotlib.pyplot as plt

import random

from collections import defaultdict, deque

import numpy as np

 

 

   

def draw_binary_graph(height=50):    

   

    G = nx.DiGraph()

    node_colors = {}

    # Start with root

    root = (0, 0)

    G.add_node(root)

    node_colors[root] = 'orange'

    active_nodes = {0: 'orange'}  # pos: color

    for level in range(height):

        next_incoming = defaultdict(list)  # child_pos: list of parent_pos

        for pos, color in active_nodes.items():

            if color == 'black':

                direction = random.choice([-1, 1])

                child_pos = pos + direction

                next_incoming[child_pos].append(pos)

            else:

                child_pos_left = pos - 1

                child_pos_right = pos + 1

                next_incoming[child_pos_left].append(pos)

                next_incoming[child_pos_right].append(pos)

        # Update active_nodes for next level

        active_nodes = {}

        for child_pos, parents in next_incoming.items():

            indegree = len(parents)

            node_color = 'black' if indegree > 1 else 'orange'

            active_nodes[child_pos] = node_color

            # Add node and edges to graph

            child_node = (level + 1, child_pos)

            G.add_node(child_node)

            node_colors[child_node] = node_color

            for parent_pos in parents:

                parent_node = (level, parent_pos)

                G.add_edge(parent_node, child_node)

    # Set positions

    pos = {node: (node[1], -node[0]) for node in G.nodes()}

   

    # Interactive plot

    fig, ax = plt.subplots(figsize=(200, 200))

    edge_list = list(G.edges())

    n_edges = len(edge_list)

    node_list = list(G.nodes())

    node_col_list = [node_colors[node] for node in node_list]

   

    def redraw(edge_colors):

        ax.clear()

        nx.draw_networkx_nodes(G, pos=pos, nodelist=node_list, node_color=node_col_list,

                               node_size=1, ax=ax)

        nx.draw_networkx_edges(G, pos=pos, edgelist=edge_list, edge_color=edge_colors,

                               arrows=False, ax=ax)

        ax.set_title("Binary Graph with Collisions")

        fig.canvas.draw()

   

    def get_subtree_edges(source):

        edges = []

        visited = set()

        queue = deque([source])

        while queue:

            u = queue.popleft()

            if u in visited:

                continue

            visited.add(u)

            for v in G.successors(u):

                edges.append((u, v))

                queue.append(v)

        return edges

   

    def onclick(event):

        if event.button != 1 or event.xdata is None:

            return

        click_x, click_y = event.xdata, event.ydata

        # Find closest node

        node_pos_array = np.array([pos[node] for node in node_list])

        dists = np.linalg.norm(node_pos_array - [click_x, click_y], axis=1)

        idx = np.argmin(dists)

        if dists[idx] > 0.5:

            return

        clicked_node = node_list[idx]

        # Get adjacent nodes

        L, P = clicked_node

        left_node = (L, P - 1)

        right_node = (L, P + 1)

        agent_nodes_colors = []

        if left_node in G:

            agent_nodes_colors.append((left_node, 'blue'))

        agent_nodes_colors.append((clicked_node, 'red'))

        if right_node in G:

            agent_nodes_colors.append((right_node, 'green'))

        # Compute edge_to_color

        edge_to_color = {}

        for agent, col in agent_nodes_colors:

            subtree_edges = get_subtree_edges(agent)

            for e in subtree_edges:

                edge_to_color[e] = col

        # Get edge_colors list

        edge_colors = [edge_to_color.get(e, 'lightgray') for e in edge_list]

        redraw(edge_colors)

   

    # Initial draw

    initial_edge_colors = ['lightgray'] * n_edges

    redraw(initial_edge_colors)

    fig.canvas.mpl_connect('button_press_event', onclick)

    plt.show()

   

 

# Call the function

draw_binary_graph()

Appendix 5. Multiagent quantum ethics

Let's hope the vibe coded code works for you, MIT license, clicking can be tricky, so do it many times:

import networkx as nx

import matplotlib.pyplot as plt

import random

from collections import defaultdict, deque

import numpy as np

import itertools

import seaborn as sns

# Set the number of levels here (time steps):

def draw_binary_graph(height=50):

   

    G = nx.DiGraph()

    node_colors = {}

    # Start with root

    root = (0, 0)

    G.add_node(root)

    node_colors[root] = 'orange'

    active_nodes = {0: 'orange'} # pos: color

    for level in range(height):

        next_incoming = defaultdict(list) # child_pos: list of parent_pos

        for pos, color in active_nodes.items():

            if color == 'black':

                direction = random.choice([-1, 1])

                child_pos = pos + direction

                next_incoming[child_pos].append(pos)

            else:

                child_pos_left = pos - 1

                child_pos_right = pos + 1

                next_incoming[child_pos_left].append(pos)

                next_incoming[child_pos_right].append(pos)

        # Update active_nodes for next level

        active_nodes = {}

        for child_pos, parents in next_incoming.items():

            indegree = len(parents)

            node_color = 'black' if indegree > 1 else 'orange'

            active_nodes[child_pos] = node_color

            # Add node and edges to graph

            child_node = (level + 1, child_pos)

            G.add_node(child_node)

            node_colors[child_node] = node_color

            for parent_pos in parents:

                parent_node = (level, parent_pos)

                G.add_edge(parent_node, child_node)

    # Set positions

    pos = {node: (node[1], -node[0]) for node in G.nodes()}

   

    # Precompute positions per level

    levels_positions = defaultdict(list)

    for node in G.nodes():

        lv, p = node

        levels_positions[lv].append(p)

    for lv in levels_positions:

        levels_positions[lv].sort()

   

    # Interactive plot

    fig, ax = plt.subplots(figsize=(1, 1))

    # ax.plot(x, y)

    # # Remove internal padding between the data and the axes

    # ax.margins(x=0, y=0)

    # Make the axes span the entire figure area

    plt.subplots_adjust(left=0, right=1, bottom=0, top=1)

    # Turn off the axis lines and tick marks

    ax.axis('off')

    # Display the plot with tight layout

    plt.tight_layout(pad=0)

    edge_list = list(G.edges())

    n_edges = len(edge_list)

    node_list = list(G.nodes())

    node_col_list = [node_colors[node] for node in node_list]

   

    def redraw(edge_colors):

        ax.clear()

        nx.draw_networkx_nodes(G, pos=pos, nodelist=node_list, node_color=node_col_list,

                               node_size=1, ax=ax)

        nx.draw_networkx_edges(G, pos=pos, edgelist=edge_list, edge_color=edge_colors,

                               arrows=False, ax=ax)

        ax.set_title("Binary Graph with Collisions")

        fig.canvas.draw()

   

    def get_subtree_edges(source):

        edges = []

        visited = set()

        queue = deque([source])

        while queue:

            u = queue.popleft()

            if u in visited:

                continue

            visited.add(u)

            for v in G.successors(u):

                edges.append((u, v))

                queue.append(v)

        return edges

   

    def onclick(event):

        if event.button != 1 or event.xdata is None:

            return

        click_x, click_y = event.xdata, event.ydata

        # Find closest node

        node_pos_array = np.array([pos[node] for node in node_list])

        dists = np.linalg.norm(node_pos_array - [click_x, click_y], axis=1)

        idx = np.argmin(dists)

        if dists[idx] > 0.5:

            return

        clicked_node = node_list[idx]

        L, P = clicked_node

        # Get all nodes in the level

        pos_list = levels_positions[L]

        try:

            idx = pos_list.index(P)

        except ValueError:

            return

        # Order: clicked, then right, then left (from closest to farthest)

        right_positions = pos_list[idx + 1:]

        left_positions = pos_list[:idx][::-1]

        agent_positions = [P] + right_positions + left_positions

        # Agents and colors

       

        paired_palette = sns.color_palette("Paired", 12)

     

        # Convert the palette to a list of hex color codes

        hex_color_list = paired_palette.as_hex()

        # Access a color from the list using square brackets and a valid index

        color_list= [hex_color_list[i] for i in range(len(hex_color_list))]

       

        # color_list = [

http://

plt.cm.tab20(i) for i in range(20)]

        # 3. Insert black at the beginning of the list - default selection color of the agent when I click

        color_list.insert(0, 'black')

        colors_cycle = itertools.cycle(color_list)

        agent_nodes_colors = [((L, p), next(colors_cycle)) for p in agent_positions]

        # Compute edge_to_color without overwriting

        edge_to_color = {}

        for agent, col in agent_nodes_colors:

            subtree_edges = get_subtree_edges(agent)

            for e in subtree_edges:

                if e not in edge_to_color:

                    edge_to_color[e] = col

        # Get edge_colors list

        edge_colors = [edge_to_color.get(e, 'lightgray') for e in edge_list]

        redraw(edge_colors)

   

    # Initial draw

    initial_edge_colors = ['lightgray'] * n_edges

    redraw(initial_edge_colors)

    fig.canvas.mpl_connect('button_press_event', onclick)

   

http://

plt.show()

# Call the function

draw_binary_graph()


[1]Stephen Wolfram (2020), "Finally We May Have a Path to the Fundamental Theory of Physics… and It's Beautiful," Stephen Wolfram Writings. writings.stephenwolfram.com/2020/04/finally-we-may-have-a-path-to-the-fundamental-theory-of-physics-and-its-beautiful.

[2] Gorard, Jonathan. "Some relativistic and gravitational properties of the Wolfram model." arXiv preprint arXiv:2004.14810 (2020).

[3] Gorard, Jonathan. "Some quantum mechanical properties of the Wolfram model." Complex Systems 29.2 (2020): 537-598.

[4] https://en.wikipedia.org/wiki/Powerset_construction

[5] We model ethics, so we have an ethical Big Bang and our black holes are ethical black holes. But point black holes in physics are theoretically possible: https://en.wikipedia.org/wiki/Black_hole_electron

https://en.wikipedia.org/wiki/Extremal_black_hole. Black hole potentially appeared in the primordial soup of the big bang itself: https://x.com/QuantaMagazine/status/1966497800432062731 according Stephen Hawking’s proposal

[6] “It may be more plausible, however, that particles act a bit like tiny black holes, with their “internal state” not evident outside.” https://writings.stephenwolfram.com/2021/04/the-wolfram-physics-project-a-one-year-update/

[7] Jonathan Gorard, 17-posts thread: https://x.com/getjonwithit/status/1887136743977046203

[8] https://en.wikipedia.org/wiki/Many-worlds_interpretation

[9] https://en.wikipedia.org/wiki/Holographic_principle

[10] https://en.wikipedia.org/wiki/ER_%3D_EPR

[11] Discrete physical models can reproduce double slit experiment, in our model it looks possible, too, at least I can roughly do it on paper. We have to simplify a lot to keep it all visual and intuitive - it becomes harder with superpositions, so we’ll go there gradually https://bulletins.wolframphysics.org/2020/08/a-short-note-on-the-double-slit-experiment-and-other-quantum-interference-effects-in-the-wolfram-model/