Package: scml
ANAC Supply Chain Management League PlatformOverviewThis repository is the official platform for running ANAC Supply Chain Management Leagues. It will contain a package
calledscmlXXXXfor the competition run in year XXXX. For example scml2019 will contain all files related to the
2019’s version of the competition.Installationpip install scmlYou can also install the in-development version with:pip install https://github.com/yasserfarouk/scml/archive/master.zipDocumentationhttps://scml.readthedocs.ioDevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.6.3 (2023.12.11)typing updateremoving unnecessary sphinxtestersrequiring latest stable_baselinesdoc updatebugfix in scml2020 adapter to run oneshotAdding skeleton for the new std simulationAdding 2024 utility functions and worldsSwitching docs to scml.readthedocs.io0.6.2 (2023.11.27)upgrading CI to python 3.12importing observationsdropping support for python < 3.10Completing first draft of the RL environment0.6.1 (2023.7.9)Moving scml.scml2020.utils to scml.utils (to avoid a circular import in rl/factory)This is an initial effort to have RL work for scml. Currently we are disabling the extra checks on observation and
world construction because they lead to failures. This needs to be rectified later.Added the concept of a WorldFactory to generate worlds with predefined characteristics from the point of view of the learning agent.Now environments, action managers, and observation managers all receive WorldFactory objects and automatically check for compatibility.0.6.0 (2023.7.9)Upgrading to be compatible with NegMAS 0.10.0Adding step_with() to oneshot allowing for single counter-offer set stepping of the simulation (to be used to expose the simulation as RL and MARL environments later).Adding current_negotiation_details to OneShotAWI to get details of running negotiationAdding managed sales, supplies, total_sales, total_supplies, needed_sales, and needed_supplies to the OneShotAWIExtending OneShotState returned from awi.state and awi.default_state_encoder(mechanism_states) to expose more information about the simulation0.5.6 (2023.3.8)Upgrading to be compatible with NegMAS 0.9.8Updating notebooks for 2023 releaseAdding 2023 specific classes and utility functionsSupporting most recent negmas version on GithubAdding the ability to use raw collusion scoresIn the collusion track, it is now possible to control how much does the
raw collusion score affect the final score relative to the difference
between raw collusion score and standard score.more reobust renaming when reveal-names is set0.5.5 (2022.5.18)bugfix in anac2022_* methods: Score reporting was not accurate because of a change in naming convention in negmas.adding agent-processes to SCML2022World.generateAdding SCML2022World which is just an alias for SCML2021Worldbugfix #96 Partial List of Agent Scores: Also discussion $94Incorrect agent types and mysterious agents appearing in the scores
list.Inaccurate placement of agents in the simulationdisabling tests taking too long on CIcommenting members of Profile, Contract in oneshot0.5.4 (2022.5.15)Disabling adapter testing. Adapting SCML2020 and OneShot agents is too much effort and is not reallly that useful. We will eventually remove support for that.Improving control over oneshot world generation. SCML2020OneShotWorld.generat() method now is more consistent in the way it creates agents.Adding wide_price_range to control the unit-price range0.5.3 (2022.5.14)randomizing starting agents in oneshotimproving AWI typing in oneshotResetting agents before making negotiationsbefore_step() was also resetting agents in oneshot. This meant that allnegotiators that were created in _make_negotiations() were deleted inreset().Now we call  reset() before making negotaitions and before_step() afterthat.This guarantees that the agent has access to its negotiators inbefore_step() as in 2020.Adding new collusion evaluationGoal: Disentangle the quality of the collusion strategy and the standardstrategy.Method: Each agent now has 3 factories in collusion. We run foursimulations:s0: The agent controls all of the three factoriess1-s3: The agent controls one of themThe final score of the agent is its score in s0 minus the average scoreit got in s1-s3Avoid calling counter_all before first_offersgithub actions updateimproved testing of sync behaviorConfirming that OneShotSync gets all offers every counter_all() call and upper limiting the difference in negotiation speeds based on Jackson’s code0.5.2 (2022.4.8)Minor fixes in the utilities module to simplify running anac 2022 tournaments.0.5.1 (2022.3.10)giving more time to testing 2020 with randomavoiding a hashing issue in second tutorialrejecting crazy offers in satisficerensuring that from_offers recevied tuple[tuple]oneshto ufun speedupadding ANAC 2022 running functions scml2020.utilsimport cleanupcontrol sync_calls when creating oneshot worldsfix: requirements.txt to reduce vulnerabilities0.5.0 (2022.2.17)Compatibility with NegMAS 0.9.00.4.9 (2021.7.30)[bugfix] #73 ufun was sometimes one-step back0.4.8 (2021.7.28)[bugfix] Bankrupt agents kepts requesting negotiations[bugfix] trading prices inaccurate during step[std] Adding spot_market_quantity/loss to the AWI[oneshot] Adding helpers to avoid crazy prices0.4.7 (2021.7.15)[std/collusion] keeping compatibility with 2020[std/collusion] Avoiding crash when agent class names is shorter than 2letters[std/collusion] rare division by zero error[oneshot] forcing n_processes to 2 in tournaments0.4.6 (2021.6.15)[all tracks] Adding convenience methods to AWIs. closes #49[all tracks] reducing production cost range[all tracks] casting offers to ints explicitly to avoid bugs in agents offering fractional quantities/unit_prices[oneshot] avoiding ultimatum in oneshot (was disabled)[oneshot] Addcurrent-inventoryto OneshotAWI which will always return zero for compatibility with the other tracks[onesht] adding public_* to summary.[oneshot] penalty scale was incaccurate[std/collusion] Adding satisficer agent[std/collusion] adding guarnteed_profit method of world generation[std/collusion] better handling of predictions in builtin[std/collusion] experimental better decentralizing agent[std/collusion] Increasing profit potential[speedup] avoid saving negotiations online0.4.5 (2021.6.14)[oneshot] refactoring using before_step in greedy[minor] formating update[bugfix] production costs were not increasing.  closes #38[API] Adding before_step() to all agents. If a method calledbefore_step()is defined for an agent, it will be called once every simulated day before any other calls to the agent but after all exogenous contracts and ufun parameters are fixed.  Note thatstep()is called at theendnot the beginning of the day.[oneshot] limiting exogenous quantities to n lines. This closes #37[oneshot] Aspiration negotiator gets more agreements[oneshot] allowing agents to skip their turn. Agents can skip their turn now by returning REJECT_OFFER, None[oneshot] GreedyOneShotAgent is more rational now[bugfix] avoiding an inconsistency in path names for logs[oneshot] improved builtin agents (aspiration)[tournament] avoiding a possible edge case that would have led to competitor agents appearing as non-competitors[tournament] Saving negotiatinos by default in the CLI and utils[std/coll] defaulting to narrower worlds0.4.4 (2021.6.1)[oneshot] Matching default parameters of world generation to game description.0.4.3 (2021.6.1)[oneshot] Adding OneshotIndNegotiatorsAgent to use independent negotiators in oneshot[std/coll] updating builtin compoenents to be more rational[bugfix] failure in distributing products when the number of agents per process becomes large.[cli] changes on default competitors in the CLI[oneshot] adding the option to disable avoid-ultimatum (and disabling it for now)[oneshot] making sure needs are integers in greedy[bugfix] negotiator id is not the same as partner id sometimes[cli] adding –name to run2021 command to control world name[bugfix] negotiator_id and partner_id were not equal[eval] ensuring that ageents are run in exactly the same conditions[eval] adding zscore, iqr, fraction (old iqr -> iqr_fraction) to truncated  mean[cli] changing default n. competitors to 2[oneshot] adding an option not to count/not count future contracts on bankrruptcy0.4.2 (2021.5.10)[bugfix] Avoiding an error if an agent gave a fractional unit-price[bugfix] avoiding a test failure in CI that cannt be reproduced (I hate doing that :-( )[bugfix] added current_inventory to 2020’s awi fixes $31[cli] Changing default agents for oneshot in cli[tournament] adding truncated-mean as an evaluation criterion and making it the default for scml20210.4.1 (2021.5.2)This is an important update. All participants in SCML 2021 should upgrade
to this version[visualizer] adding run information for the visualizer[bugfix] Std agents running in OneShot were able to request selling from the wrong agents.[docs] doc update (storage cost -> disposal, deilvery penalty -> shortfall)[core] supporting 3.9[oneshot] better optimized ufun calculation[oneshot] improved ufun calculation. Still not exact.[2021] Adding current_balance to all AWIs and using it in oneshot ufun[2020] Exporting AWI, Failure from scml2020.world for backward comp.0.4.0 (2021.3.18)This is an important update. All participants in SCML 2021 should upgrade
to this versioncompatibility with negmas 0.8.0[oneshot] bugfix in random negotiator with ami is None[scml2020] all market aware agents work now and are parametrized[onshot] calculating ufun limits only for normalized ufuns.  Agents now MUSTcall find_limit() explicitly on the ufun to calculate limits except for ufunscreated passing normalized=True in which find_limit() is called to calculatebest and worst in construction.[oneshot][bugfix] my_consumers was wrong issue fix #13[docs] documentation update[oneshot] adding running_negotiations and unsigned_contracts[oneshot] changing breach conditions[docs] Update README.rst0.3.4 (2021.3.8)compatibility with negmas 0.7.4minor bugfixes0.3.3 (2021.2.22)This is an important update. All participants in SCML 2021 should upgrade to this versionAllowing std/collusion agents to run in OneShot trackAdding min_utility, max_utility to ufunAdding exogenous_*_predictability parametersUsing these parameters SCML2020/2021/OneShot worlds can be configured so that the exogenous contracts of the same agents at different time-steps are predictable (or not). If predictability is zero then each agent can have any quantity for its exogenous contracts. If predictability is 1.0 then it will have the same quantity at every time-step and if it is somewhere in between, the quantity at different steps will be similar to each other.Allowing OneShot agents to run in std trackbalance in one-shot plus bug fixes (lots of them)Adding oneshot module for SCML2020-Oneshot trackAdding disallow_concurrent_negs_with_same_partners If given, avoids concurrent negotiations between the same partners.  Avoiding adding assignment number twice to world namesAdding an upper/lower limit on buying/selling pricesAdding extra scores for collusion leagueDo not sign clearly bad contracts (Decnetralizing)Dropping contracts with time >= current step.  These were already being dropped but may not have had a dropped_at valueNever save videos/logs in tournamentsavoiding test failure if PyQT was not installedExplicitly dropping invalid contractsContracts with 0 price/quantity are nullified0.3.0 (2020.7.2)This is an important update. All participants in SCML 2020 should upgrade to this version[bugfix] Production cost is not properly discounted. This is an important issue.
All simulations were conducted using the same zero production cost for all factories.Speeding up tournament tests (smaller worlds)consistent naming of non-competitorsAdding dynamic choice of non-competitorsRemoving random from the set of default agentsCompatibility with NegMAS 0.6.140.2.14 (2020.5.05)[docs] documentation and testing update.[setup] Making PyQT optional.[setup] Requiring negmas 0.6.13.0.2.13 (2020.4.15)[docs] Adding more tutorialsminor. Maing the controller optional in request_negotiationsadding score to FactorySimulator to estimate final score0.2.12 (2020.4.13)forcing negmas 0.6.11 or newerdocumentation updateenabling setting the mechanism parameters in SCML2020Worldbugfix in PredictionBasedTradingStrategy0.2.11 (2020.3.29)bugfix in the CLI when running tournament2019bugfix in MeanERPrediction for breached contractsmaking CheapBuyer compatible with the latest negmas versiondoc updateremoving all agent logs in built-in agents to speedup simulationschanging cli script name back to cli.py. This was done to avoid a weird import error when running configs that use the cli in pycharmadding profiling info snapshot to the repository0.2.10 (2020.3.25)minor updates to be compatible with the latest negmasdocumentation updateavoid exception if gui is not installed0.2.9 (2020.3.19)CI using Github Actionsconsolidating tests outside src directoryAdding advanced script and upgrading negmasremoving unnecessary init function from simulatorshowing shorter names in tournament run results0.2.8 (2020.3.13)documentation update (specially the scripts section)Adding a –gui option to scml CLI to run it as a simple GUISimplifying the parameters of SCML CLI by keeping only the onese that
do not conflict with the default parameters used in the competitionadding a script call scmladv.py which keep all the detailed parameters
used earlied in SCML.0.2.7 (2020.3.09)Documentation updateAdding trading_strategy_init/step functions.Correcting a bug in n_competitors_per_world.allowing control of the number of participants per simulation explicitly in scml2020[SCML2020] Activating negotiation step quota[Doc] Adding a tutorial about logs and statscorrecting the display in scml run2020removing the docs from the package to save space0.2.6 (2020.2.27)[testing] correcting a test to ignore system agents when checking for
bankruptcy[minor] Reformating using Black[bugfix] Resolving a but in the CLI tournament command that prevented it from
running with default parameters0.2.5 (2020.2.27)[Documentation] Removing inherited members to make the documentation easier to
follow[CLI] Improving the display of run2020 command0.2.4 (2020.2.21)[speed] improvement in tournament running[bugfix] handling very short simulations0.2.3 (2020.2.15)adding more details to tournament runsupdate to tournament utilities of SCML2020doc update and correcting a bug in world generationbetter initialization of production graph depthcorrecting default factory assignments (if any)making do_nothing agent really do nothing in scml2020removing unnecessary assertioncorrecting world generation using the new width first approachcorrecting world generation using the new width first approachdocumentation updateadding no_logs option to SCMLWorld2019 and SCMLWorld2020changing default logging location for SCML2019 and SCML2020 to ~/negmas/logs/tournamentchanging the way worlds are generated in SCML2020 to minimize the number of agents per level allowing the depth to increaseremoving built docs from the repositorymodification to .gitignoreupdating .gitignore0.2.2 (2020.1.31)adding componentsadding second tutorial0.2.1 (2020.1.23)better tutorialbetter strategies0.2.0 (2020.1.8)new interface for singing and callbacksnew interface for exogenous contractsimproved decentralizing strategy0.1.5 (2019.12.11)correcting tournament implementation for SCML2020updates to SCML2019 agents to be compatible with newer versions of negmas0.1.3 (2019-12-08)adding run2020 to scml commands (see the command line tool’s documentation)Now tournaments run for SCML 2020 configuration0.1.2 (2019-12-01)Adding SCML 2020 simulation.0.1.1 (2019-11-25)Adding all agents from SCML 2019 competition to thescml2019package.Adding first draft of SCML 2020 implementation.0.1.0 (2019-11-20)First release on PyPI.