Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
# app.py
|
| 2 |
# Author: Liam Grinstead
|
| 3 |
-
# RFT simulation runner
|
| 4 |
|
| 5 |
from modules.agent_spawner import spawn_agent
|
| 6 |
from modules.mutation_engine import mutate_agent
|
|
@@ -10,20 +9,15 @@ from modules.codex_logger import log_artifact
|
|
| 10 |
from modules.codex_viewer import load_codex
|
| 11 |
|
| 12 |
def run_simulation(agent_id, mutation_profile):
|
| 13 |
-
# Spawn base agent
|
| 14 |
agent = spawn_agent(agent_id)
|
| 15 |
-
|
| 16 |
-
# Apply mutation profile
|
| 17 |
mutated = mutate_agent(agent, mutation_profile)
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
# Run falsifiability scoring
|
| 23 |
score, hash_val = run_falsifiability(mutated)
|
| 24 |
-
|
| 25 |
-
# Log artifact
|
| 26 |
log_artifact(mutated, score, hash_val)
|
| 27 |
-
|
| 28 |
-
# Return mutated agent and hash (interface.py expects this)
|
| 29 |
return mutated, hash_val
|
|
|
|
| 1 |
# app.py
|
| 2 |
# Author: Liam Grinstead
|
|
|
|
| 3 |
|
| 4 |
from modules.agent_spawner import spawn_agent
|
| 5 |
from modules.mutation_engine import mutate_agent
|
|
|
|
| 9 |
from modules.codex_viewer import load_codex
|
| 10 |
|
| 11 |
def run_simulation(agent_id, mutation_profile):
|
|
|
|
| 12 |
agent = spawn_agent(agent_id)
|
|
|
|
|
|
|
| 13 |
mutated = mutate_agent(agent, mutation_profile)
|
| 14 |
|
| 15 |
+
# optional visualization step
|
| 16 |
+
try:
|
| 17 |
+
render_fields(mutated)
|
| 18 |
+
except Exception:
|
| 19 |
+
pass
|
| 20 |
|
|
|
|
| 21 |
score, hash_val = run_falsifiability(mutated)
|
|
|
|
|
|
|
| 22 |
log_artifact(mutated, score, hash_val)
|
|
|
|
|
|
|
| 23 |
return mutated, hash_val
|