 Dict[str, Any]) -> float:
        """
        Assess how salient the content is
        
        Returns: Salience score between 0 and 1
        """
        urgency_score = self._assess_urgency(metadata.get('urgency', 'low'))
        novelty_score = self._assess_novelty(content)
        importance_score = self._assess_importance(content, metadata)
        
        return (urgency_score + novelty_score + importance_score) / 3.0
    
    def _assess_urgency(self, level: str) -> float:
        """Assess urgency level"""
        try:
            return self._thresholds[level] / 10.0
        except KeyError:
            return 0.2
    
    def _assess_novelty(self, content: str) -> float:
        """Assess novelty based on previous focuses"""
        if content in self._previous_focuses:
            return 0.1
        self._previous_focuses.append(content)
        if len(self._previous_focuses) > 10:
            self._previous_focuses.pop(0)
        return 0.5
    
    def _assess_importance(self, content: str, metadata: Dict[str, Any]) -> float:
        """Assess importance based on keywords"""
        important_words = ['critical', 'urgent', 'priority', 'important']
        if any(word in content.lower() for word in important_words):
            return 0.4
        if metadata.get('priority') == 'high':
            return 0.35
        return 0.2


class GoalTracker:
    """Tracks goals and prioritizes focuses based on goal alignment"""
    
    def __init__(self):
        self._goals: Dict[str, float] = {}
        self._goal_weights: Dict[str, float] = {
            'survival': 0.4,
            'reproduction': 0.3,
            'exploration': 0.2,
            'exploitation': 0.1
        }
    
    def add_goal(self, goal_id: str, priority: float):
        """Add or update a goal with priority score"""
        self._goals[goal_id] = priority
    
    def get_active_goals(self) -> List[str]:
        """Get list of active goal IDs"""
        return list(self._goals.keys())
    
    def assess_relevance_to_goal(self, content: str, goal_id: str) -> float:
        """
        Assess how relevant the content is to a goal
        
        Returns: Relevance score between 0 and 1
        """
        if goal_id not in self._goals:
            return 0.0
        
        # Simple keyword matching for demonstration
        relevance_keywords = {
            'survival': ['food', 'water', 'danger', 'escape'],
            'reproduction': ['mate', 'breed', 'offspring', 'sex'],
            'exploration': ['discover', 'explore', 'map', 'new'],
            'exploitation': ['resource', 'profit', 'gain', 'benefit']
        }
        
        keywords = relevance_keywords.get(goal_id, [])
        content_lower = content.lower()
        matched_count = sum(1 for word in keywords if word in content_lower)
        
        return min(matched_count / len(keywords), 1.0) * self._goal_weights[goal_id]


class AttentionController:
    """
    Selective attention controller
    Manages focus based on salience and goal alignment
    """
    
    d