"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-07 16:13:06.489796
"""

```python
from typing import List, Dict


class KnowledgeBase:
    def __init__(self):
        self.knowledge = []

    def add_fact(self, fact: str) -> None:
        """
        Adds a new fact to the knowledge base.

        :param fact: A string representing a fact.
        """
        self.knowledge.append(fact)

    def get_facts(self) -> List[str]:
        """
        Retrieves all facts stored in the knowledge base.

        :return: A list of strings, each representing a fact.
        """
        return self.knowledge


class RuleEngine:
    def __init__(self):
        self.rules = []

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

        :param rule: A dictionary where keys are patterns and values are actions.
        """
        self.rules.append(rule)

    def match_and_execute(self, facts: List[str]) -> str:
        """
        Matches the given facts against rules and executes the first matching action.

        :param facts: A list of strings representing facts to be matched.
        :return: The action string if a rule is matched, otherwise returns an error message.
        """
        for rule in self.rules:
            for pattern in rule.keys():
                if all(pattern in fact for fact in facts):
                    return rule[pattern]
        return "No applicable rule found."


def create_reasoning_engine() -> RuleEngine:
    """
    Creates and initializes a reasoning engine with predefined knowledge base and rules.

    :return: A RuleEngine instance.
    """
    kb = KnowledgeBase()
    kb.add_fact("The weather is sunny.")
    kb.add_fact("People are at the park.")

    rule_engine = RuleEngine()
    rule_engine.add_rule({"The weather is sunny.": "Go for a picnic."})
    rule_engine.add_rule({"People are at the park.": "Join them for some fun."})

    return rule_engine


# Example usage
reasoning_engine = create_reasoning_engine()
result = reasoning_engine.match_and_execute(["The weather is sunny.", "People are at the park."])
print(result)  # Expected output: "Go for a picnic." and "Join them for some fun."
```

This code defines a simple rule-based reasoning engine capable of matching facts against predefined rules. It includes a knowledge base to store facts, a rule engine to define and execute rules based on those facts, and an example function that creates such a system with sample data.