# -*- coding: utf-8 -*-
"""A framework for conducting multi-strand multilateral asynchronous negotiations on multiple issues."""

from __future__ import annotations

import importlib
from importlib.metadata import PackageNotFoundError, version

__author__ = """Yasser Mohammad"""
__email__ = "yasserfarouk@gmail.com"
try:
    __version__ = version("negmas")
except PackageNotFoundError:
    # package is not installed
    __version__ = "0.12.0"

# Submodules that can be accessed as negmas.xxx
_LAZY_SUBMODULES = frozenset(
    {
        "config",
        "types",
        "common",
        "inout",
        "mechanisms",
        "negotiators",
        "outcomes",
        "gb",
        "sao",
        "situated",
        "st",
        "preferences",
        "genius",
    }
)

# Mapping from export name to source module
# Order follows original __init__.py: config, types, common, inout, mechanisms,
# negotiators, outcomes, gb, sao, situated, st, preferences, genius
# Later modules override earlier ones for duplicates
_EXPORT_TO_MODULE = {
    # config (4 exports)
    "CONFIG_KEY_GENIUS_BRIDGE_JAR": "config",
    "CONFIG_KEY_JNEGMAS_JAR": "config",
    "NEGMAS_CONFIG": "config",
    "negmas_config": "config",
    # types (4 exports)
    "NamedObject": "types",
    "Rational": "types",
    "Runnable": "types",
    "WithPath": "types",
    # common (6 exports - Value, NegotiatorInfo, NegotiatorMechanismInterface, TraceElement overridden later)
    "AgentMechanismInterface": "common",
    "DEFAULT_JAVA_PORT": "common",
    "MechanismAction": "common",
    "MechanismState": "common",
    "PreferencesChange": "common",
    "PreferencesChangeType": "common",
    # inout (9 exports)
    "Scenario": "inout",
    "find_genius_domain_and_utility_files": "inout",
    "find_geniusweb_domain_and_utility_files": "inout",
    "get_domain_issues": "inout",
    "load_genius_domain": "inout",
    "load_genius_domain_from_folder": "inout",
    "load_geniusweb_domain": "inout",
    "load_geniusweb_domain_from_folder": "inout",
    "scenario_size": "inout",
    # mechanisms (3 exports)
    "Mechanism": "mechanisms",
    "MechanismStepResult": "mechanisms",
    "Traceable": "mechanisms",
    # negotiators (17 exports - NegotiatorInfo overridden later)
    "Aspiration": "negotiators",
    "BinaryComparatorNegotiator": "negotiators",
    "Component": "negotiators",
    "ControlledNegotiator": "negotiators",
    "Controller": "negotiators",
    "EvaluatorNegotiator": "negotiators",
    "ExpAspiration": "negotiators",
    "ModularNegotiator": "negotiators",
    "NLevelsComparatorNegotiator": "negotiators",
    "Negotiator": "negotiators",
    "NegotiatorInfo": "negotiators",
    "PolyAspiration": "negotiators",
    "RankerNegotiator": "negotiators",
    "RankerWithWeightsNegotiator": "negotiators",
    "RealComparatorNegotiator": "negotiators",
    "SorterNegotiator": "negotiators",
    "TimeCurve": "negotiators",
    # outcomes (57 exports)
    "CallableIssue": "outcomes",
    "CardinalIssue": "outcomes",
    "CartesianOutcomeSpace": "outcomes",
    "CategoricalIssue": "outcomes",
    "ContiguousIssue": "outcomes",
    "ContinuousInfiniteIssue": "outcomes",
    "ContinuousIssue": "outcomes",
    "CountableInfiniteIssue": "outcomes",
    "DEFAULT_LEVELS": "outcomes",
    "DiscreteCardinalIssue": "outcomes",
    "DiscreteCartesianOutcomeSpace": "outcomes",
    "DiscreteIssue": "outcomes",
    "DiscreteOrdinalIssue": "outcomes",
    "DiscreteOutcomeSpace": "outcomes",
    "DistanceFun": "outcomes",
    "EnumeratingOutcomeSpace": "outcomes",
    "ExtendedOutcome": "outcomes",
    "IndependentDiscreteIssuesOS": "outcomes",
    "IndependentIssuesOS": "outcomes",
    "InfiniteIssue": "outcomes",
    "Issue": "outcomes",
    "OrdinalIssue": "outcomes",
    "Outcome": "outcomes",
    "OutcomeRange": "outcomes",
    "OutcomeSpace": "outcomes",
    "PartialOutcomeDict": "outcomes",
    "PartialOutcomeTuple": "outcomes",
    "RangeIssue": "outcomes",
    "check_one_and_only": "outcomes",
    "check_one_at_most": "outcomes",
    "combine_issues": "outcomes",
    "dict2outcome": "outcomes",
    "discretize_and_enumerate_issues": "outcomes",
    "ensure_os": "outcomes",
    "enumerate_discrete_issues": "outcomes",
    "enumerate_issues": "outcomes",
    "generalized_minkowski_distance": "outcomes",
    "generate_issues": "outcomes",
    "issues_from_genius": "outcomes",
    "issues_from_geniusweb": "outcomes",
    "issues_from_geniusweb_json_str": "outcomes",
    "issues_from_outcomes": "outcomes",
    "issues_from_xml_str": "outcomes",
    "issues_to_genius": "outcomes",
    "issues_to_xml_str": "outcomes",
    "make_issue": "outcomes",
    "make_os": "outcomes",
    "min_dist": "outcomes",
    "num_outcomes": "outcomes",
    "os_or_none": "outcomes",
    "outcome2dict": "outcomes",
    "outcome_in_range": "outcomes",
    "outcome_is_complete": "outcomes",
    "outcome_is_valid": "outcomes",
    "outcome_types_are_ok": "outcomes",
    "sample_issues": "outcomes",
    "sample_outcomes": "outcomes",
    # gb (34 exports - many shared with sao, sao takes precedence)
    "AllAcceptEvaluationStrategy": "gb",
    "AllOfferingConstraints": "gb",
    "AnyAcceptEvaluationStrategy": "gb",
    "AnyOfferingConstraint": "gb",
    "EvaluationStrategy": "gb",
    "GAOEvaluationStrategy": "gb",
    "GBComponent": "gb",
    "GBMechanism": "gb",
    "GBNMI": "gb",
    "GBNegotiator": "gb",
    "GBResponse": "gb",
    "GBState": "gb",
    "INFINITE": "gb",
    "LocalEvaluationStrategy": "gb",
    "LocalOfferingConstraint": "gb",
    "NegotiatorMechanismInterface": "gb",
    "OfferingConstraint": "gb",
    "ParallelGBMechanism": "gb",
    "RepeatFinalOfferOnly": "gb",
    "RepeatLastOfferOnly": "gb",
    "SerialGBMechanism": "gb",
    "SerialTAUMechanism": "gb",
    "TAUEvaluationStrategy": "gb",
    "TAUMechanism": "gb",
    "ThreadState": "gb",
    "UniqueOffers": "gb",
    "all_accept": "gb",
    "any_accept": "gb",
    # Genius BOA components (transcompiled from Genius)
    "GeniusAcceptancePolicy": "gb",
    "GeniusOfferingPolicy": "gb",
    "GeniusOpponentModel": "gb",
    # Acceptance policies
    "GACNext": "gb",
    "GACConst": "gb",
    "GACTime": "gb",
    "GACPrevious": "gb",
    "GACGap": "gb",
    "GACCombi": "gb",
    "GACCombiMaxInWindow": "gb",
    "GACTrue": "gb",
    "GACFalse": "gb",
    "GACConstDiscounted": "gb",
    "GACCombiAvg": "gb",
    "GACCombiBestAvg": "gb",
    "GACCombiMax": "gb",
    "GACCombiV2": "gb",
    "GACCombiV3": "gb",
    "GACCombiV4": "gb",
    "GACCombiBestAvgDiscounted": "gb",
    "GACCombiMaxInWindowDiscounted": "gb",
    "GACCombiProb": "gb",
    "GACCombiProbDiscounted": "gb",
    # Offering policies
    "GTimeDependentOffering": "gb",
    "GRandomOffering": "gb",
    "GBoulwareOffering": "gb",
    "GConcederOffering": "gb",
    "GLinearOffering": "gb",
    "GHardlinerOffering": "gb",
    "GChoosingAllBids": "gb",
    # Opponent models
    "GHardHeadedFrequencyModel": "gb",
    "GDefaultModel": "gb",
    "GUniformModel": "gb",
    "GOppositeModel": "gb",
    "GSmithFrequencyModel": "gb",
    "GAgentXFrequencyModel": "gb",
    "GNashFrequencyModel": "gb",
    "GBayesianModel": "gb",
    "GScalableBayesianModel": "gb",
    # sao (123 exports - overrides duplicates from gb)
    "ACConst": "sao",
    "ACLast": "sao",
    "ACLastFractionReceived": "sao",
    "ACLastKReceived": "sao",
    "ACNext": "sao",
    "ACTime": "sao",
    "AcceptAbove": "sao",
    "AcceptAfter": "sao",
    "AcceptAnyRational": "sao",
    "AcceptAround": "sao",
    "AcceptBest": "sao",
    "AcceptBetterRational": "sao",
    "AcceptBetween": "sao",
    "AcceptImmediately": "sao",
    "AcceptNotWorseRational": "sao",
    "AcceptTop": "sao",
    "AcceptancePolicy": "sao",
    "AdditiveFirstFollowingTBNegotiator": "sao",
    "AdditiveLastOfferFollowingTBNegotiator": "sao",
    "AdditiveParetoFollowingTBNegotiator": "sao",
    "AdditivePartnerOffersOrientedSelector": "sao",
    "AllAcceptanceStrategies": "sao",
    "AnyAcceptancePolicy": "sao",
    "AspirationNegotiator": "sao",
    "BestOfferOrientedSelector": "sao",
    "BestOfferOrientedTBNegotiator": "sao",
    "BestOfferSelector": "sao",
    "BoulwareTBNegotiator": "sao",
    "CABNegotiator": "sao",
    "CABOfferingPolicy": "sao",
    "CANNegotiator": "sao",
    "CARNegotiator": "sao",
    "ConcederTBNegotiator": "sao",
    "ConcensusAcceptancePolicy": "sao",
    "ConcensusOfferingPolicy": "sao",
    "ConcessionRecommender": "sao",
    "ControlledSAONegotiator": "sao",
    "EndImmediately": "sao",
    "FastMiCRONegotiator": "sao",
    "FirstOfferOrientedSelector": "sao",
    "FirstOfferOrientedTBNegotiator": "sao",
    "FrequencyLinearUFunModel": "sao",
    "FrequencyUFunModel": "sao",
    "HybridNegotiator": "sao",
    "HybridOfferingPolicy": "sao",
    "KindConcessionRecommender": "sao",
    "LastOfferOrientedSelector": "sao",
    "LastOfferOrientedTBNegotiator": "sao",
    "LimitedOutcomesAcceptancePolicy": "sao",
    "LimitedOutcomesAcceptor": "sao",
    "LimitedOutcomesNegotiator": "sao",
    "LimitedOutcomesOfferingPolicy": "sao",
    "LinearTBNegotiator": "sao",
    "MedianOfferSelector": "sao",
    "MiCRONegotiator": "sao",
    "MiCROOfferingPolicy": "sao",
    "Model": "sao",
    "MultiplicativeFirstFollowingTBNegotiator": "sao",
    "MultiplicativeLastOfferFollowingTBNegotiator": "sao",
    "MultiplicativeParetoFollowingTBNegotiator": "sao",
    "MultiplicativePartnerOffersOrientedSelector": "sao",
    "MyBestConcensusOfferingPolicy": "sao",
    "MyWorstConcensusOfferingPolicy": "sao",
    "NaiveTitForTatNegotiator": "sao",
    "NegotiatorAcceptancePolicy": "sao",
    "NegotiatorOfferingPolicy": "sao",
    "NiceNegotiator": "sao",
    "NoneOfferingPolicy": "sao",
    "OfferBest": "sao",
    "OfferOrientedSelector": "sao",
    "OfferSelector": "sao",
    "OfferSelectorProtocol": "sao",
    "OfferTop": "sao",
    "OfferingPolicy": "sao",
    "OutcomeSetOrientedSelector": "sao",
    "PartnerOffersOrientedSelector": "sao",
    "ProposalPolicy": "sao",
    "RandomAcceptancePolicy": "sao",
    "RandomAlwaysAcceptingNegotiator": "sao",
    "RandomConcensusOfferingPolicy": "sao",
    "RandomNegotiator": "sao",
    "RandomOfferSelector": "sao",
    "RandomOfferingPolicy": "sao",
    "RejectAlways": "sao",
    "ResponseType": "sao",
    "SAOCallNegotiator": "sao",
    "SAOController": "sao",
    "SAOMechanism": "sao",
    "SAOMetaNegotiatorController": "sao",
    "SAONMI": "sao",
    "SAONegotiator": "sao",
    "SAOPRNegotiator": "sao",
    "SAOProtocol": "sao",
    "SAORandomController": "sao",
    "SAORandomSyncController": "sao",
    "SAOResponse": "sao",
    "SAOSingleAgreementAspirationController": "sao",
    "SAOSingleAgreementController": "sao",
    "SAOSingleAgreementRandomController": "sao",
    "SAOState": "sao",
    "SAOSyncController": "sao",
    "SimpleTitForTatNegotiator": "sao",
    "TFTAcceptancePolicy": "sao",
    "TFTOfferingPolicy": "sao",
    "TimeBasedConcedingNegotiator": "sao",
    "TimeBasedNegotiator": "sao",
    "TimeBasedOfferingPolicy": "sao",
    "TopFractionNegotiator": "sao",
    "ToughNegotiator": "sao",
    "TraceElement": "sao",
    "UFunModel": "sao",
    "UnanimousConcensusOfferingPolicy": "sao",
    "UtilBasedConcensusOfferingPolicy": "sao",
    "UtilBasedNegotiator": "sao",
    "UtilityBasedOutcomeSetRecommender": "sao",
    "UtilityInverter": "sao",
    "WABNegotiator": "sao",
    "WANNegotiator": "sao",
    "WARNegotiator": "sao",
    "WAROfferingPolicy": "sao",
    "WorstOfferSelector": "sao",
    "ZeroSumModel": "sao",
    "all_negotiator_types": "sao",
    # situated (33 exports)
    "Action": "situated",
    "Adapter": "situated",
    "Agent": "situated",
    "AgentWorldInterface": "situated",
    "Breach": "situated",
    "BreachProcessing": "situated",
    "BulletinBoard": "situated",
    "Condition": "situated",
    "Contract": "situated",
    "DEFAULT_EDGE_TYPES": "situated",
    "EDGE_COLORS": "situated",
    "EDGE_TYPES": "situated",
    "Entity": "situated",
    "MechanismFactory": "situated",
    "NegAgent": "situated",
    "NegWorld": "situated",
    "NegotiationInfo": "situated",
    "NegotiationRequestInfo": "situated",
    "NoContractExecutionMixin": "situated",
    "NoResponsesMixin": "situated",
    "Operations": "situated",
    "PROTOCOL_CLASS_NAME_FIELD": "situated",
    "RenegotiationRequest": "situated",
    "RunningNegotiationInfo": "situated",
    "SimpleWorld": "situated",
    "StatsMonitor": "situated",
    "TimeInAgreementMixin": "situated",
    "World": "situated",
    "WorldMonitor": "situated",
    "deflistdict": "situated",
    "safe_min": "situated",
    "save_stats": "situated",
    "show_edge_colors": "situated",
    # st (2 exports)
    "HillClimbingSTMechanism": "st",
    "VetoSTMechanism": "st",
    # preferences (116 exports - Value overrides common)
    "AffineFun": "preferences",
    "AffineMultiFun": "preferences",
    "AffineUtilityFunction": "preferences",
    "BaseFun": "preferences",
    "BaseMultiFun": "preferences",
    "BasePref": "preferences",
    "BaseUtilityFunction": "preferences",
    "BilinearMultiFun": "preferences",
    "CardinalCrisp": "preferences",
    "CardinalProb": "preferences",
    "CardinalRanking": "preferences",
    "ComplexNonlinearUtilityFunction": "preferences",
    "ConstFun": "preferences",
    "ConstUtilityFunction": "preferences",
    "CosFun": "preferences",
    "DiscountedUtilityFunction": "preferences",
    "Distribution": "preferences",
    "ExpDiscountedUFun": "preferences",
    "ExponentialFun": "preferences",
    "GLAUtilityFunction": "preferences",
    "GPAUtilityFunction": "preferences",
    "HasRange": "preferences",
    "HasReservedDistribution": "preferences",
    "HasReservedOutcome": "preferences",
    "HasReservedValue": "preferences",
    "HyperRectangleUtilityFunction": "preferences",
    "ILSUtilityFunction": "preferences",
    "INVALID_UTILITY": "preferences",
    "IPUtilityFunction": "preferences",
    "IdentityFun": "preferences",
    "IndIssues": "preferences",
    "InverseUFun": "preferences",
    "LambdaFun": "preferences",
    "LambdaMultiFun": "preferences",
    "LinDiscountedUFun": "preferences",
    "LinearAdditiveUtilityFunction": "preferences",
    "LinearFun": "preferences",
    "LinearMultiFun": "preferences",
    "LinearUtilityAggregationFunction": "preferences",
    "LinearUtilityFunction": "preferences",
    "LogFun": "preferences",
    "MappingUtilityFunction": "preferences",
    "MultiIssueFun": "preferences",
    "NonLinearAggregationUtilityFunction": "preferences",
    "NonlinearHyperRectangleUtilityFunction": "preferences",
    "Normalizable": "preferences",
    "Ordinal": "preferences",
    "OrdinalRanking": "preferences",
    "OutcomeDistances": "preferences",
    "OutcomeOptimality": "preferences",
    "PAUtilityFunction": "preferences",
    "PartiallyScalable": "preferences",
    "PartiallyShiftable": "preferences",
    "PolynomialFun": "preferences",
    "PolynomialMultiFun": "preferences",
    "Preferences": "preferences",
    "PresortingInverseUtilityFunction": "preferences",
    "ProbMappingUtilityFunction": "preferences",
    "ProbRandomUtilityFunction": "preferences",
    "ProbUtilityFunction": "preferences",
    "ProductMultiFun": "preferences",
    "QuadraticFun": "preferences",
    "QuadraticMultiFun": "preferences",
    "RandomUtilityFunction": "preferences",
    "Randomizable": "preferences",
    "RankOnlyUtilityFunction": "preferences",
    "SamplingInverseUtilityFunction": "preferences",
    "Scalable": "preferences",
    "ScenarioStats": "preferences",
    "SessionDependentUFunMixin": "preferences",
    "Shiftable": "preferences",
    "SinFun": "preferences",
    "SingleIssueFun": "preferences",
    "StateDependentUFunMixin": "preferences",
    "StationaryMixin": "preferences",
    "TableFun": "preferences",
    "TableMultiFun": "preferences",
    "TriangularFun": "preferences",
    "UFun": "preferences",
    "UFunCrisp": "preferences",
    "UFunProb": "preferences",
    "UniformUtilityFunction": "preferences",
    "UtilityFunction": "preferences",
    "UtilityValue": "preferences",
    "Value": "preferences",
    "VolatileUFunMixin": "preferences",
    "WeightedUtilityFunction": "preferences",
    "XmlSerializableUFun": "preferences",
    "calc_outcome_distances": "preferences",
    "calc_outcome_optimality": "preferences",
    "calc_reserved_value": "preferences",
    "calc_scenario_stats": "preferences",
    "conflict_level": "preferences",
    "distance_between": "preferences",
    "distance_to": "preferences",
    "dominating_points": "preferences",
    "extreme_outcomes": "preferences",
    "get_ranks": "preferences",
    "kalai_points": "preferences",
    "ks_points": "preferences",
    "make_discounted_ufun": "preferences",
    "make_fun_from_xml": "preferences",
    "max_relative_welfare_points": "preferences",
    "max_welfare_points": "preferences",
    "minmax": "preferences",
    "nash_points": "preferences",
    "normalize": "preferences",
    "opposition_level": "preferences",
    "pareto_frontier": "preferences",
    "pareto_frontier_active": "preferences",
    "pareto_frontier_bf": "preferences",
    "pareto_frontier_of": "preferences",
    "sample_outcome_with_utility": "preferences",
    "scale_max": "preferences",
    "sort_by_utility": "preferences",
    "winwin_level": "preferences",
    # genius (11 exports)
    "ANY_JAVA_PORT": "genius",
    "DEFAULT_GENIUS_NEGOTIATOR_TIMEOUT": "genius",
    "DEFAULT_PYTHON_PORT": "genius",
    "GeniusBridge": "genius",
    "GeniusNegotiator": "genius",
    "RANDOM_JAVA_PORT": "genius",
    "genius_bridge_is_installed": "genius",
    "genius_bridge_is_running": "genius",
    "get_free_tcp_port": "genius",
    "init_genius_bridge": "genius",
}

