A Natural Computational Approach to a Simulated Universe

  • 3 Replies
  • 137 Views
*

frankinstien

  • Bumblebee
  • **
  • 44
    • Knowledgeable Machines
A Natural Computational Approach to a Simulated Universe
« on: May 23, 2020, 10:05:55 PM »
A lot of the simulated universe theories imply a designer, e.g. Elon Musk’s idea of the probability of our reality being simulated which is actually based on  Nick Bostrom trilemma. But the original idea of a literal computing machine running the universe was Konrad Zuse but never implied a designer. Zuse suggested Celluar automation where Wolfram in 2002 published similar ideas. Others like Edward Fredkin, Jürgen Schmidhuber, suggested a computational universe after Zuse.

With the discovery of chaos theory and fractal mathematics I started to think about how a computational system could come about from randomness and a form of cellular automata. In fact the concept of randomness creating computational systems has been observed in nature. We call them brains! The idea that out of chaos order can emerge intrigued me. I realized for any kind of system to arise the resultant configuration of atomic computational units needed to discern noise from valid informational states. One way to block out noise is to establish pathways where information can propagate or be blocked. If such pathways could be reinforced then the potential of naturally emerging computational systems becomes possible.

I started to think about how the stuff of reality is not something created but an eternal manifestation of cellular automation in the form of triple-state bits where each state is either -1, 0, or 1. Not only that but each cell can affect other cell’s states. Each state of the cells randomly asserts to one of the three states and with different frequencies or periods.  I then built a small simulation of this idea that you can view here. (Note that green is zero, red is -1 and blue is 1)

The entire system is initialized randomly and then starts to interact with the other cells, which are represented by cubes in the simulation. The system can go to very chaotic to states where there is little to no change, persisting pathways or blocks them, effectively a memory!
Now imagine a phenomenal number of these cells where over an eternity they could end up configuring themselves into a system that can simulate or act like our universe!

Now realize that each surface area of the cube is like a communications channel and in this simulation we only have 3 dimensions. This kind of 3 Dimensional configurations has limits as to how many connections or channels it can support.   This could challenge the computational ability of the system since latency and possible shifts in the configuration can block or open new channels changing or constraining the ability to cross communicate to other configurations that may be exploited to give rise to our reality. A sphere would give us more surface area to communicate across and improve the inner connectivity of the system, but 3 Dimensional constraints still limit the number of connections possible.  We expand the number of channels to say a hyperdimensional structure then the cells can organize into strange structures where the distances between could even be light-years across in 3 dimensions but in 4 or more dimensions they are just right next door to one another. This would allow for a complex means of exchanging information and allow for a robust computational system that can compute the random states of quantum particles.

There have been studies that claim classical computation can't emulate quantum randomness but they are assuming a serial like computational processor where latency and interconnectivity aren't solved.

Below is the core code for the cells in the video on Tube: (note that a cell doesn't fire unless its internal state's sign aligns with its random generated state)

Code
 public class ExpUnit1
    {
        public static bool TerminateAll { set; get; }
        public bool Terminate { set; get; }
        public Action<int> Connections { private set; get; }
        public Space Location { private set; get; }
        public Cube Unit { set; get; }
        protected Action<ExpUnit1> DisplayState { set; get; }
        int internalState = 0;
        int interationWait;
        Color defaultColor;


        public ExpUnit1(Space loc, Action<ExpUnit1> display, int cubeSize)
        {
            Location = loc;
            InitializeWait(display, cubeSize);
        }

        public ExpUnit1(int x, int y, int z, Action<ExpUnit1> display, int cubeSize)
        {
            Location = new Space();
            Location.X = x;
            Location.Y = y;
            Location.Z = z;
            InitializeWait(display, cubeSize);
        }       

        private void InitializeWait(Action<ExpUnit1> display, int cubeSize)
        {
            defaultColor = Color.FromRgb(255, 0, 0);
            Terminate = false;
            TerminateAll = false;
            DisplayState = display;
            Random radGen = new Random(-1);
            interationWait = radGen.Next(10, 20);         

           
            Unit = new Cube(cubeSize);
            Unit.ScaleZ = 6;
            Unit.ScaleY = 6;
            Unit.ScaleX = 6;
            Unit.Position = new Point3D(Location.X, Location.Y, Location.Z);
            Unit.Transform.Freeze();           
            Unit.Model.Material = new DiffuseMaterial(new SolidColorBrush(defaultColor));
           
            Task.Run(() => InternalProcess());
        }

        private void InternalProcess()
        {
            Random radGen = new Random(0);
            while(!Terminate && !TerminateAll)
            {
                try
                {
                   
                        var idx = radGen.Next(-1, 2);
                   
                    if (Connections != null)
                    {
                        foreach (Action<int> eval in Connections.GetInvocationList())
                        {
                            if (eval != null && Math.Sign(idx) == Math.Sign(internalState))
                            {                               
                                Task.Run(() => eval(idx));
                            }
                        }

                        Task.Run(() => EvaluateState(idx));
                    }

                    Thread.SpinWait(interationWait);
                }
                catch(Exception e)
                {
                    string msg = e.Message;
                }
            }

            MessageBox.Show(GetHashCode().ToString() + " I was Termianted!");
        }

        public bool AddConnection(Action<int> aConnection)
        {
            bool result = false;
            if (aConnection != null && (Connections == null || Connections.GetInvocationList().Length < 10000))
            {
                Connections += aConnection;
                result = true;
            }
            return result;
        }

        object lockEval = new object();

        public void EvaluateState(int aState)
        {
            try
            {
                lock (lockEval)
                {
                    internalState += aState;
                    if (internalState > 1)
                        internalState = 1;
                    else if (internalState < -1)
                        internalState = -1;
                    if (DisplayState != null)
                        Task.Run(() => DisplayState(this));
                }
            }
            catch (Exception e)
            {
                string msg = e.Message;
            }
        }

        public int ReadState()
        {
            return internalState;
        }
    }

