• OK, it's on.
  • Please note that many, many Email Addresses used for spam, are not accepted at registration. Select a respectable Free email.
  • Done now. Domine miserere nobis.

File Tree a.i. - My idea

Black Rose

An unbreakable bond
Local time
Yesterday 11:27 PM
Joined
Apr 4, 2010
Messages
11,431
---
Location
with mama
A node stores files.
Inside the files is data.
Which are lists of numbers.
Each number represents a node.

MZ3uBz6.png


If you look through files you eventually find what you are looking for. So a node sorts the files by what it looks for. This creates a simulated network or tree system. The files that are used most often get represented closer to the node’s main file. The search tree lists files by the depth at which a search is necessary to bring that file closer to the main file. This means the branches eventually get closer together.

This is a way to simulate networks as an operating system. Because it evolves as a network does in file form. That is it groups files by how often those files data are useful to the main nodes which can be thought of as the input set the network is trying to understand. Multiple nodes exist to search the entire file system at the same time.
 

birdsnestfern

Earthling
Local time
Today 1:27 AM
Joined
Oct 7, 2021
Messages
1,897
---
Now, do you think they can make an AI that will help people win the lottery?
 

Black Rose

An unbreakable bond
Local time
Yesterday 11:27 PM
Joined
Apr 4, 2010
Messages
11,431
---
Location
with mama
@dr froyd

elements 8

list [1, 2, 3, 4, 5, 6, 7, 8]

list input [1, 0, 1, 0, 1, 0, 1, 0]

nodes [86, 23, 16, 32, 44, 55, 93, 75]


if input = 1 shift 0 right 1 left

if input = 0 do nothing


shift elements by input = 1


list [1, 3, 5, 7, 2, 4, 6, 8]

list [1, 1, 1, 1, 0, 0, 0, 0]

nodes [86, 16, 44, 93, 23, 32, 55, 75]


discard element 8 node

add a new node to beginning of the list

nodes [36, 86, 16, 44, 93, 23, 32, 55]


add new input and repeat

add inputs greater than half

Sort python program:
import random

e = 64
n = 256

node = []
state = []
input = []

def node_state():
    global state
    new_state = [0] * n  # Initialize a new state list

    for i in range(n):  # Iterate through each node
        c = 0
        for q in range(e): # Iterate through each element
            c += state[node[q]]
        if c >= 32:
            new_state = 1 # Update new_state for the corresponding node
        else :
            new_state = 0  # Update new_state for the corresponding node
            
    state = new_state[:]  # Update states from new states

def shift_elements(elements, input, nodes):
    shifted_elements = []
    shifted_nodes = []
    shifted_inputs = []
    for i in range(len(input)):
        if input[i] == 1:
            shifted_elements.insert(0, elements[i])  # Insert at the beginning
            shifted_nodes.insert(0, nodes[i])  # Insert at the beginning
            shifted_inputs.insert(0, input[i])  # Insert at the beginning
        else:
            shifted_elements.append(elements[i])  # Append at the end
            shifted_nodes.append(nodes[i])  # Append at the end
            shifted_inputs.append(input[i])  # Append at the end
    return shifted_elements, shifted_nodes, shifted_inputs

def discard_last_element_and_add_node(elements, nodes):
    elements.pop()  # Discard last element
    nodes.pop(0)  # Remove first node
    new_node = random.randint(1, e)  # Generate a new random node
    nodes.insert(0, new_node)  # Add new node to the beginning

# Initial setup
elements = [i for i in range(0, e)]
input = [random.randint(0, 1) for _ in range(e)]
nodes = [random.randint(1, e) for _ in range(e)]
print("Elements:", elements)
print("Nodes:", nodes)
print("Inputs:", input)

# Shift elements and nodes based on input
shifted_elements, shifted_nodes, shifted_inputs = shift_elements(elements, input, nodes)
print("Shifted Elements:", shifted_elements)
print("Shifted Nodes:", shifted_nodes)
print("Shifted Inputs:", shifted_inputs)

# Discard the last element node and add a new node
discard_last_element_and_add_node(shifted_elements, shifted_nodes)
print("Nodes after discarding the last element and adding new node:", shifted_nodes)

# Update node state
node_state()
print("Updated State:", state)
 

Black Rose

An unbreakable bond
Local time
Yesterday 11:27 PM
Joined
Apr 4, 2010
Messages
11,431
---
Location
with mama
I am not getting this right but I keep trying.

Next Step:
import random

e = 64 # Number of elements in each node state
n = 256 # Number of nodes

# Initialize nodes with binary states
node = [[random.randint(0, 64) for _ in range(e)] for _ in range(n)]

# Initialize a list of nodes connected to other nodes
# Each element represents a connection to another node
node_list = [[random.randint(0, n-1) for _ in range(e)] for _ in range(n)]

temp_state1 = [[0] * e for _ in range(n)]
temp_state2 = [[0] * e for _ in range(n)]

