"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-08 06:01:21.149169
"""

```python
from typing import List, Dict


class ReasoningEngine:
    """
    A basic reasoning engine to address limited reasoning sophistication.
    This engine uses simple if-else conditions based on predefined rules.

    Args:
        knowledge_base: A dictionary containing key-value pairs of facts and their corresponding actions.

    Methods:
        update_knowledge_base(new_rules: Dict[str, str]): Updates the existing knowledge base with new rules.
        reason_and_act(fact: str) -> None: Uses the current knowledge base to reason about a given fact and performs an action if applicable.
    """

    def __init__(self, knowledge_base: Dict[str, str]):
        self.knowledge_base = knowledge_base

    def update_knowledge_base(self, new_rules: Dict[str, str]) -> None:
        """
        Updates the existing knowledge base with new rules.

        Args:
            new_rules: A dictionary containing new key-value pairs of facts and their corresponding actions.
        """
        self.knowledge_base.update(new_rules)

    def reason_and_act(self, fact: str) -> None:
        """
        Uses the current knowledge base to reason about a given fact and performs an action if applicable.

        Args:
            fact: A string representing the fact to be reasoned about.
        """
        for key in self.knowledge_base.keys():
            if key in fact:
                print(f"Fact: {fact} -> Action: {self.knowledge_base[key]}")
                break
        else:
            print(f"No action found for fact: {fact}")


# Example usage
if __name__ == "__main__":
    knowledge_base = {
        "temperature_high": "turn_on_air_conditioning",
        "motion_detected": "activate_security_system"
    }

    engine = ReasoningEngine(knowledge_base)

    # Adding new rules to the knowledge base
    engine.update_knowledge_base({
        "smoke_detected": "evacuate_building",
        "fire_alarm_active": "alert_fire_department"
    })

    # Reasoning and acting based on different facts
    engine.reason_and_act("temperature_high")  # Should turn_on_air_conditioning
    engine.reason_and_act("motion_detected")   # Should activate_security_system
    engine.reason_and_act("smoke_detected")     # Should evacuate_building
    engine.reason_and_act("fire_alarm_active")  # Should alert_fire_department
    engine.reason_and_act("humidity_high")      # No action found for fact: humidity_high
```