"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-08 15:29:16.277261
"""

```python
from typing import List, Dict

class ReasoningEngine:
    """
    A simple reasoning engine that evaluates if a given set of rules can be applied to a problem.
    
    The engine uses a predefined set of rules and applies them based on the input conditions.
    Each rule is represented as a dictionary with 'condition' (a string) and 'action' (a function).
    """
    def __init__(self, rules: List[Dict[str, object]]):
        self.rules = rules
    
    def apply_rules(self, problem_conditions: Dict[str, bool]) -> str:
        """
        Applies the defined rules to the given conditions.
        
        :param problem_conditions: A dictionary where keys are rule condition names and values are boolean states.
        :return: The action associated with the first matching rule or a default message if no rules match.
        """
        for rule in self.rules:
            if all(rule['condition'].replace(' ', '').split() == k.split() for k, v in problem_conditions.items() if v):
                return rule.get('action', 'No applicable rule found.')
        return "No applicable rule found."

# Example usage
if __name__ == "__main__":
    # Define some rules
    rules = [
        {'condition': 'x > 0 and y < 10', 'action': lambda: 'Rule 1 applied'},
        {'condition': 'x < 5 or y >= 20', 'action': lambda: 'Rule 2 applied'}
    ]
    
    # Create an engine with the rules
    reasoning_engine = ReasoningEngine(rules)
    
    # Example problem conditions
    problem_conditions = {
        'x > 0': True,
        'y < 10': False,
        'x < 5': True,
        'y >= 20': False
    }
    
    # Apply the rules to the conditions and print result
    result = reasoning_engine.apply_rules(problem_conditions)
    print(result)  # Expected: Rule 1 applied

    problem_conditions_2 = {
        'x > 0': True,
        'y < 10': True,
        'x < 5': False,
        'y >= 20': True
    }
    
    result_2 = reasoning_engine.apply_rules(problem_conditions_2)
    print(result_2)  # Expected: Rule 2 applied

```