Cascade Bot commited on
Commit
05c0fea
·
1 Parent(s): 47bf9f3

fix: standardize strategy class names

Browse files

- Renamed all strategy classes to follow [Type]Strategy pattern
- Updated imports in unified_engine.py and __init__.py
- Fixed class name inconsistencies across the codebase

reasoning/__init__.py CHANGED
@@ -32,18 +32,18 @@ from .base import ReasoningStrategy, StrategyResult
32
  # Core reasoning strategies
33
  from .chain_of_thought import ChainOfThoughtStrategy
34
  from .tree_of_thoughts import TreeOfThoughtsStrategy
35
- from .recursive import RecursiveReasoning
36
- from .analogical import AnalogicalReasoning
37
  from .meta_learning import MetaLearningStrategy
38
  from .local_llm import LocalLLMStrategy
39
 
40
  # Advanced reasoning strategies
41
- from .multimodal import MultimodalStrategy as MultiModalReasoning
42
  from .bayesian import BayesianStrategy
43
- from .quantum import QuantumStrategy as QuantumReasoning
44
- from .neurosymbolic import NeurosymbolicReasoning
45
- from .emergent import EmergentReasoning
46
- from .specialized import SpecializedReasoning
47
 
48
  # Domain-specific strategies
49
  from .market_analysis import MarketAnalysisStrategy
