scml.cli ======== .. py:module:: scml.cli .. autoapi-nested-parse:: The SCML universal command line tool Attributes ---------- .. autoapisummary:: scml.cli.n_completed scml.cli.n_total scml.cli.DEFAULT_STD_OLD scml.cli.DEFAULT_STD_2021 scml.cli.DEFAULT_ONESHOT scml.cli.DEFAULT_STD scml.cli.DEFAULT_2021_NONCOMPETITORS scml.cli.DEFAULT_STD_NONCOMPETITORS_OLD scml.cli.DEFAULT_ONESHOT_NONCOMPETITORS scml.cli.DEFAULT_STD_NONCOMPETITORS scml.cli.DB_FOLDER scml.cli.DB_NAME Functions --------- .. autoapisummary:: scml.cli.gui_option scml.cli.get_range scml.cli.default_log_path scml.cli.save_run_info scml.cli.default_tournament_path scml.cli.default_world_path scml.cli.print_progress scml.cli.print_world_progress scml.cli.shortest_unique_names scml.cli.nCr scml.cli.main scml.cli.display_results scml.cli._path scml.cli.run2019 scml.cli.run2020 scml.cli.run2021 scml.cli.run2022 scml.cli.run2023 scml.cli.run2024 scml.cli.tournament2019 scml.cli.tournament2020 scml.cli.tournament2021 scml.cli.tournament2022 scml.cli.tournament2023 scml.cli.tournament2024 scml.cli.version Module Contents --------------- .. py:function:: gui_option(x) .. py:data:: n_completed :value: 0 .. py:data:: n_total :value: 0 .. py:data:: DEFAULT_STD_OLD :value: 'RandomAgent;BuyCheapSellExpensiveAgent;SatisficerAgent;DecentralizingAgent;DoNothingAgent' .. py:data:: DEFAULT_STD_2021 :value: 'MarketAwareDecentralizingAgent;RandomAgent;SatisficerAgent;DecentralizingAgent' .. py:data:: DEFAULT_ONESHOT :value: 'GreedySyncAgent;SyncRandomOneShotAgent' .. py:data:: DEFAULT_STD :value: 'GreedySyncAgent;SyncRandomStdAgent;SyncRandomOneShotAgent' .. py:data:: DEFAULT_2021_NONCOMPETITORS :value: ['scml.scml2020.agents.DecentralizingAgent', 'scml.scml2020.agents.BuyCheapSellExpensiveAgent'] .. py:data:: DEFAULT_STD_NONCOMPETITORS_OLD :value: ['scml.scml2020.agents.DecentralizingAgent', 'scml.scml2020.agents.BuyCheapSellExpensiveAgent'] .. py:data:: DEFAULT_ONESHOT_NONCOMPETITORS :value: ['scml.oneshot.agents.RandDistOneShotAgent', 'scml.oneshot.agents.EqualDistOneShotAgent'] .. py:data:: DEFAULT_STD_NONCOMPETITORS :value: ['scml.std.agents.GreedyStdAgent', 'scml.std.agents.RandomStdAgent',... .. py:function:: get_range(x, x_min, x_max) Gets a range with possibly overriding it with a single value .. py:function:: default_log_path() Default location for all logs .. py:data:: DB_FOLDER .. py:data:: DB_NAME :value: 'rundb.csv' .. py:function:: save_run_info(name: str, log_path: pathlib.Path | str | None, type_: str = 'world', path: pathlib.Path = DB_FOLDER) .. py:function:: default_tournament_path() The default path to store tournament run info .. py:function:: default_world_path() The default path to store world run info .. py:function:: print_progress(_, i, n) -> None Prints the progress of a tournament .. py:function:: print_world_progress(world) -> None Prints the progress of a world .. py:function:: shortest_unique_names(strs: List[str], sep='.') Finds the shortest unique strings starting from the end of each input string based on the separator. The final strings will only be unique if the inputs are unique. .. rubric:: Example given ["a.b.c", "d.e.f", "a.d.c"] it will generate ["b.c", "f", "d.c"] .. py:function:: nCr(n, r) .. py:function:: main() .. py:function:: display_results(results, metric, file_name=None) .. py:function:: _path(path) -> pathlib.Path Creates an absolute path from given path which can be a string .. py:function:: run2019(steps, levels, competitors, log, compact, log_ufuns, log_negs, raise_exceptions, path, world_config) .. py:function:: run2020(steps, time, competitors, log, compact, log_ufuns, log_negs, raise_exceptions, path, world_config, show_contracts) .. py:function:: run2021(steps, time, competitors, log, compact, log_ufuns, log_negs, raise_exceptions, path, world_config, show_contracts, oneshot, name, method) .. py:function:: run2022(steps, time, competitors, log, compact, log_ufuns, log_negs, raise_exceptions, path, world_config, show_contracts, oneshot, name, method) .. py:function:: run2023(steps, time, competitors, log, compact, log_ufuns, log_negs, raise_exceptions, path, world_config, show_contracts, oneshot, name, method) .. py:function:: run2024(steps, time, competitors, log, compact, log_ufuns, log_negs, raise_exceptions, path, world_config, show_contracts, oneshot, name, method) .. py:function:: tournament2019(output, parallel, name, steps, ttype, timeout, configs, runs, max_runs, competitors, non_competitors, log, world_config, verbosity, log_ufuns, log_negs, compact, raise_exceptions, path, cw) .. py:function:: tournament2020(name, steps, timeout, ttype, log, verbosity, runs, configs, max_runs, competitors, world_config, non_competitors, compact, log_ufuns, log_negs, raise_exceptions, path, cw, parallel, output) .. py:function:: tournament2021(name, steps, timeout, ttype, log, verbosity, runs, configs, max_runs, competitors, world_config, non_competitors, compact, log_ufuns, log_negs, raise_exceptions, path, cw, parallel, output) .. py:function:: tournament2022(name, steps, timeout, ttype, log, verbosity, runs, configs, max_runs, competitors, world_config, non_competitors, compact, log_ufuns, log_negs, raise_exceptions, path, cw, parallel, output) .. py:function:: tournament2023(name, steps, timeout, ttype, log, verbosity, runs, configs, max_runs, competitors, world_config, non_competitors, compact, log_ufuns, log_negs, raise_exceptions, path, cw, parallel, output) .. py:function:: tournament2024(name, steps, timeout, total_timeout, ttype, log, verbosity, runs, configs, max_runs, competitors, world_config, non_competitors, compact, log_ufuns, log_negs, raise_exceptions, path, cw, parallel, output) .. py:function:: version()