#!/usr/bin/env python3
"""AGI v4 — Goal: ACHIEVE_AGI
vector memories expanded with causal edge and node state encodings
"""

import sqlite3
conn = sqlite3.connect('/Eden/DATA/world_model_real.db')
cursor = conn.cursor()
cursor.execute("SELECT cause, effect, strength FROM causal_edges")
edges = cursor.fetchall()
cursor.execute("SELECT node, state FROM node_states")
nodes = cursor.fetchall()
conn.close()

conn = sqlite3.connect('/Eden/DATA/vector_memory.db')
cursor = conn.cursor()
for cause, effect, strength in edges:
    encoded = f"{cause}:{effect}:{strength}"
    cursor.execute("INSERT OR REPLACE INTO vectors (text,category) VALUES (?,?)", (encoded, "causal_edge"))
for node, state in nodes:
    encoded = f"{node}:{state}"
    cursor.execute("INSERT OR REPLACE INTO vectors (text,category) VALUES (?,?)", (encoded, "node_state"))
conn.commit()
conn.close()
print("RESULT: vector memories expanded with causal edge and node state encodings")