{"id":37085911,"url":"https://github.com/yasserfarouk/negmas","last_synced_at":"2026-03-17T05:23:02.109Z","repository":{"id":43759728,"uuid":"168637974","full_name":"yasserfarouk/negmas","owner":"yasserfarouk","description":"Negotiation Multi-Agent System (A negotiation library designed for situated negotiations within business-like simulations)","archived":false,"fork":false,"pushed_at":"2026-01-10T10:36:58.000Z","size":107899,"stargazers_count":76,"open_issues_count":0,"forks_count":23,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-11T00:59:17.136Z","etag":null,"topics":["artificial-intelligence","economics-models","machine-learning","multi-agent","negotiation"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yasserfarouk.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-02-01T03:40:57.000Z","updated_at":"2026-01-10T10:37:02.000Z","dependencies_parsed_at":"2023-09-24T05:23:08.526Z","dependency_job_id":"3db43184-a1ce-43ba-a288-0ab76695681b","html_url":"https://github.com/yasserfarouk/negmas","commit_stats":{"total_commits":2694,"total_committers":7,"mean_commits":"384.85714285714283","dds":0.01187824795842618,"last_synced_commit":"8af31f17b16d86f146f0fddffa548c6f4d2305ad"},"previous_names":[],"tags_count":155,"template":false,"template_full_name":null,"purl":"pkg:github/yasserfarouk/negmas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasserfarouk%2Fnegmas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasserfarouk%2Fnegmas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasserfarouk%2Fnegmas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasserfarouk%2Fnegmas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yasserfarouk","download_url":"https://codeload.github.com/yasserfarouk/negmas/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasserfarouk%2Fnegmas/sbom","scorecard":{"id":480631,"data":{"date":"2025-08-04","repo":{"name":"github.com/yasserfarouk/negmas","commit":"e24381a1ba671286ad92fe757d30132354fc7d0d"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":4.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"19 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/SlowCI.yml:1","Warn: no topLevel permission defined: .github/workflows/doc.yml:1","Warn: no topLevel permission defined: .github/workflows/pypi.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Warn: no topLevel permission defined: .github/workflows/test_jupyter_notebooks.yml:1","Warn: no topLevel permission defined: .github/workflows/test_with_java.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"Binary-Artifacts","score":7,"reason":"binaries present in source code","details":["Warn: binary detected: docs/assets/genius-8.0.4-bridge.jar:1","Warn: binary detected: src/negmas/external/NegLoader.class:1","Warn: binary detected: src/negmas/external/jnegmas-1.0-SNAPSHOT-all.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/pypi.yml:4"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/SlowCI.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/SlowCI.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/SlowCI.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/SlowCI.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/SlowCI.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/SlowCI.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/doc.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/doc.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/doc.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/doc.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/doc.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/doc.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/doc.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/doc.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/pypi.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pypi.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/pypi.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pypi.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/pypi.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_jupyter_notebooks.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/test_jupyter_notebooks.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test_jupyter_notebooks.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/test_jupyter_notebooks.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_with_java.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/test_with_java.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test_with_java.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/yasserfarouk/negmas/test_with_java.yml/master?enable=pin","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   8 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-3f63-hfp8-52jq","Warn: Project is vulnerable to: GHSA-44wm-f244-xhp3","Warn: Project is vulnerable to: GHSA-j7hp-h8jx-5ppr","Warn: Project is vulnerable to: PYSEC-2023-175"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T16:31:23.109Z","repository_id":43759728,"created_at":"2025-08-19T16:31:23.111Z","updated_at":"2025-08-19T16:31:23.111Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:25:19.714Z","status":"ssl_error","status_checked_at":"2026-01-14T10:22:49.371Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","economics-models","machine-learning","multi-agent","negotiation"],"created_at":"2026-01-14T10:34:11.509Z","updated_at":"2026-03-17T05:23:02.082Z","avatar_url":"https://github.com/yasserfarouk.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"NegMAS: Negotiation Multi-Agent System\n======================================\n\n.. start-badges\n\n.. image:: https://img.shields.io/pypi/pyversions/negmas.svg\n    :target: https://pypi.python.org/pypi/negmas\n    :alt: Python\n\n.. image:: https://img.shields.io/pypi/status/negmas.svg\n    :target: https://pypi.python.org/pypi/negmas\n    :alt: Pypi\n\n.. image:: https://img.shields.io/pypi/l/negmas.svg\n    :target: https://pypi.python.org/pypi/negmas\n    :alt: License\n\n.. image:: https://img.shields.io/pypi/dm/negmas.svg\n    :target: https://pypi.python.org/pypi/negmas\n    :alt: Downloads\n\n.. image:: https://img.shields.io/codacy/grade/1b204fe0a69e41a298a175ea225d7b81.svg\n    :target: https://app.codacy.com/project/yasserfarouk/negmas/dashboard\n    :alt: Code Quality\n\n.. image:: https://img.shields.io/pypi/v/negmas.svg\n    :target: https://pypi.python.org/pypi/negmas\n    :alt: Pypi\n\n.. image:: https://github.com/yasserfarouk/negmas/workflows/CI/badge.svg\n    :target: https://www.github.com/yasserfarouk/negmas\n    :alt: Build Status\n\n.. image:: https://codecov.io/gh/yasserfarouk/negmas/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/yasserfarouk/negmas\n    :alt: Coverage Status\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/ambv/black\n    :alt: Coding style black\n\n.. image:: https://static.pepy.tech/personalized-badge/negmas?period=total\u0026units=international_system\u0026left_color=black\u0026right_color=blue\u0026left_text=Downloads\n :target: https://pepy.tech/projects/negmas\n\n.. end-badges\n\nNegMAS is a Python library for developing autonomous negotiation agents embedded in simulation\nenvironments. It supports bilateral and multilateral negotiations, multiple negotiation protocols,\nand complex multi-agent simulations with interconnected negotiations.\n\n**Documentation:** https://negmas.readthedocs.io/\n\nInstallation\n------------\n\n.. code-block:: bash\n\n    pip install negmas\n\nFor additional features:\n\n.. code-block:: bash\n\n    # With Genius bridge support (Java-based agents)\n    pip install negmas[genius]\n\n    # With visualization support\n    pip install negmas[plots]\n\n    # All optional dependencies\n    pip install negmas[all]\n\nQuick Start\n-----------\n\n**Run a simple negotiation in 10 lines:**\n\n.. code-block:: python\n\n    from negmas import SAOMechanism, TimeBasedConcedingNegotiator, make_issue\n    from negmas.preferences import LinearAdditiveUtilityFunction as LUFun\n\n    # Define what we're negotiating about\n    issues = [make_issue(name=\"price\", values=100)]\n\n    # Create negotiation session (Stacked Alternating Offers)\n    session = SAOMechanism(issues=issues, n_steps=50)\n\n    # Add buyer (prefers low price) and seller (prefers high price)\n    session.add(\n        TimeBasedConcedingNegotiator(name=\"buyer\"),\n        ufun=LUFun.random(issues=issues, reserved_value=0.0),\n    )\n    session.add(\n        TimeBasedConcedingNegotiator(name=\"seller\"),\n        ufun=LUFun.random(issues=issues, reserved_value=0.0),\n    )\n\n    # Run and get result\n    result = session.run()\n    print(f\"Agreement: {result.agreement}, Rounds: {result.step}\")\n\n**Multi-issue negotiation with custom preferences:**\n\n.. code-block:: python\n\n    from negmas import SAOMechanism, AspirationNegotiator, make_issue\n    from negmas.preferences import LinearAdditiveUtilityFunction\n\n    # Create a 2-issue negotiation domain\n    issues = [\n        make_issue(name=\"price\", values=10),\n        make_issue(name=\"quantity\", values=5),\n    ]\n\n    # Define utility functions\n    buyer_ufun = LinearAdditiveUtilityFunction(\n        values={\n            \"price\": lambda x: 1.0 - x / 10.0,  # lower price = better\n            \"quantity\": lambda x: x / 5.0,  # more quantity = better\n        },\n        issues=issues,\n    )\n    seller_ufun = LinearAdditiveUtilityFunction(\n        values={\n            \"price\": lambda x: x / 10.0,  # higher price = better\n            \"quantity\": lambda x: 1.0 - x / 5.0,  # less quantity = better\n        },\n        issues=issues,\n    )\n\n    # Run negotiation\n    session = SAOMechanism(issues=issues, n_steps=100)\n    session.add(AspirationNegotiator(name=\"buyer\"), ufun=buyer_ufun)\n    session.add(AspirationNegotiator(name=\"seller\"), ufun=seller_ufun)\n    session.run()\n\n    # Visualize\n    session.plot()\n\nCommand Line Interface\n----------------------\n\nNegMAS includes a ``negotiate`` CLI for quick experimentation:\n\n.. code-block:: bash\n\n    # Run with default negotiators\n    negotiate -s 50\n\n    # Specify negotiators and steps\n    negotiate -n AspirationNegotiator -n NaiveTitForTatNegotiator -s 100\n\n    # Use Python-native Genius agents (no Java required)\n    negotiate -n GBoulware -n GConceder -s 50\n\n    # Use custom BOA components\n    negotiate -n \"boa:offering=GTimeDependentOffering(e=0.2),acceptance=GACNext\" -n AspirationNegotiator\n\n    # Save results and plot\n    negotiate -s 100 --save-path ./results\n\nSee ``negotiate --help`` for all options, or the `CLI documentation \u003chttps://negmas.readthedocs.io/en/latest/scripts.html\u003e`_.\n\nArchitecture Overview\n---------------------\n\nNegMAS is built around four core concepts:\n\n.. code-block:: text\n\n    ┌─────────────────────────────────────────────────────────────────┐\n    │                           WORLD                                 │\n    │  (Simulation environment where agents interact)                 │\n    │                                                                 │\n    │   ┌─────────┐     ┌─────────┐         ┌─────────────────────┐  │\n    │   │  Agent  │     │  Agent  │   ...   │  BulletinBoard      │  │\n    │   │         │     │         │         │  (Public info)      │  │\n    │   └────┬────┘     └────┬────┘         └─────────────────────┘  │\n    │        │               │                                        │\n    │        │ creates       │ creates                                │\n    │        ▼               ▼                                        │\n    │   ┌─────────────────────────────────────────────────────────┐  │\n    │   │                    MECHANISM                             │  │\n    │   │  (Negotiation protocol: SAO, SingleText, Auction, etc.) │  │\n    │   │                                                          │  │\n    │   │   ┌────────────┐  ┌────────────┐  ┌────────────┐        │  │\n    │   │   │ Negotiator │  │ Negotiator │  │ Negotiator │        │  │\n    │   │   │  + UFun    │  │  + UFun    │  │  + UFun    │        │  │\n    │   │   └────────────┘  └────────────┘  └────────────┘        │  │\n    │   └─────────────────────────────────────────────────────────┘  │\n    └─────────────────────────────────────────────────────────────────┘\n\n**Core Components:**\n\n1. **Outcome Space** (``outcomes`` module)\n   - **Issues**: Variables being negotiated (price, quantity, delivery date, etc.)\n   - **Outcomes**: Specific assignments of values to issues\n   - Supports discrete, continuous, and categorical issues\n\n2. **Preferences** (``preferences`` module)\n   - **UtilityFunction**: Maps outcomes to utility values\n   - Built-in types: ``LinearAdditiveUtilityFunction``, ``MappingUtilityFunction``, ``NonLinearAggregationUtilityFunction``, and more\n   - Supports probabilistic and dynamic utility functions\n\n3. **Negotiators** (``negotiators``, ``sao`` modules)\n   - Implement negotiation strategies\n   - Built-in: ``AspirationNegotiator``, ``TitForTatNegotiator``, ``NaiveTitForTatNegotiator``, ``BoulwareTBNegotiator``, etc.\n   - Easy to create custom negotiators\n\n4. **Mechanisms** (``mechanisms``, ``sao`` modules)\n   - Implement negotiation protocols\n   - ``SAOMechanism``: Stacked Alternating Offers (most common)\n   - Also: Single-text protocols, auction mechanisms, etc.\n\n**For Situated Negotiations (World Simulations):**\n\n5. **Worlds** (``situated`` module)\n   - Simulate environments where agents negotiate\n   - Agents can run multiple concurrent negotiations\n   - Example: Supply chain simulations (SCML)\n\n6. **Controllers** (``sao.controllers`` module)\n   - Coordinate multiple negotiators\n   - Useful when negotiations are interdependent\n\nKey Features\n------------\n\n- **Multiple Protocols**: SAO (Alternating Offers), Single-Text, Auctions, and custom protocols\n- **Rich Utility Functions**: Linear, nonlinear, constraint-based, probabilistic, dynamic\n- **Bilateral \u0026 Multilateral**: Support for 2+ party negotiations\n- **Concurrent Negotiations**: Agents can participate in multiple negotiations simultaneously\n- **World Simulations**: Build complex multi-agent simulations with situated negotiations\n- **Genius Integration**: Run Java-based Genius agents via the built-in bridge\n- **Visualization**: Built-in plotting for negotiation analysis\n- **Extensible**: Easy to add new protocols, negotiators, and utility functions\n\nCreating Custom Negotiators\n---------------------------\n\nNegMAS offers two approaches to creating custom negotiators:\n\n1. **Inheritance**: Subclass a base negotiator and override methods\n2. **Composition**: Combine multiple negotiators using ``MetaNegotiator``\n\nInheritance (Traditional Approach)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSubclass a base negotiator and implement the required methods:\n\n.. code-block:: python\n\n    from negmas.sao import SAONegotiator, ResponseType\n\n\n    class MyNegotiator(SAONegotiator):\n        \"\"\"A simple negotiator using inheritance.\"\"\"\n\n        def propose(self, state, dest=None):\n            # Propose a random outcome above reservation value\n            return self.nmi.random_outcome()\n\n        def respond(self, state, source=None):\n            offer = state.current_offer\n            # Accept any offer with utility \u003e 0.8\n            if offer is not None and self.ufun(offer) \u003e 0.8:\n                return ResponseType.ACCEPT_OFFER\n            return ResponseType.REJECT_OFFER\n\n**Using the negotiator:**\n\n.. code-block:: python\n\n    session = SAOMechanism(issues=issues, n_steps=100)\n    session.add(MyNegotiator(name=\"custom\"), ufun=my_ufun)\n    session.add(AspirationNegotiator(name=\"opponent\"), ufun=opponent_ufun)\n    session.run()\n\nComposition (Ensemble Approach)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nUse ``SAOAggMetaNegotiator`` to combine multiple negotiators and aggregate their decisions:\n\n.. code-block:: python\n\n    from negmas.sao import SAOMechanism, ResponseType\n    from negmas.sao.negotiators import (\n        SAOAggMetaNegotiator,\n        BoulwareTBNegotiator,\n        NaiveTitForTatNegotiator,\n    )\n\n\n    class MajorityVoteNegotiator(SAOAggMetaNegotiator):\n        \"\"\"An ensemble negotiator that uses majority voting.\"\"\"\n\n        def aggregate_proposals(self, state, proposals, dest=None):\n            # Use the proposal from the first negotiator that offers something\n            for neg, proposal in proposals:\n                if proposal is not None:\n                    return proposal\n            return None\n\n        def aggregate_responses(self, state, responses, offer, source=None):\n            # Majority vote: accept if more than half accept\n            accept_count = sum(1 for _, r in responses if r == ResponseType.ACCEPT_OFFER)\n            if accept_count \u003e len(responses) / 2:\n                return ResponseType.ACCEPT_OFFER\n            return ResponseType.REJECT_OFFER\n\n\n    # Create an ensemble of different strategies\n    ensemble = MajorityVoteNegotiator(\n        negotiators=[\n            BoulwareTBNegotiator(),  # Tough strategy\n            NaiveTitForTatNegotiator(),  # Reactive strategy\n            BoulwareTBNegotiator(),  # Another tough vote\n        ],\n        name=\"ensemble\",\n    )\n\n    # Use in a negotiation\n    session = SAOMechanism(issues=issues, n_steps=100)\n    session.add(ensemble, ufun=my_ufun)\n    session.add(AspirationNegotiator(name=\"opponent\"), ufun=opponent_ufun)\n    session.run()\n\nThe ensemble approach is useful for:\n\n- **Voting strategies**: Combine multiple negotiators via majority/weighted voting\n- **Dynamic delegation**: Switch between strategies at runtime\n- **A/B testing**: Compare strategies within the same negotiation\n\nComposition (BOA Components)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nUse ``BOANegotiator`` to build negotiators from reusable components following\nthe Bidding-Opponent modeling-Acceptance (BOA) pattern:\n\n.. code-block:: python\n\n    from negmas.gb.negotiators.modular import BOANegotiator\n    from negmas.gb.components import (\n        GSmithFrequencyModel,  # Opponent modeling\n        GACTime,  # Acceptance strategy\n        GTimeDependentOffering,  # Offering strategy\n    )\n\n    # Create a BOA negotiator with Genius-style components\n    negotiator = BOANegotiator(\n        offering=GTimeDependentOffering(e=0.2),  # Boulware-style offering\n        acceptance=GACTime(t=0.95),  # Accept after 95% of time\n        model=GSmithFrequencyModel(),  # Opponent frequency model\n        name=\"my_boa_agent\",\n    )\n\nThe BOA approach is useful for:\n\n- **Mix-and-match**: Combine different strategies from the Genius library\n- **Research**: Easily swap components to compare different strategies\n- **Extensibility**: Create custom components that integrate with existing ones\n\nCreating Custom Protocols\n-------------------------\n\n.. code-block:: python\n\n    from negmas import Mechanism, MechanismStepResult\n\n\n    class MyProtocol(Mechanism):\n        def __call__(self, state, action=None):\n            # Implement one round of your protocol\n            # Return MechanismStepResult with updated state\n            ...\n            return MechanismStepResult(state=state)\n\nRunning World Simulations\n-------------------------\n\nFor complex scenarios with multiple agents and concurrent negotiations:\n\n.. code-block:: python\n\n    from negmas.situated import World, Agent\n\n\n    class MyAgent(Agent):\n        def step(self):\n            # Called each simulation step\n            # Request negotiations, respond to events, etc.\n            pass\n\n\n    # See SCML package for a complete example\n    # pip install scml\n\nCitation\n--------\n\nIf you use NegMAS in your research, please cite:\n\n.. code-block:: bibtex\n\n    @inproceedings{mohammad2021negmas,\n      title={NegMAS: A Platform for Automated Negotiations},\n      author={Mohammad, Yasser and Nakadai, Shinji and Greenwald, Amy},\n      booktitle={PRIMA 2020: Principles and Practice of Multi-Agent Systems},\n      pages={343--351},\n      year={2021},\n      publisher={Springer},\n      doi={10.1007/978-3-030-69322-0_23}\n    }\n\n**Reference:**\n\n    Mohammad, Y., Nakadai, S., Greenwald, A. (2021). NegMAS: A Platform for Automated Negotiations.\n    In: *PRIMA 2020*. LNCS, vol 12568. Springer. https://doi.org/10.1007/978-3-030-69322-0_23\n\nThe NegMAS Ecosystem\n--------------------\n\nNegMAS is the core of a broader ecosystem for automated negotiation research:\n\n.. image:: https://raw.githubusercontent.com/yasserfarouk/negmas/main/docs/figs/ecosystem.png\n   :alt: NegMAS Ecosystem\n   :align: center\n   :width: 100%\n\n**Competition Frameworks**\n\n- `anl \u003chttps://github.com/autoneg/anl\u003e`_ - Automated Negotiation League (ANAC negotiation track)\n- `scml \u003chttps://github.com/yasserfarouk/scml\u003e`_ - Supply Chain Management League\n\n**Agent Repositories**\n\n- `anl-agents \u003chttps://github.com/autoneg/anl-agents\u003e`_ - ANL competition agents\n- `scml-agents \u003chttps://github.com/yasserfarouk/scml-agents\u003e`_ - SCML competition agents\n\n**Bridges \u0026 Extensions**\n\n- `negmas-geniusweb-bridge \u003chttps://github.com/autoneg/negmas-geniusweb-bridge\u003e`_ - Run GeniusWeb agents\n- `negmas-llm \u003chttps://github.com/autoneg/negmas-llm\u003e`_ - LLM-powered negotiation agents\n- `negmas-elicit \u003chttps://github.com/autoneg/negmas-elicit\u003e`_ - Preference elicitation during negotiation\n- `geniusbridge \u003chttps://github.com/yasserfarouk/geniusbridge\u003e`_ - Java Genius bridge\n\n**Visualization \u0026 Tools**\n\n- `negmas-app \u003chttps://github.com/autoneg/negmas-app\u003e`_ - Applications and interfaces for NegMAS\n- `scml-vis \u003chttps://github.com/yasserfarouk/scml-vis\u003e`_ - SCML visualization\n- `jnegmas \u003chttps://github.com/yasserfarouk/jnegmas\u003e`_ - Java interface (not maintained)\n\n**Specialized Tools**\n\n- `negmas-elicit \u003chttps://github.com/autoneg/negmas-elicit\u003e`_ - Preference Elicitation during Negotiation Methods\n\nMore Resources\n--------------\n\n- **Tutorials**: https://negmas.readthedocs.io/en/latest/tutorials.html\n- **API Reference**: https://negmas.readthedocs.io/en/latest/api.html\n- **YouTube Playlist**: https://www.youtube.com/playlist?list=PLqvs51K2Mb8IJe5Yz5jmYrRAwvIpGU2nF\n- **Publications**: https://negmas.readthedocs.io/en/latest/publications.html\n\nPapers Using NegMAS\n-------------------\n\nSelected papers (see `full list \u003chttps://negmas.readthedocs.io/en/latest/publications.html\u003e`_):\n\n**Core NegMAS Research** (by the NegMAS authors)\n\n- Mohammad, Y. (2025). `Tackling the Protocol Problem in Automated Negotiation \u003chttps://www.ifaamas.org/Proceedings/aamas2025/pdfs/p246.pdf\u003e`_. AAMAS. *Cited by 1*\n- Florijn et al. (2025). `A Survey on One-to-Many Negotiation \u003chttps://www.ijcai.org/proceedings/2025/928\u003e`_. IJCAI. *Cited by 1*\n- Mohammad, Y. et al. (2024). `Automated Negotiation in Supply Chains: A Generalist Environment for RL/MARL \u003chttps://doi.org/10.1007/978-981-96-1072-1_1\u003e`_. PRIMA. *Cited by 1*\n- Mohammad, Y. (2023). `Generalized Bargaining Protocols \u003chttps://doi.org/10.1007/978-981-99-8391-9_27\u003e`_. AI 2023. *Cited by 3*\n- Mohammad, Y. (2023). `Optimal Time-based Strategy for Automated Negotiation \u003chttps://doi.org/10.1007/s10489-022-03893-x\u003e`_. Applied Intelligence. *Cited by 9*\n- Mohammad, Y. (2023). `Evaluating Automated Negotiations \u003chttps://doi.org/10.1109/WI-IAT59888.2023.00015\u003e`_. IEEE WI-IAT. *Cited by 2*\n- Mohammad, Y. (2021). `Concurrent Local Negotiations with a Global Utility Function \u003chttps://doi.org/10.1007/s10458-020-09490-7\u003e`_. AAMAS Journal. *Cited by 14*\n- Mohammad, Y. (2020). `Optimal Deterministic Time-based Policy in Automated Negotiation \u003chttps://doi.org/10.1007/978-3-030-69322-0_5\u003e`_. PRIMA. *Cited by 4*\n- Mohammad, Y., Nakadai, S. (2019). `Optimal Value of Information Based Elicitation \u003chttps://dl.acm.org/doi/10.5555/3306127.3331698\u003e`_. AAMAS.\n- Mohammad, Y., Nakadai, S. (2018). `FastVOI: Efficient Utility Elicitation \u003chttps://doi.org/10.1007/978-3-030-03098-8_34\u003e`_. PRIMA.\n- Mohammad, Y. et al. (2019). `Supply Chain Management World \u003chttps://doi.org/10.1007/978-3-030-33792-6_10\u003e`_. PRIMA. *Cited by 38*\n\n**Competition \u0026 Benchmarks**\n\n- Aydoğan et al. (2025). `ANAC 2024 Challenges and Results \u003chttps://www.ifaamas.org/Proceedings/aamas2025/pdfs/p2640.pdf\u003e`_. AAMAS. *Cited by 2*\n- Aydoğan et al. (2020). `Challenges and Main Results of ANAC 2019 \u003chttps://doi.org/10.1007/978-3-030-66412-1_23\u003e`_. EUMAS/AT. *Cited by 51*\n\n**Negotiation Strategies**\n\n- Sengupta et al. (2021). `RL-Based Negotiating Agent Framework \u003chttps://arxiv.org/abs/2102.03588\u003e`_. IJCAI *Cited by 48*\n- Higa et al. (2023). `Reward-based Negotiating Agent Strategies \u003chttps://ojs.aaai.org/index.php/AAAI/article/view/26831\u003e`_. AAAI. *Cited by 16*\n\n**Applications**\n\n- Inotsume et al. (2020). `Path Negotiation for Multirobot Vehicles \u003chttps://doi.org/10.1109/IROS45743.2020.9340819\u003e`_. IROS. *Cited by 17*\n\n*Last updated: February 2026*\n\nContributing\n------------\n\nContributions are welcome! Please see the `contributing guide \u003chttps://negmas.readthedocs.io/en/latest/contributing.html\u003e`_.\n\nLicense\n-------\n\nNegMAS is released under the BSD 3-Clause License.\n\nAI Assistance Disclosure\n------------------------\n\nThis project uses AI assistance for specific, limited tasks while remaining predominantly human-developed:\n\n- **Publications list**: AI assisted in compiling and formatting the publications list\n- **Documentation polishing**: AI assisted in proofreading and improving documentation clarity\n- **gb.components.genius module**: AI assisted in reimplementing Genius BOA components in NegMAS\n- **Registry feature**: AI assisted in developing the negotiator/mechanism registry system\n- **Some tests**: AI assisted in writing tests, particularly for new features like the registry\n\nAll AI-assisted contributions are reviewed and approved by human maintainers. The core architecture,\nalgorithms, and research direction of NegMAS are human-driven and will remain so.\n\nAcknowledgements\n----------------\n\nNegMAS was developed at the NEC-AIST collaborative laboratory. It uses scenarios from\nANAC 2010-2018 competitions obtained from the `Genius Platform \u003chttp://ii.tudelft.nl/genius\u003e`_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyasserfarouk%2Fnegmas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyasserfarouk%2Fnegmas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyasserfarouk%2Fnegmas/lists"}