"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-08 19:43:04.875022
"""

```python
from typing import List, Dict, Any


class ReasoningEngine:
    """
    A simple reasoning engine that processes a set of rules to deduce conclusions from given premises.
    """

    def __init__(self, rules: List[Dict[str, Any]], facts: Dict[str, bool]):
        """
        Initialize the reasoning engine with rules and initial facts.

        :param rules: A list of dictionaries where each dictionary represents a rule. Each rule has a 'condition'
                      (a string representing the condition) and an 'action' (a function to be called if the condition
                      is met).
        :param facts: A dictionary containing the current state of known facts, with keys as fact names and values
                      as their truthiness.
        """
        self.rules = rules
        self.facts = facts

    def deduce(self) -> None:
        """
        Deduce conclusions from existing facts by applying all applicable rules.

        This method iterates over each rule, evaluates its condition against the current state of facts,
        and if the condition is met, it executes the associated action.
        """
        for rule in self.rules:
            condition = rule['condition']
            action = rule['action']

            # Evaluate the condition using short-circuit evaluation
            if all(self.facts.get(fact, False) for fact in condition.split(' and ')):
                result = action()
                print(f"Action executed: {result}")
                self.update_facts(result)

    def update_facts(self, new_facts: Dict[str, bool]) -> None:
        """
        Update the current state of facts with newly derived ones.

        :param new_facts: A dictionary representing new facts to be added or updated.
                          Keys are fact names and values are their truthiness.
        """
        self.facts.update(new_facts)

    def add_rule(self, rule: Dict[str, Any]) -> None:
        """
        Add a new rule to the engine.

        :param rule: A dictionary representing a rule with 'condition' (a string) and 'action' (a function).
        """
        self.rules.append(rule)


# Example usage
def print_hello() -> str:
    return "Hello, world!"


def print_goodbye() -> str:
    return "Goodbye, everyone!"


initial_facts = {
    'is_daytime': True,
}

rules = [
    {
        'condition': 'is_daytime',
        'action': lambda: print_hello(),
    },
    {
        'condition': 'not is_daytime',
        'action': lambda: print_goodbye(),
    }
]

reasoning_engine = ReasoningEngine(rules, initial_facts)
reasoning_engine.deduce()
```