File size: 2,619 Bytes
a80c9f6
 
4bfd01e
 
a80c9f6
 
4bfd01e
a80c9f6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
"""Inspect champion model capabilities."""
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

try:
    import champion_gen42 as champ
    
    print('=== MODULE ATTRIBUTES ===')
    print(f'_QUINE_HASH: {getattr(champ, "_QUINE_HASH", "N/A")}')
    print(f'_GENERATION: {getattr(champ, "_GENERATION", "N/A")}')
    print(f'_FITNESS: {getattr(champ, "_FITNESS", "N/A")}')
    
    traits = getattr(champ, '_TRAITS', {})
    print(f'_TRAITS keys: {list(traits.keys())[:10]}')
    
    print('\n=== MODULE EXPORTS ===')
    exports = [x for x in dir(champ) if not x.startswith('_')]
    for e in exports:
        obj = getattr(champ, e)
        print(f'  {e}: {type(obj).__name__}')
    
    print('\n=== CAPSULEAGENT CLASS ===')
    if hasattr(champ, 'CapsuleAgent'):
        CapsuleAgent = champ.CapsuleAgent
        methods = [m for m in dir(CapsuleAgent) if not m.startswith('_') and callable(getattr(CapsuleAgent, m, None))]
        print(f'Methods: {methods}')
    
    print('\n=== TRYING TO INSTANTIATE ===')
    if hasattr(champ, 'CapsuleAgent'):
        agent = champ.CapsuleAgent(observe=False, observe_visual=False)
        print(f'Agent created: {type(agent).__name__}')
        
        # Check what methods the instance has
        instance_methods = [m for m in dir(agent) if not m.startswith('_') and callable(getattr(agent, m, None))]
        print(f'Instance methods: {instance_methods}')
        
        # Check specific capabilities
        print('\n=== CAPABILITIES ===')
        print(f'has forward: {hasattr(agent, "forward")}')
        print(f'has imagine: {hasattr(agent, "imagine") or (hasattr(agent, "brain") and hasattr(agent.brain, "imagine"))}')
        print(f'has export_pt: {hasattr(agent, "export_pt")}')
        print(f'has export_onnx: {hasattr(agent, "export_onnx")}')
        print(f'has replicate_quine: {hasattr(agent, "replicate_quine")}')
        print(f'has get_quine_brain: {hasattr(agent, "get_quine_brain")}')
        print(f'has verify_quine_integrity: {hasattr(agent, "verify_quine_integrity")}')
        
        # Check brain
        if hasattr(agent, 'brain'):
            print(f'\n=== BRAIN ===')
            print(f'Brain type: {type(agent.brain).__name__}')
            brain_methods = [m for m in dir(agent.brain) if not m.startswith('_') and callable(getattr(agent.brain, m, None))]
            print(f'Brain methods: {brain_methods[:15]}...')
            
except Exception as e:
    import traceback
    print(f'Error: {e}')
    traceback.print_exc()