FerrellSyntheticIntelligence
feat: audio ear, cognition modules, dream engine, vitalis IDE, test encoder
63dd1f4 | from ..dream_engine.helix_memory import HelixMemory | |
| import numpy as np | |
| class ReasoningEngine: | |
| MODE_MAP = { | |
| "question": "EXECUTION", | |
| "instruction": "RECOVERY", | |
| "explanation": "ANALYTICAL", | |
| "unknown": "EXPLORATORY", | |
| } | |
| def __init__(self, helix_path): | |
| self.helix = HelixMemory(helix_path) | |
| def select_mode(self, hv: np.ndarray) -> str: | |
| prototypes = self.helix.retrieve(hv, top_k=1) | |
| if not prototypes: | |
| return "EXPLORATORY" | |
| proto, meta = prototypes[0] | |
| label = meta.get("label", "unknown") | |
| return self.MODE_MAP.get(label, "EXPLORATORY") | |