Source code for symaware.base.data.types

from typing import TYPE_CHECKING, TypedDict

if TYPE_CHECKING:
    # String type hinting to support python 3.8
    import sys

    if sys.version_info >= (3, 10):
        from typing import TypeAlias
    else:
        from typing_extensions import TypeAlias
    from symaware.base import (
        Agent,
        CommunicationReceiver,
        CommunicationSender,
        Controller,
        Environment,
        MultiAgentAwarenessVector,
        MultiAgentKnowledgeDatabase,
        PerceptionSystem,
        RiskEstimator,
        UncertaintyEstimator,
    )

Identifier: "TypeAlias" = int


[docs] class SymawareConfig(TypedDict): """SymAware configuration dictionary, used to launch a default SymAware instance with the specified components. Args ---- agent: Tuple or list of agents to be used in the SymAware instance controller: Controller(s) of the agent(s) knowledge_database: Knowledge databases used to initialise the agents awareness_vector: Awareness vectors used to initialise the agents risk_estimator: Risk estimator(s) of the agent(s) uncertainty_estimator: Uncertainty estimator(s) of the agent(s) communication_sender: Communication sender(s) of the agent(s) communication_receiver: Communication receiver(s) of the agent(s) perception_system: Perception system(s) of the agent(s) environment: Environment that the agents will be added to and interact with """ agent: "tuple[Agent] | list[Agent]" controller: "tuple[Controller] | list[Controller]" knowledge_database: "tuple[MultiAgentKnowledgeDatabase] | list[MultiAgentKnowledgeDatabase]" awareness_vector: "tuple[MultiAgentAwarenessVector] | list[MultiAgentAwarenessVector]" risk_estimator: "tuple[RiskEstimator] | list[RiskEstimator]" uncertainty_estimator: "tuple[UncertaintyEstimator] | list[UncertaintyEstimator]" communication_sender: "tuple[CommunicationSender] | list[CommunicationSender]" communication_receiver: "tuple[CommunicationReceiver] | list[CommunicationReceiver]" perception_system: "tuple[PerceptionSystem] | list[PerceptionSystem]" environment: "Environment"