from scientist_ai.knowledge_brain import KnowledgeBrain
from scientist_ai.hypothesis_brain import HypothesisBrain
from scientist_ai.critic_brain import CriticBrain
from scientist_ai.evolution_brain import EvolutionBrain

# Example: Scientist AI prototype workflow

def main():
    # 1. Initialize brains
    kb = KnowledgeBrain()
    hb = HypothesisBrain()
    cb = CriticBrain()
    eb = EvolutionBrain()

    # 2. Load some example knowledge
    kb.add_concept('Class number growth', {'type': 'concept', 'description': 'Growth of class numbers in number fields'})
    kb.add_concept('L-functions', {'type': 'concept', 'description': 'Complex functions encoding number-theoretic information'})
    kb.add_relation('Class number growth', 'L-functions', 'related_to')

    # 3. Generate hypotheses
    new_hyps = hb.generate(kb)
    print('Generated hypotheses:', new_hyps)

    # 4. Critic evaluates hypotheses
    for hyp in new_hyps:
        crit = cb.attack(hyp, kb)
        print('Critique:', crit)

    # 5. Evolution selects and mutates
    survivors = eb.evolve(new_hyps)
    print('Surviving hypotheses:', survivors)

if __name__ == '__main__':
    main()
