| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | from typing import Dict, List, Tuple |
| |
|
| | |
| | EMOTION_ANCHORS: Dict[str, List[str]] = { |
| | |
| | "FEAR": [ |
| | "fear", "terror", "panic", "anxiety", "dread", "horror", |
| | "unease", "paranoia", "worry", "nervous", "scared", |
| | "frightened", "alarmed", "tense", "apprehensive", |
| | "threatened", "vulnerable", "insecure", "timid", "wary", |
| | ], |
| |
|
| | |
| | "LOVE": [ |
| | "love", "warmth", "tenderness", "devotion", "longing", |
| | "yearning", "affection", "care", "intimacy", "attachment", |
| | "adoration", "passion", "fondness", "cherish", "desire", |
| | "compassion", "gentle", "sweet", |
| | ], |
| |
|
| | |
| | "RAGE": [ |
| | "anger", "rage", "fury", "hatred", "spite", "disgust", |
| | "irritation", "frustration", "resentment", "hostility", |
| | "aggression", "bitterness", "contempt", "loathing", |
| | "annoyance", "outrage", "wrath", |
| | ], |
| |
|
| | |
| | "VOID": [ |
| | "emptiness", "numbness", "hollow", "nothing", "absence", |
| | "void", "dissociation", "detachment", "apathy", |
| | "indifference", "drift", "blank", "flat", "dead", "cold", |
| | ], |
| |
|
| | |
| | "FLOW": [ |
| | "curiosity", "surprise", "wonder", "confusion", |
| | "anticipation", "ambivalence", "uncertainty", "restless", |
| | "searching", "transition", "shift", "change", "flux", |
| | "between", "liminal", |
| | ], |
| |
|
| | |
| | "COMPLEX": [ |
| | "shame", "guilt", "envy", "jealousy", "pride", |
| | "disappointment", "betrayal", "relief", "nostalgia", |
| | "bittersweet", "melancholy", "regret", "hope", |
| | "gratitude", "awe", |
| | ], |
| | } |
| |
|
| | |
| | CHAMBER_NAMES = ["FEAR", "LOVE", "RAGE", "VOID"] |
| |
|
| | |
| | CHAMBER_NAMES_EXTENDED = ["FEAR", "LOVE", "RAGE", "VOID", "FLOW", "COMPLEX"] |
| |
|
| | |
| | |
| | |
| | COUPLING_MATRIX = [ |
| | |
| | [ 0.0, -0.3, +0.6, +0.4 ], |
| | [ -0.3, 0.0, -0.6, -0.5 ], |
| | [ +0.3, -0.4, 0.0, +0.2 ], |
| | [ +0.5, -0.7, +0.3, 0.0 ], |
| | ] |
| |
|
| | |
| | |
| | |
| | COUPLING_MATRIX_EXTENDED = [ |
| | |
| | [ 0.0, -0.3, +0.6, +0.4, -0.2, +0.3 ], |
| | [ -0.3, 0.0, -0.6, -0.5, +0.3, +0.4 ], |
| | [ +0.3, -0.4, 0.0, +0.2, -0.3, +0.2 ], |
| | [ +0.5, -0.7, +0.3, 0.0, -0.4, +0.5 ], |
| | [ -0.2, +0.2, -0.2, -0.3, 0.0, +0.2 ], |
| | [ +0.3, +0.2, +0.2, +0.3, +0.1, 0.0 ], |
| | ] |
| |
|
| |
|
| | def get_all_anchors() -> List[str]: |
| | """Get flat list of all 100 emotion anchors.""" |
| | anchors = [] |
| | for chamber_anchors in EMOTION_ANCHORS.values(): |
| | anchors.extend(chamber_anchors) |
| | return anchors |
| |
|
| |
|
| | def get_anchor_to_chamber() -> Dict[str, str]: |
| | """Map each anchor word to its chamber.""" |
| | mapping = {} |
| | for chamber, words in EMOTION_ANCHORS.items(): |
| | for word in words: |
| | mapping[word] = chamber |
| | return mapping |
| |
|
| |
|
| | def get_anchor_index(anchor: str) -> int: |
| | """Get the index (0-99) of an anchor word.""" |
| | all_anchors = get_all_anchors() |
| | try: |
| | return all_anchors.index(anchor) |
| | except ValueError: |
| | raise ValueError(f"Unknown anchor: {anchor}") |
| |
|
| |
|
| | def get_chamber_ranges() -> Dict[str, Tuple[int, int]]: |
| | """ |
| | Get the index ranges for each chamber in the 100D resonance vector. |
| | |
| | Returns: |
| | Dict mapping chamber name to (start_idx, end_idx) tuple. |
| | |
| | Example: |
| | {"FEAR": (0, 20), "LOVE": (20, 38), ...} |
| | """ |
| | ranges = {} |
| | idx = 0 |
| | for chamber, words in EMOTION_ANCHORS.items(): |
| | start = idx |
| | end = idx + len(words) |
| | ranges[chamber] = (start, end) |
| | idx = end |
| | return ranges |
| |
|
| |
|
| | def get_chamber_for_anchor(anchor: str) -> str: |
| | """Get the chamber name for a given anchor word.""" |
| | mapping = get_anchor_to_chamber() |
| | return mapping.get(anchor, "UNKNOWN") |
| |
|
| |
|
| | |
| | assert len(get_all_anchors()) == 100, "Must have exactly 100 anchors" |
| | assert len(CHAMBER_NAMES) == 4, "Must have exactly 4 base chambers" |
| | assert len(CHAMBER_NAMES_EXTENDED) == 6, "Must have exactly 6 extended chambers" |
| | assert len(COUPLING_MATRIX) == 4, "Coupling matrix must be 4x4" |
| | assert all(len(row) == 4 for row in COUPLING_MATRIX), "Coupling matrix must be 4x4" |
| | assert len(COUPLING_MATRIX_EXTENDED) == 6, "Extended coupling matrix must be 6x6" |
| | assert all(len(row) == 6 for row in COUPLING_MATRIX_EXTENDED), "Extended coupling matrix must be 6x6" |
| |
|
| |
|
| | if __name__ == "__main__": |
| | print("=" * 60) |
| | print(" CLOUD v3.0 β Emotion Anchors") |
| | print("=" * 60) |
| | print() |
| |
|
| | |
| | print("Chamber distribution:") |
| | for chamber, words in EMOTION_ANCHORS.items(): |
| | print(f" {chamber:8s}: {len(words):2d} anchors") |
| | print(f" {'TOTAL':8s}: {len(get_all_anchors()):2d} anchors") |
| | print() |
| |
|
| | |
| | print("Chamber ranges in 100D vector:") |
| | for chamber, (start, end) in get_chamber_ranges().items(): |
| | print(f" {chamber:8s}: [{start:2d}:{end:2d}]") |
| | print() |
| |
|
| | |
| | print("Coupling matrix (cross-fire influence):") |
| | print(" ", " ".join(f"{name:6s}" for name in CHAMBER_NAMES)) |
| | for i, row_name in enumerate(CHAMBER_NAMES): |
| | values = " ".join(f"{val:+6.1f}" for val in COUPLING_MATRIX[i]) |
| | print(f" {row_name:6s} {values}") |
| | print() |
| |
|
| | |
| | print("Sample anchors from each chamber:") |
| | for chamber, words in EMOTION_ANCHORS.items(): |
| | sample = words[:5] |
| | print(f" {chamber:8s}: {', '.join(sample)}...") |
| | print() |
| |
|
| | print("=" * 60) |
| | print(" Chambers ready. Cross-fire enabled.") |
| | print("=" * 60) |
| |
|