*

frankinstien

  • Bumblebee
  • **
  • 44
    • Knowledgeable Machines
Re: A Natural Computational Approach to a Simulated Universe
« Reply #1 on: May 23, 2020, 10:33:08 PM »
For some reason I can't edit my post I keep getting an error. Here's the link to the youtube video mentioned in my post.

*

frankinstien

  • Bumblebee
  • **
  • 44
    • Knowledgeable Machines
Re: A Natural Computational Approach to a Simulated Universe
« Reply #2 on: May 23, 2020, 11:09:30 PM »
Here's a shorter video of the cells with views of the other sides of the collection of cells.

*

frankinstien

  • Bumblebee
  • **
  • 44
    • Knowledgeable Machines
Re: A Natural Computational Approach to a Simulated Universe
« Reply #3 on: May 24, 2020, 02:22:39 AM »
I removed the alignment of signs rule and the cells now fire at random. Now when the system starts it's much more chaotic:

Video 3

Here's a video of the system actually stabilizing with the more chaotic code:

Video 4

Here's the changed code:

Code
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Media3D;
using System.Windows.Shapes;
using WFTools3D;
using WpfMyCube;

namespace Computron.Model
{
    public class ExpUnit1
    {
        public static bool TerminateAll { set; get; }
        public bool Terminate { set; get; }
        public Action<int> Connections { private set; get; }
        public Space Location { private set; get; }
        public Cube Unit { set; get; }
        protected Action<ExpUnit1> DisplayState { set; get; }
        int internalState = -1;
        int interationWait;
        Color defaultColor;
        Random radGen;

        public ExpUnit1(Space loc, Action<ExpUnit1> display, int cubeSize)
        {
            Location = loc;
            InitializeWait(display, cubeSize);
        }

        public ExpUnit1(int x, int y, int z, Action<ExpUnit1> display, int cubeSize)
        {
            Location = new Space();
            Location.X = x;
            Location.Y = y;
            Location.Z = z;
            InitializeWait(display, cubeSize);
        }       

        private void InitializeWait(Action<ExpUnit1> display, int cubeSize)
        {
            radGen = new Random();
            internalState = radGen.Next(-1, 2);
            defaultColor = Color.FromRgb(255, 0, 0);// don't care on intiailization since it will soon be updated.
            Terminate = false;
            TerminateAll = false;
            DisplayState = display;
            Random radGenWait = new Random(-1);
            interationWait = radGenWait.Next(10, 20);         

           
            Unit = new Cube(cubeSize);
            Unit.ScaleZ = 6;
            Unit.ScaleY = 6;
            Unit.ScaleX = 6;
            Unit.Position = new Point3D(Location.X, Location.Y, Location.Z);
            Unit.Transform.Freeze();           
            //Unit.Model.Material = new DiffuseMaterial(new SolidColorBrush(Color.FromRgb(255,255,255)));
            if (DisplayState != null)
               Task.Run(() => DisplayState(this));
            Task.Run(() => InternalProcess());
        }

        private void InternalProcess()
        {
           
            while(!Terminate && !TerminateAll)
            {
                try
                {
                   
                        var idx = radGen.Next(-1, 2);
                   
                    if (Connections != null)
                    {
                        foreach (Action<int> eval in Connections.GetInvocationList())
                        {
                            if (eval != null)// && Math.Sign(idx) == Math.Sign(internalState))
                            {                               
                                Task.Run(() => eval(idx));
                            }
                        }

                        Task.Run(() => EvaluateState(idx));
                    }

                    Thread.SpinWait(interationWait);
                }
                catch(Exception e)
                {
                    string msg = e.Message;
                }
            }

            MessageBox.Show(GetHashCode().ToString() + " I was Termianted!");
        }

        public bool AddConnection(Action<int> aConnection)
        {
            bool result = false;
            if (aConnection != null && (Connections == null || Connections.GetInvocationList().Length < 10000))
            {
                Connections += aConnection;
                result = true;
            }
            return result;
        }

        object lockEval = new object();

        public void EvaluateState(int aState)
        {
            try
            {
                lock (lockEval)
                {
                    internalState += aState;
                    if (internalState > 1)
                        internalState = 1;
                    else if (internalState < -1)
                        internalState = -1;
                    if (DisplayState != null)
                        Task.Run(() => DisplayState(this));
                }
            }
            catch (Exception e)
            {
                string msg = e.Message;
            }
        }

        public int ReadState()
        {
            return internalState;
        }
    }
}
« Last Edit: May 25, 2020, 05:53:41 PM by frankinstien »

 


Users Online

75 Guests, 1 User
Users active in past 15 minutes:
frankinstien
[Bumblebee]

Most Online Today: 83. Most Online Ever: 340 (March 26, 2019, 09:47:57 PM)

Articles