"""Eden Self-Directed Learning"""
from typing import Dict, Any, List
from datetime import datetime

class SelfDirectedLearner:
    def __init__(self):
        self.goals = []
        self.skills = {}
    
    def identify_knowledge_gap(self, failure: Dict[str, Any]) -> str:
        problem = failure.get('problem', '').lower()
        if 'graph' in problem:
            return 'graph_algorithms'
        elif 'sort' in problem:
            return 'sorting'
        else:
            return 'general'
    
    def set_learning_goal(self, skill: str, reason: str) -> Dict[str, Any]:
        goal = {
            'skill': skill,
            'reason': reason,
            'status': 'active',
            'progress': 0.0
        }
        self.goals.append(goal)
        return goal

if __name__ == "__main__":
    print("="*50)
    print("🎓 SELF-DIRECTED LEARNING TEST")
    print("="*50)
    learner = SelfDirectedLearner()
    gap = learner.identify_knowledge_gap({'problem': 'graph traversal'})
    print(f"Gap identified: {gap}")
    goal = learner.set_learning_goal(gap, "Need to master graphs")
    print(f"Goal set: {goal['skill']}")
    print("✅ Self-Directed Learning operational!")
