Code Monkey home page Code Monkey logo

negmas's Introduction

Hi there πŸ‘‹

  • πŸ”­ I’m currently working on ... NegMAS and SCML mostly
  • 🌱 I’m currently learning ... Julia
  • πŸ‘― I’m looking to collaborate on ... Automated Negotiation Projects
  • πŸ€” I’m looking for help with ... SCML visualization
  • πŸ“« How to reach me: ... [email protected]

Yasser's github stats

negmas's People

Contributors

a4rcvv avatar ayansengupta17 avatar dependabot[bot] avatar eareyan avatar ktrh avatar snyk-bot avatar yasserfarouk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

negmas's Issues

anac2019_std world config bug

Hello,

I'd like to extend the anac2019_std tournament deadline and for that purpose, set total_time_out to 72000, but it appears that it still considers the default parameter 7200 and the tournament finishes in two hours, I've found that anac_2019_config_generator in scml.utils always assigns total_time_out to 7200 which may be potentially the cause of the bug.

Github workflow fails

Describe the bug
Github workflow fails with

urllib.error.URLError: <urlopen error [Errno 110] Connection timed out>
Downloading: http://www.yasserm.com/scml/geniusbridge.jar

Rerunning it manually fixes it.
To Reproduce
Steps to reproduce the behavior:
Commit and Push any update

Expected behavior
Pass all the CI/CD pipelines

Screenshots
I am attaching the logs

logs.txt

Problems about logging

Describe the bug

There are some bugs about logging.

  • self.awi.logdebug_agent()` does not work
  • World logs are stored in the log files of each agent.

To Reproduce

Run this script

from negmas import Outcome, MechanismState, ResponseType
from scml import SCML2023OneShotWorld, GreedySyncAgent
from scml.oneshot import OneShotAgent


class MyAgent(OneShotAgent):
    def init(self):
        super().init()
        self.awi.logdebug_agent("agent!")
        self.awi.logdebug("world!")

    def propose(self, negotiator_id: str, state: MechanismState) -> Outcome:
        return tuple([1, 1, 1])

    def respond(
        self, negotiator_id: str, state: MechanismState, offer: Outcome
    ) -> ResponseType:
        return ResponseType.ACCEPT_OFFER


world = SCML2023OneShotWorld(
    **SCML2023OneShotWorld.generate(
        agent_types=[MyAgent] * 2,
        agent_processes=[0, 1],
        n_steps=3,
        n_processes=2,
        name="test",
    )
)

world.run()

Expected behavior

actual behaviour

([email protected])

2023-04-04 21:54:36,439 - DEBUG - 0/3 [0.00%]: world!
2023-04-04 21:54:36,439 - DEBUG - 0/3 [0.00%]: world!
2023-04-04 21:54:36,439 - INFO - 0/3 [0.00%]: 0 Negotiations/4 Agents
2023-04-04 21:54:36,440 - DEBUG - 0/3 [0.00%]: 01My@1 requested to buy 1 to 00My@0 q: (1, 10), u: (15, 16), t: (0, 0)
...

(log.txt)

2023-04-04 21:54:36,437 - INFO - 0/3 [0.00%]: test: World Created
2023-04-04 21:54:36,438 - INFO - 0/3 [0.00%]: 00My@0 joined
2023-04-04 21:54:36,438 - INFO - 0/3 [0.00%]: 01My@1 joined
2023-04-04 21:54:36,438 - INFO - 0/3 [0.00%]: SELLER joined
2023-04-04 21:54:36,438 - INFO - 0/3 [0.00%]: BUYER joined
2023-04-04 21:54:36,439 - DEBUG - 0/3 [0.00%]: world!
2023-04-04 21:54:36,439 - DEBUG - 0/3 [0.00%]: world!
2023-04-04 21:54:36,439 - INFO - 0/3 [0.00%]: 0 Negotiations/4 Agents
2023-04-04 21:54:36,440 - DEBUG - 0/3 [0.00%]: 01My@1 requested to buy 1 to 00My@0 q: (1, 10), u: (15, 16), t: (0, 0)

Desktop (please complete the following information):

  • OS: macOS Ventura 13.2.1 (with M1)
  • Python version: 3.10.10
  • package versions:
    • negmas: 0.9.8
    • scml: 0.5.6
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context

I think negmas.helpers.logging.create_loggers() (here) has some problems.

  • Logs from each agent are sent to the root logger, which has the default logging level (=WARNING).
    • Debug level logs are ignored.
  • World logs are sent to the "logging" logger, whose parent logger is the root logger.
    • World logs are propagated to the root logger. As the root logger has file log handlers associated with each agent, world logs are written to each agent's log file.

γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2023-04-04 22 28 40

γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2023-04-04 22 29 24

Application Areas and Negotiation models.

@yasserfarouk

Sir, Thanks for developing this excellent library with good documentation.

I would like to know
(a) what are some of the other business areas where this negotiation agents paradigm can be used (I mean other than the typical factory or supply chain process ). For instance, can this be used for financial portfolio optimization for example as a model, a seller offers to construct financial portfolio for the buyer with a certain monetary return value and risk where as the buyer expects the seller to construct a low risk portfolio with a high return over a certain tenure. ?

(b) Can this approach be used to solve operations research problems like route planning or optimization?

(c) How does Negmas' approach differ from typical constraint based optimization methods?

Would be great if you can share your thoughts and inputs. Thank you in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.