"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-08 17:07:02.294752
"""

```python
class ReasoningEngine:
    """
    A simple reasoning engine that applies rules based on predefined conditions.
    
    This engine is designed to handle a limited set of logical operations, such as AND and OR,
    to determine outcomes based on input criteria.

    Args:
        rules (dict): A dictionary where keys are conditions represented as strings
                      and values are the corresponding outcomes also represented as strings.
        
    Example usage:

        rules = {
            'age >= 18 AND income > 5000': 'approve_loan',
            'income < 3000 OR credit_score <= 600': 'reject_loan'
        }

        engine = ReasoningEngine(rules)
        decision = engine.reason('25, 4500, 750')
        
        print(decision)  # Output: reject_loan
    """

    def __init__(self, rules):
        self.rules = rules

    def reason(self, inputs_str: str) -> str:
        """
        Evaluate the input against the defined rules and return the outcome.
        
        Args:
            inputs_str (str): A string containing comma-separated values that will be used
                              as input for evaluating the conditions in the rules.

        Returns:
            str: The outcome determined by matching the input against the rules.
        """
        inputs = [int(value) for value in inputs_str.split(', ')]
        
        for condition, outcome in self.rules.items():
            if eval(condition, {}, {'inputs': inputs}):
                return outcome
        return 'unknown'

# Example usage
rules = {
    'age >= 18 and income > 5000': 'approve_loan',
    'income < 3000 or credit_score <= 600': 'reject_loan'
}

engine = ReasoningEngine(rules)
decision = engine.reason('25, 4500, 750')
print(decision)  # Output: reject_loan
```