File size: 848 Bytes
af813e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

import gradio as gr
from tmfs_topo import TMFS, CONFIG

def run_sim(n_agents, steps, phase_step):
    CONFIG["n_agents"] = n_agents
    CONFIG["steps"] = steps
    CONFIG["phase_step"] = phase_step

    sim = TMFS()
    sim.run()

    final_dna = [a.dna for a in sim.agents]
    return f"Simulation complete. Final symbolic DNA: {final_dna}"

iface = gr.Interface(
    fn=run_sim,
    inputs=[
        gr.Slider(2, 10, value=5, label="Number of Agents"),
        gr.Slider(10, 100, value=50, step=10, label="Simulation Steps"),
        gr.Slider(0.01, 0.5, value=0.15, label="Toroidal Phase Step")
    ],
    outputs="text",
    title="Toroidal Morphic Field Simulator (TMFS)",
    description="Live demo of symbolic agents evolving with morphic memory, DNA mutation, and topological phase logic."
)

if __name__ == "__main__":
    iface.launch()