PyNeg is a Python library for experimenting and benchmarking automated negotiatons. Using both Numpy and ProbLog as a background it can take advantage of probabalistic models and complex knowledge bases.
Some simple negotiation strategies have already been implemented and provide a template for how to implement new negotiation strategies and how to combine the various parts into an agent. This library favours composition over inheretance and thus is very modular.
for a more detailed explanation please refer to the documentation.
Minimal Working Example
>>> from pyneg.agent.agent_factory import make_linear_concession_agent
>>> neg_space = {"first":[0, 1, 2, 3, 4], "second":[5,6,7,8,9]}
>>> utilities_a = {"second_5":10,"second_9":-10,"first_0":-5,"first_3":5}
>>> utilities_b = {"second_5":-5,"second_7":5,"first_0":10,"first_4":-10}
>>> res_a = 0.1
>>> res_b = 0.1
>>> non_agreement_cost = -10**100
>>> agent_a = make_linear_concession_agent("A",neg_space,utilities_a,res_a,non_agreement_cost)
>>> agent_b = make_linear_concession_agent("B",neg_space,utilities_b,res_b,non_agreement_cost)
>>> agent_a.negotiate(agent_b)
True
>>> agent_a._transcript
[(A=>B;OFFER;[first->3, second->5]),
(B=>A;OFFER;[first->0, second->7]),
(A=>B;OFFER;[first->1, second->5]),
(B=>A;OFFER;[first->0, second->6]),
(A=>B;OFFER;[first->2, second->5]),
(B=>A;OFFER;[first->0, second->8]),
(A=>B;OFFER;[first->4, second->5]),
(B=>A;OFFER;[first->0, second->9]),
(A=>B;OFFER;[first->3, second->6]),
(B=>A;OFFER;[first->1, second->7]),
(A=>B;OFFER;[first->0, second->5]),
(B=>A;ACCEPT;[first->0, second->5])]
Metadata
Release files for pyneg 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyneg-1.0.2.tar.gz | 31.1 kB | Without provenance | Details for pyneg-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyneg-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for pyneg-1.0.2-py3-none-any.whl |
Total release size: 79.0 kB
Release files / pyneg-1.0.2.tar.gz
| Download URL | pyneg-1.0.2.tar.gz |
|---|---|
| Size | 31.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aefe703a35cf919a5b7ec91e0ce3cb6b0854674df086f471b567d2ae57ce9c42
|
|
BLAKE2b-256 checksum How to use checksums |
da6afa281c263f50ddc23457663e6489159c61175e644b694173c4e5d46c2a13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
|
Release files / pyneg-1.0.2-py3-none-any.whl
| Download URL | pyneg-1.0.2-py3-none-any.whl |
|---|---|
| Size | 47.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a85e8a995739668ab13a8673e38f2194872f4000697de96412f55b58b1acf9f7
|
|
BLAKE2b-256 checksum How to use checksums |
5328e7caeb7ace3bd183ad10bbc4c57339a1663e86aabf002e82eb89cbeefafd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
|
Security for pyneg 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.