# Update node states based on connected nodes
def node_state():
    global node, node_list

    for i in range(n):
        for q in range(e):
            c = sum(node[node_list[i][p]][p] for p in range(e))
            if c >= 32:
               temp_state1[i][q] = 64
            else:
               temp_state1[i][q] = 0
    
    node[:][:] = temp_state1[:][:]

# node-list contains all nodes connected to (n) nodes
# shift each element right if 0 several times to get all (1)'s left - 1 and 0 are the node states.
    
    temp_state2[:][:] = node[:][:]
    
    for i in range(n):
        for x in range(e):
            for q in range(e-1):
                if temp_state2[i][q] <= temp_state2[i][q+1]:   
                   temp1 = node_list[i][q]
                   temp2 = node_list[i][q+1]
                   node_list[i][q] = temp2
                   node_list[i][q+1] = temp1          
    
# Add a new node as a connection to node_list 
    new_node = random.randint(0, n)
    for i in range(n):
        node_list[i][0] = new_node

# Update node state
for _ in range(10):  # Run for a fixed number of iterations for demonstration
    node_state()
    print("Nodes after update:", node[8][:])
 

Black Rose

An unbreakable bond
Local time
Yesterday 11:27 PM
Joined
Apr 4, 2010
Messages
11,431
---
Location
with mama
So far nothing but (1)s all the way.

But it seems all the numbers go in the correct order.

almost complete algorithm:
import random

e = 64 # Number of elements in each node state
n = 256 # Number of nodes

# Initialize nodes with binary states
node = [[random.randint(0, 1) for _ in range(e)] for _ in range(n)]

# Initialize a list of nodes connected to other nodes
# Each element represents a connection to another node
node_list = [[random.randint(0, n - 1) for _ in range(e)] for _ in range(n)]

def input_data():
    for i in range(16):
        for q in range(e):
            node[i][q] = random.randint(0, 1)

# Update node states based on connected nodes

def node_state1():
    global node, node_list

    temp_state1 = [[0] * e for _ in range(n)]

    for i in range(n):
        for q in range(e):
            c = sum(node[node_list[i][p]][p] for p in range(e))
            if c >= 32:
               temp_state1[i][q] = 1
            else:
               temp_state1[i][q] = 0
    
    node = temp_state1

# node-list contains all nodes connected to (n) nodes
# shift each element right if they are 0

def node_state2():

    temp_state2 = [row[:] for row in node]  # Make a copy of the current node state
    for i in range(n):
        for x in range(e):
            for q in range(e - 1):
                if temp_state2[i][q] == 0 and temp_state2[i][q+1] == 1:
                   temp_state2[i][q] = 1
                   temp_state2[i][q+1] = 0
                   temp1 = node_list[i][q]
                   temp2 = node_list[i][q+1]
                   node_list[i][q] = temp2
                   node_list[i][q+1] = temp1         
    
# Add new nodes as a connection to node_list
    for i in range(n):
        for q in range(e // 4):
            node_list[i][q] = random.randint(0, n - 2)

# Update node state
for _ in range(10):  # Run for a fixed number of iterations for demonstration
    input_data()
    node_state1()
    node_state2()
    print("Nodes after update:",_, node[32][:])
 

dr froyd

__________________________________________________
Local time
Today 6:27 AM
Joined
Jan 26, 2015
Messages
1,485
---
ak, you're doing great, but i would recommend you comment what the algorithm actually does. I.e. what the input/output is, what problem it solves
 

Black Rose

An unbreakable bond
Local time
Yesterday 11:27 PM
Joined
Apr 4, 2010
Messages
11,431
---
Location
with mama
ak, you're doing great, but i would recommend you comment what the algorithm actually does. I.e. what the input/output is, what problem it solves

The algorithm is supposed to create a latent space.

"In machine learning, latent space is a mathematical representation of data that groups similar items together. It's a lower-dimensional representation of high-dimensional data." - Google

A real-time latent space can be searched to anticipate future conditions.

The way to do this would be most efficient by making it into a hierarchical tree.

It would build up hypothetical representations it has not seen yet and organize itself to meta-learn future states.

Representations can be tested at all levels to see if they match these predictions.

This way it can learn in real time.
 

PeopleDoSuck

Member
Local time
Today 1:27 AM
Joined
Jan 11, 2024
Messages
29
---
Hi, I tried to read your code, but I'm just unsure what you are trying to do with it.

My suggestion is to outline all the details and make sure your code is matching them. Maybe start with a block diagram or flow chart of what you want everything to do with an explanation in English language. So you'd be writing out the algorithm with all the details in regular language and not worrying about the code yet. Then it should be easier to translate that to the actual Python code because you will already know all the details of exactly what your algorithm is supposed to do. This is generally how software developers write code (or at least when it's done well).

Then if you still have problems, you can at least come back and somebody should be able to notice something.
 
Top Bottom