# Cache for loaded modules
_loaded_modules: dict[str, object] = {}


def __getattr__(name: str):
    """Lazy load exports and submodules on first access."""
    # Check if it's a known export
    if name in _EXPORT_TO_MODULE:
        module_name = _EXPORT_TO_MODULE[name]
        if module_name not in _loaded_modules:
            _loaded_modules[module_name] = importlib.import_module(
                f".{module_name}", __name__
            )
        return getattr(_loaded_modules[module_name], name)

    # Check if it's a submodule access
    if name in _LAZY_SUBMODULES:
        if name not in _loaded_modules:
            _loaded_modules[name] = importlib.import_module(f".{name}", __name__)
        return _loaded_modules[name]

    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")


def __dir__():
    """Return list of available names for autocompletion."""
    return list(__all__) + list(_LAZY_SUBMODULES)


__all__ = [
    # config
    "CONFIG_KEY_GENIUS_BRIDGE_JAR",
    "CONFIG_KEY_JNEGMAS_JAR",
    "NEGMAS_CONFIG",
    "negmas_config",
    # types
    "NamedObject",
    "Rational",
    "Runnable",
    "WithPath",
    # common
    "AgentMechanismInterface",
    "DEFAULT_JAVA_PORT",
    "MechanismAction",
    "MechanismState",
    "PreferencesChange",
    "PreferencesChangeType",
    # inout
    "Scenario",
    "find_genius_domain_and_utility_files",
    "find_geniusweb_domain_and_utility_files",
    "get_domain_issues",
    "load_genius_domain",
    "load_genius_domain_from_folder",
    "load_geniusweb_domain",
    "load_geniusweb_domain_from_folder",
    "scenario_size",
    # mechanisms
    "Mechanism",
    "MechanismStepResult",
    "Traceable",
    # negotiators
    "Aspiration",
    "BinaryComparatorNegotiator",
    "Component",
    "ControlledNegotiator",
    "Controller",
    "EvaluatorNegotiator",
    "ExpAspiration",
    "ModularNegotiator",
    "NLevelsComparatorNegotiator",
    "Negotiator",
    "NegotiatorInfo",
    "PolyAspiration",
    "RankerNegotiator",
    "RankerWithWeightsNegotiator",
    "RealComparatorNegotiator",
    "SorterNegotiator",
    "TimeCurve",
    # outcomes
    "CallableIssue",
    "CardinalIssue",
    "CartesianOutcomeSpace",
    "CategoricalIssue",
    "ContiguousIssue",
    "ContinuousInfiniteIssue",
    "ContinuousIssue",
    "CountableInfiniteIssue",
    "DEFAULT_LEVELS",
    "DiscreteCardinalIssue",
    "DiscreteCartesianOutcomeSpace",
    "DiscreteIssue",
    "DiscreteOrdinalIssue",
    "DiscreteOutcomeSpace",
    "DistanceFun",
    "EnumeratingOutcomeSpace",
    "ExtendedOutcome",
    "IndependentDiscreteIssuesOS",
    "IndependentIssuesOS",
    "InfiniteIssue",
    "Issue",
    "OrdinalIssue",
    "Outcome",
    "OutcomeRange",
    "OutcomeSpace",
    "PartialOutcomeDict",
    "PartialOutcomeTuple",
    "RangeIssue",
    "check_one_and_only",
    "check_one_at_most",
    "combine_issues",
    "dict2outcome",
    "discretize_and_enumerate_issues",
    "ensure_os",
    "enumerate_discrete_issues",
    "enumerate_issues",
    "generalized_minkowski_distance",
    "generate_issues",
    "issues_from_genius",
    "issues_from_geniusweb",
    "issues_from_geniusweb_json_str",
    "issues_from_outcomes",
    "issues_from_xml_str",
    "issues_to_genius",
    "issues_to_xml_str",
    "make_issue",
    "make_os",
    "min_dist",
    "num_outcomes",
    "os_or_none",
    "outcome2dict",
    "outcome_in_range",
    "outcome_is_complete",
    "outcome_is_valid",
    "outcome_types_are_ok",
    "sample_issues",
    "sample_outcomes",
    # gb
    "AllAcceptEvaluationStrategy",
    "AllOfferingConstraints",
    "AnyAcceptEvaluationStrategy",
    "AnyOfferingConstraint",
    "EvaluationStrategy",
    "GAOEvaluationStrategy",
    "GBComponent",
    "GBMechanism",
    "GBNMI",
    "GBNegotiator",
    "GBResponse",
    "GBState",
    "INFINITE",
    "LocalEvaluationStrategy",
    "LocalOfferingConstraint",
    "NegotiatorMechanismInterface",
    "OfferingConstraint",
    "ParallelGBMechanism",
    "RepeatFinalOfferOnly",
    "RepeatLastOfferOnly",
    "SerialGBMechanism",
    "SerialTAUMechanism",
    "TAUEvaluationStrategy",
    "TAUMechanism",
    "ThreadState",
    "UniqueOffers",
    "all_accept",
    "any_accept",
    # sao
    "ACConst",
    "ACLast",
    "ACLastFractionReceived",
    "ACLastKReceived",
    "ACNext",
    "ACTime",
    "AcceptAbove",
    "AcceptAfter",
    "AcceptAnyRational",
    "AcceptAround",
    "AcceptBest",
    "AcceptBetterRational",
    "AcceptBetween",
    "AcceptImmediately",
    "AcceptNotWorseRational",
    "AcceptTop",
    "AcceptancePolicy",
    "AdditiveFirstFollowingTBNegotiator",
    "AdditiveLastOfferFollowingTBNegotiator",
    "AdditiveParetoFollowingTBNegotiator",
    "AdditivePartnerOffersOrientedSelector",
    "AllAcceptanceStrategies",
    "AnyAcceptancePolicy",
    "AspirationNegotiator",
    "BestOfferOrientedSelector",
    "BestOfferOrientedTBNegotiator",
    "BestOfferSelector",
    "BoulwareTBNegotiator",
    "CABNegotiator",
    "CABOfferingPolicy",
    "CANNegotiator",
    "CARNegotiator",
    "ConcederTBNegotiator",
    "ConcensusAcceptancePolicy",
    "ConcensusOfferingPolicy",
    "ConcessionRecommender",
    "ControlledSAONegotiator",
    "EndImmediately",
    "FastMiCRONegotiator",
    "FirstOfferOrientedSelector",
    "FirstOfferOrientedTBNegotiator",
    "FrequencyLinearUFunModel",
    "FrequencyUFunModel",
    "HybridNegotiator",
    "HybridOfferingPolicy",
    "KindConcessionRecommender",
    "LastOfferOrientedSelector",
    "LastOfferOrientedTBNegotiator",
    "LimitedOutcomesAcceptancePolicy",
    "LimitedOutcomesAcceptor",
    "LimitedOutcomesNegotiator",
    "LimitedOutcomesOfferingPolicy",
    "LinearTBNegotiator",
    "MedianOfferSelector",
    "MiCRONegotiator",
    "MiCROOfferingPolicy",
    "Model",
    "MultiplicativeFirstFollowingTBNegotiator",
    "MultiplicativeLastOfferFollowingTBNegotiator",
    "MultiplicativeParetoFollowingTBNegotiator",
    "MultiplicativePartnerOffersOrientedSelector",
    "MyBestConcensusOfferingPolicy",
    "MyWorstConcensusOfferingPolicy",
    "NaiveTitForTatNegotiator",
    "NegotiatorAcceptancePolicy",
    "NegotiatorOfferingPolicy",
    "NiceNegotiator",
    "NoneOfferingPolicy",
    "OfferBest",
    "OfferOrientedSelector",
    "OfferSelector",
    "OfferSelectorProtocol",
    "OfferTop",
    "OfferingPolicy",
    "OutcomeSetOrientedSelector",
    "PartnerOffersOrientedSelector",
    "ProposalPolicy",
    "RandomAcceptancePolicy",
    "RandomAlwaysAcceptingNegotiator",
    "RandomConcensusOfferingPolicy",
    "RandomNegotiator",
    "RandomOfferSelector",
    "RandomOfferingPolicy",
    "RejectAlways",
    "ResponseType",
    "SAOCallNegotiator",
    "SAOController",
    "SAOMechanism",
    "SAOMetaNegotiatorController",
    "SAONMI",
    "SAONegotiator",
    "SAOPRNegotiator",
    "SAOProtocol",
    "SAORandomController",
    "SAORandomSyncController",
    "SAOResponse",
    "SAOSingleAgreementAspirationController",
    "SAOSingleAgreementController",
    "SAOSingleAgreementRandomController",
    "SAOState",
    "SAOSyncController",
    "SimpleTitForTatNegotiator",
    "TFTAcceptancePolicy",
    "TFTOfferingPolicy",
    "TimeBasedConcedingNegotiator",
    "TimeBasedNegotiator",
    "TimeBasedOfferingPolicy",
    "TopFractionNegotiator",
    "ToughNegotiator",
    "TraceElement",
    "UFunModel",
    "UnanimousConcensusOfferingPolicy",
    "UtilBasedConcensusOfferingPolicy",
    "UtilBasedNegotiator",
    "UtilityBasedOutcomeSetRecommender",
    "UtilityInverter",
    "WABNegotiator",
    "WANNegotiator",
    "WARNegotiator",
    "WAROfferingPolicy",
    "WorstOfferSelector",
    "ZeroSumModel",
    "all_negotiator_types",
    # situated
    "Action",
    "Adapter",
    "Agent",
    "AgentWorldInterface",
    "Breach",
    "BreachProcessing",
    "BulletinBoard",
    "Condition",
    "Contract",
    "DEFAULT_EDGE_TYPES",
    "EDGE_COLORS",
    "EDGE_TYPES",
    "Entity",
    "MechanismFactory",
    "NegAgent",
    "NegWorld",
    "NegotiationInfo",
    "NegotiationRequestInfo",
    "NoContractExecutionMixin",
    "NoResponsesMixin",
    "Operations",
    "PROTOCOL_CLASS_NAME_FIELD",
    "RenegotiationRequest",
    "RunningNegotiationInfo",
    "SimpleWorld",
    "StatsMonitor",
    "TimeInAgreementMixin",
    "World",
    "WorldMonitor",
    "deflistdict",
    "safe_min",
    "save_stats",
    "show_edge_colors",
    # st
    "HillClimbingSTMechanism",
    "VetoSTMechanism",
    # preferences
    "AffineFun",
    "AffineMultiFun",
    "AffineUtilityFunction",
    "BaseFun",
    "BaseMultiFun",
    "BasePref",
    "BaseUtilityFunction",
    "BilinearMultiFun",
    "CardinalCrisp",
    "CardinalProb",
    "CardinalRanking",
    "ComplexNonlinearUtilityFunction",
    "ConstFun",
    "ConstUtilityFunction",
    "CosFun",
    "DiscountedUtilityFunction",
    "Distribution",
    "ExpDiscountedUFun",
    "ExponentialFun",
    "GLAUtilityFunction",
    "GPAUtilityFunction",
    "HasRange",
    "HasReservedDistribution",
    "HasReservedOutcome",
    "HasReservedValue",
    "HyperRectangleUtilityFunction",
    "ILSUtilityFunction",
    "INVALID_UTILITY",
    "IPUtilityFunction",
    "IdentityFun",
    "IndIssues",
    "InverseUFun",
    "LambdaFun",
    "LambdaMultiFun",
    "LinDiscountedUFun",
    "LinearAdditiveUtilityFunction",
    "LinearFun",
    "LinearMultiFun",
    "LinearUtilityAggregationFunction",
    "LinearUtilityFunction",
    "LogFun",
    "MappingUtilityFunction",
    "MultiIssueFun",
    "NonLinearAggregationUtilityFunction",
    "NonlinearHyperRectangleUtilityFunction",
    "Normalizable",
    "Ordinal",
    "OrdinalRanking",
    "OutcomeDistances",
    "OutcomeOptimality",
    "PAUtilityFunction",
    "PartiallyScalable",
    "PartiallyShiftable",
    "PolynomialFun",
    "PolynomialMultiFun",
    "Preferences",
    "PresortingInverseUtilityFunction",
    "ProbMappingUtilityFunction",
    "ProbRandomUtilityFunction",
    "ProbUtilityFunction",
    "ProductMultiFun",
    "QuadraticFun",
    "QuadraticMultiFun",
    "RandomUtilityFunction",
    "Randomizable",
    "RankOnlyUtilityFunction",
    "SamplingInverseUtilityFunction",
    "Scalable",
    "ScenarioStats",
    "SessionDependentUFunMixin",
    "Shiftable",
    "SinFun",
    "SingleIssueFun",
    "StateDependentUFunMixin",
    "StationaryMixin",
    "TableFun",
    "TableMultiFun",
    "TriangularFun",
    "UFun",
    "UFunCrisp",
    "UFunProb",
    "UniformUtilityFunction",
    "UtilityFunction",
    "UtilityValue",
    "Value",
    "VolatileUFunMixin",
    "WeightedUtilityFunction",
    "XmlSerializableUFun",
    "calc_outcome_distances",
    "calc_outcome_optimality",
    "calc_reserved_value",
    "calc_scenario_stats",
    "conflict_level",
    "distance_between",
    "distance_to",
    "dominating_points",
    "extreme_outcomes",
    "get_ranks",
    "kalai_points",
    "ks_points",
    "make_discounted_ufun",
    "make_fun_from_xml",
    "max_relative_welfare_points",
    "max_welfare_points",
    "minmax",
    "nash_points",
    "normalize",
    "opposition_level",
    "pareto_frontier",
    "pareto_frontier_active",
    "pareto_frontier_bf",
    "pareto_frontier_of",
    "sample_outcome_with_utility",
    "scale_max",
    "sort_by_utility",
    "winwin_level",
    # genius
    "ANY_JAVA_PORT",
    "DEFAULT_GENIUS_NEGOTIATOR_TIMEOUT",
    "DEFAULT_PYTHON_PORT",
    "GeniusBridge",
    "GeniusNegotiator",
    "RANDOM_JAVA_PORT",
    "genius_bridge_is_installed",
    "genius_bridge_is_running",
    "get_free_tcp_port",
    "init_genius_bridge",
]
