scml.cli

The SCML universal command line tool

Module Contents

Functions

gui_option(x)

get_range(x, x_min, x_max)

Gets a range with possibly overriding it with a single value

default_log_path()

Default location for all logs

save_run_info(name, log_path[, type_, path])

default_tournament_path()

The default path to store tournament run info

default_world_path()

The default path to store world run info

print_progress(→ None)

Prints the progress of a tournament

print_world_progress(→ None)

Prints the progress of a world

shortest_unique_names(strs[, sep])

Finds the shortest unique strings starting from the end of each input

nCr(n, r)

main()

tournament2019(output, parallel, name, steps, ttype, ...)

tournament2020(name, steps, timeout, ttype, log, ...)

display_results(results, metric[, file_name])

_path(→ pathlib.Path)

Creates an absolute path from given path which can be a string

run2019(steps, levels, competitors, log, compact, ...)

run2020(steps, time, competitors, log, compact, ...)

run2024(steps, time, competitors, log, compact, ...)

run2023(steps, time, competitors, log, compact, ...)

run2022(steps, time, competitors, log, compact, ...)

run2021(steps, time, competitors, log, compact, ...)

tournament2022(name, steps, timeout, ttype, log, ...)

tournament2021(name, steps, timeout, ttype, log, ...)

tournament2024(name, steps, timeout, total_timeout, ...)

tournament2023(name, steps, timeout, ttype, log, ...)

version()

Attributes

n_completed

n_total

DB_FOLDER

DB_NAME

DEFAULT_STD_OLD

DEFAULT_STD_2021

DEFAULT_2021_NONCOMPETITORS

DEFAULT_ONESHOT

DEFAULT_STD

DEFAULT_ONESHOT_NONCOMPETITORS

DEFAULT_STD_NONCOMPETITORS

scml.cli.gui_option(x)[source]
scml.cli.n_completed = 0[source]
scml.cli.n_total = 0[source]
scml.cli.get_range(x, x_min, x_max)[source]

Gets a range with possibly overriding it with a single value

scml.cli.default_log_path()[source]

Default location for all logs

scml.cli.DB_FOLDER[source]
scml.cli.DB_NAME = 'rundb.csv'[source]
scml.cli.save_run_info(name: str, log_path: pathlib.Path | str | None, type_: str = 'world', path: pathlib.Path = DB_FOLDER)[source]
scml.cli.default_tournament_path()[source]

The default path to store tournament run info

scml.cli.default_world_path()[source]

The default path to store world run info

scml.cli.print_progress(_, i, n) None[source]

Prints the progress of a tournament

scml.cli.print_world_progress(world) None[source]

Prints the progress of a world

scml.cli.shortest_unique_names(strs: List[str], sep='.')[source]

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.

Example

given [“a.b.c”, “d.e.f”, “a.d.c”] it will generate [“b.c”, “f”, “d.c”]

scml.cli.nCr(n, r)[source]
scml.cli.main()[source]
scml.cli.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)[source]
scml.cli.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)[source]
scml.cli.display_results(results, metric, file_name=None)[source]
scml.cli._path(path) pathlib.Path[source]

Creates an absolute path from given path which can be a string

scml.cli.run2019(steps, levels, competitors, log, compact, log_ufuns, log_negs, raise_exceptions, path, world_config)[source]
scml.cli.run2020(steps, time, competitors, log, compact, log_ufuns, log_negs, raise_exceptions, path, world_config, show_contracts)[source]
scml.cli.DEFAULT_STD_OLD = 'RandomAgent;BuyCheapSellExpensiveAgent;SatisficerAgent;DecentralizingAgent;DoNothingAgent'[source]
scml.cli.DEFAULT_STD_2021 = 'MarketAwareDecentralizingAgent;RandomAgent;SatisficerAgent;DecentralizingAgent'[source]
scml.cli.DEFAULT_2021_NONCOMPETITORS = ['scml.scml2020.agents.BuyCheapSellExpensiveAgent'][source]
scml.cli.DEFAULT_ONESHOT = 'GreedySyncAgent;SyncRandomOneShotAgent'[source]
scml.cli.DEFAULT_STD = 'GreedySyncAgent;SyncRandomStdAgent;SyncRandomOneShotAgent'[source]
scml.cli.DEFAULT_ONESHOT_NONCOMPETITORS = ['scml.oneshot.agents.GreedySyncAgent', 'scml.oneshot.agents.SyncRandomOneShotAgent'][source]
scml.cli.DEFAULT_STD_NONCOMPETITORS = ['scml.std.agents.SyncRandomStdAgent', 'scml.oneshot.agents.SyncRandomOneShotAgent'][source]
scml.cli.run2024(steps, time, competitors, log, compact, log_ufuns, log_negs, raise_exceptions, path, world_config, show_contracts, oneshot, name, method)[source]
scml.cli.run2023(steps, time, competitors, log, compact, log_ufuns, log_negs, raise_exceptions, path, world_config, show_contracts, oneshot, name, method)[source]
scml.cli.run2022(steps, time, competitors, log, compact, log_ufuns, log_negs, raise_exceptions, path, world_config, show_contracts, oneshot, name, method)[source]
scml.cli.run2021(steps, time, competitors, log, compact, log_ufuns, log_negs, raise_exceptions, path, world_config, show_contracts, oneshot, name, method)[source]
scml.cli.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)[source]
scml.cli.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)[source]
scml.cli.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)[source]
scml.cli.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)[source]
scml.cli.version()[source]