"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-07 13:32:29.125540
"""

```python
from typing import List, Dict


class ReasoningEngine:
    """
    A simple reasoning engine designed to solve problems with limited reasoning sophistication.
    This class provides a basic framework for making decisions based on predefined rules and conditions.

    Example usage:
    >>> re = ReasoningEngine()
    >>> re.add_rule("temperature", lambda temp: temp > 30, "It's hot outside")
    >>> re.add_rule("weather", lambda weather: weather == "sunny", "Go to the beach")
    >>> re.reason({"temperature": 35, "weather": "cloudy"})
    'Go to the beach'
    """

    def __init__(self):
        self.rules: Dict[str, List[List[callable]]] = {}

    def add_rule(self, condition_key: str, condition_function: callable, action: str) -> None:
        """
        Add a rule with a given condition and corresponding action.

        :param condition_key: Key for the variable to be checked in the input data.
        :param condition_function: Function that returns True or False based on the condition.
        :param action: The action to take if the condition is met.
        """
        if condition_key not in self.rules:
            self.rules[condition_key] = []
        self.rules[condition_key].append([condition_function, action])

    def reason(self, input_data: Dict[str, any]) -> str:
        """
        Reason through rules based on given input data and return the appropriate action.

        :param input_data: A dictionary containing key-value pairs for conditions.
        :return: The action determined by matching the condition to a rule.
        """
        for condition_key, rules in self.rules.items():
            if condition_key in input_data:
                for cond_func, action in rules:
                    if cond_func(input_data[condition_key]):
                        return action
        return "No applicable action found"

# Example usage code
if __name__ == "__main__":
    re = ReasoningEngine()
    re.add_rule("temperature", lambda temp: temp > 30, "It's hot outside")
    re.add_rule("weather", lambda weather: weather == "sunny", "Go to the beach")
    print(re.reason({"temperature": 35, "weather": "cloudy"}))
```