@@ -65,18 +65,18 @@ __all__ = [
65
  # Core reasoning
66
  'ChainOfThoughtStrategy',
67
  'TreeOfThoughtsStrategy',
68
- 'RecursiveReasoning',
69
- 'AnalogicalReasoning',
70
  'MetaLearningStrategy',
71
  'LocalLLMStrategy',
72
 
73
  # Advanced reasoning
74
- 'MultiModalReasoning',
75
  'BayesianStrategy',
76
- 'QuantumReasoning',
77
- 'NeurosymbolicReasoning',
78
- 'EmergentReasoning',
79
- 'SpecializedReasoning',
80
 
81
  # Domain-specific
82
  'MarketAnalysisStrategy',
 
32
  # Core reasoning strategies
33
  from .chain_of_thought import ChainOfThoughtStrategy
34
  from .tree_of_thoughts import TreeOfThoughtsStrategy
35
+ from .recursive import RecursiveReasoningStrategy
36
+ from .analogical import AnalogicalReasoningStrategy
37
  from .meta_learning import MetaLearningStrategy
38
  from .local_llm import LocalLLMStrategy
39
 
40
  # Advanced reasoning strategies
41
+ from .multimodal import MultimodalStrategy
42
  from .bayesian import BayesianStrategy
43
+ from .quantum import QuantumStrategy
44
+ from .neurosymbolic import NeurosymbolicReasoningStrategy
45
+ from .emergent import EmergentReasoningStrategy
46
+ from .specialized import SpecializedReasoningStrategy
47
 
48
  # Domain-specific strategies
49
  from .market_analysis import MarketAnalysisStrategy
 
65
  # Core reasoning
66
  'ChainOfThoughtStrategy',
67
  'TreeOfThoughtsStrategy',
68
+ 'RecursiveReasoningStrategy',
69
+ 'AnalogicalReasoningStrategy',
70
  'MetaLearningStrategy',
71
  'LocalLLMStrategy',
72
 
73
  # Advanced reasoning
74
+ 'MultimodalStrategy',
75
  'BayesianStrategy',
76
+ 'QuantumStrategy',
77
+ 'NeurosymbolicReasoningStrategy',
78
+ 'EmergentReasoningStrategy',
79
+ 'SpecializedReasoningStrategy',
80
 
81
  # Domain-specific
82
  'MarketAnalysisStrategy',
reasoning/analogical.py CHANGED
@@ -1,4 +1,4 @@
1
- """Analogical reasoning implementation with advanced pattern matching and transfer learning."""
2
 
3
  import logging
4
  from typing import Dict, Any, List, Optional, Set, Tuple, Callable
@@ -65,15 +65,13 @@ class AnalogicalSolution:
65
  metadata: Dict[str, Any] = field(default_factory=dict)
66
  timestamp: str = field(default_factory=lambda: datetime.now().isoformat())
67
 
68
- class AnalogicalReasoning(ReasoningStrategy):
69
- """
70
- Advanced Analogical Reasoning implementation with:
71
- - Multi-level pattern matching
72
- - Sophisticated similarity metrics
73
- - Transfer learning capabilities
74
- - Dynamic adaptation mechanisms
75
- - Quality assessment
76
- - Learning from experience
77
  """
78
 
79
  def __init__(self, config: Optional[Dict[str, Any]] = None):
 
1
+ """Analogical reasoning strategy implementation."""
2
 
3
  import logging
4
  from typing import Dict, Any, List, Optional, Set, Tuple, Callable
 
65
  metadata: Dict[str, Any] = field(default_factory=dict)
66
  timestamp: str = field(default_factory=lambda: datetime.now().isoformat())
67
 
68
+ class AnalogicalStrategy(ReasoningStrategy):
69
+ """Advanced analogical reasoning that:
70
+ 1. Identifies relevant analogies
71
+ 2. Maps relationships
72
+ 3. Transfers knowledge
73
+ 4. Validates mappings
74
+ 5. Refines analogies
 
 
75
  """
76
 
77
  def __init__(self, config: Optional[Dict[str, Any]] = None):
reasoning/emergent.py CHANGED
@@ -1,20 +1,23 @@
1
  """
2
- Emergent Reasoning Module
3
- ------------------------
4
- Implements emergent reasoning capabilities that arise from the interaction
5
- of multiple reasoning strategies and patterns.
6
  """
7
 
 
8
  from typing import Dict, Any, List, Optional
 
 
9
  from .base import ReasoningStrategy
10
  from .meta_learning import MetaLearningStrategy
11
  from .chain_of_thought import ChainOfThoughtStrategy
12
  from .tree_of_thoughts import TreeOfThoughtsStrategy
13
 
14
- class EmergentReasoning(ReasoningStrategy):
15
- """
16
- A reasoning strategy that combines multiple approaches to discover
17
- emergent patterns and solutions.
 
 
 
18
  """
19
 
20
  def __init__(self, config: Optional[Dict[str, Any]] = None):
 
1
  """
2
+ Emergent reasoning strategy implementation.
 
 
 
3
  """
4
 
5
+ import logging
6
  from typing import Dict, Any, List, Optional
7
+ from datetime import datetime
8
+
9
  from .base import ReasoningStrategy
10
  from .meta_learning import MetaLearningStrategy
11
  from .chain_of_thought import ChainOfThoughtStrategy
12
  from .tree_of_thoughts import TreeOfThoughtsStrategy
13
 
14
+ class EmergentStrategy(ReasoningStrategy):
15
+ """Advanced emergent reasoning that:
16
+ 1. Identifies patterns
17
+ 2. Discovers relationships
18
+ 3. Generates insights
19
+ 4. Adapts to complexity
20
+ 5. Evolves understanding
21
  """
22
 
23
  def __init__(self, config: Optional[Dict[str, Any]] = None):
reasoning/multimodal.py CHANGED
@@ -1,4 +1,4 @@
1
- """Advanced multimodal reasoning combining different types of information."""
2
 
3
  import logging
4
  from typing import Dict, Any, List, Optional, Set, Union, Type, Tuple
@@ -40,13 +40,12 @@ class ModalityAlignment:
40
  timestamp: str = field(default_factory=lambda: datetime.now().isoformat())
41
 
42
  class MultimodalStrategy(ReasoningStrategy):
43
- """
44
- Advanced multimodal reasoning that:
45
- 1. Processes different types of information
46
- 2. Aligns cross-modal features
47
- 3. Integrates multimodal context
48
- 4. Generates coherent responses
49
- 5. Handles uncertainty
50
  """
51
 
52
  def __init__(self, config: Optional[Dict[str, Any]] = None):
 
1
+ """Multimodal reasoning strategy implementation."""
2
 
3
  import logging
4
  from typing import Dict, Any, List, Optional, Set, Union, Type, Tuple
 
40
  timestamp: str = field(default_factory=lambda: datetime.now().isoformat())
41
 
42
  class MultimodalStrategy(ReasoningStrategy):
43
+ """Advanced multimodal reasoning that:
44
+ 1. Processes multiple input types
45
+ 2. Combines modalities
46
+ 3. Extracts cross-modal patterns
47
+ 4. Generates multimodal insights
48
+ 5. Validates consistency
 
49
  """
50
 
51
  def __init__(self, config: Optional[Dict[str, Any]] = None):
reasoning/neurosymbolic.py CHANGED
@@ -28,7 +28,7 @@ class SymbolicRule:
28
  confidence: float
29
  metadata: Dict[str, Any] = field(default_factory=dict)
30
 
31
- class NeurosymbolicReasoning(ReasoningStrategy):
32
  """
33
  Advanced neurosymbolic reasoning that:
34
  1. Extracts neural features
 
28
  confidence: float
29
  metadata: Dict[str, Any] = field(default_factory=dict)
30
 
31
+ class NeurosymbolicStrategy(ReasoningStrategy):
32
  """
33
  Advanced neurosymbolic reasoning that:
34
  1. Extracts neural features
reasoning/recursive.py CHANGED
@@ -1,4 +1,4 @@
1
- """Recursive reasoning implementation with advanced decomposition and synthesis."""
2
 
3
  import logging
4
  from typing import Dict, Any, List, Optional, Set, Tuple, Callable
@@ -54,14 +54,13 @@ class RecursiveStep:
54
  result: Dict[str, Any]
55
  timestamp: str = field(default_factory=lambda: datetime.now().isoformat())
56
 
57
- class RecursiveReasoning(ReasoningStrategy):
58
- """
59
- Advanced Recursive Reasoning implementation with:
60
- - Dynamic problem decomposition
61
- - Parallel subproblem solving
62
- - Solution synthesis
63
- - Cycle detection
64
- - Optimization strategies
65
  """
66
 
67
  def __init__(self, config: Optional[Dict[str, Any]] = None):
 
1
+ """Recursive reasoning strategy implementation."""
2
 
3
  import logging
4
  from typing import Dict, Any, List, Optional, Set, Tuple, Callable
 
54
  result: Dict[str, Any]
55
  timestamp: str = field(default_factory=lambda: datetime.now().isoformat())
56
 
57
+ class RecursiveStrategy(ReasoningStrategy):
58
+ """Advanced recursive reasoning that:
59
+ 1. Breaks down complex problems
60
+ 2. Solves sub-problems recursively
61
+ 3. Combines solutions
62
+ 4. Handles base cases
63
+ 5. Optimizes performance
 
64
  """
65
 
66
  def __init__(self, config: Optional[Dict[str, Any]] = None):
reasoning/specialized.py CHANGED
@@ -11,7 +11,7 @@ from collections import defaultdict
11
 
12
  from .base import ReasoningStrategy
13
 
14
- class SpecializedReasoning(ReasoningStrategy):
15
  """
16
  A composite reasoning strategy that combines multiple specialized strategies
17
  for different domains and tasks.
 
11
 
12
  from .base import ReasoningStrategy
13
 
14
+ class SpecializedStrategy(ReasoningStrategy):
15
  """
16
  A composite reasoning strategy that combines multiple specialized strategies
17
  for different domains and tasks.
reasoning/unified_engine.py CHANGED
@@ -30,9 +30,9 @@ from .bayesian import BayesianStrategy
30
  from .market_analysis import MarketAnalysisStrategy
31
  from .monetization import MonetizationStrategy
32
  from .multimodal import MultimodalStrategy
33
- from .neurosymbolic import NeurosymbolicStrategy
34
  from .portfolio_optimization import PortfolioOptimizationStrategy
35
- from .specialized import SpecializedStrategy
36
  from .venture_strategies import VentureStrategy
37
  from .venture_types import VentureTypeStrategy
38
 
 
30
  from .market_analysis import MarketAnalysisStrategy
31
  from .monetization import MonetizationStrategy
32
  from .multimodal import MultimodalStrategy
33
+ from .neurosymbolic import NeurosymbolicReasoning as NeurosymbolicStrategy
34
  from .portfolio_optimization import PortfolioOptimizationStrategy
35
+ from .specialized import SpecializedReasoning as SpecializedStrategy
36
  from .venture_strategies import VentureStrategy
37
  from .venture_types import VentureTypeStrategy
38