Skip to main content

A library for multi-agent learning that aims to accelarate the research.

Project description

coaction

A library for multi-agent learning that aims to accelerate the research.

What is it for?

coaction can create and run simulations for any Markov game whose stage ransitions and rewards can be represented by multi-dimensional array. It provides implementations of popular learning dynamics such as fictitious play and individual Q-learning. Since the library is created for research, it also allows users to implement their own agents and run the simulations without the extra burden of parallelization and logging.

How to use?

Though coaction can be used similar to other Python libraries, coaction provides two main functionalities: creation of the project configurations and running the simulations for given configurations.

To create the project directory and the configuration files, one can use coaction.create. An example script is given below.

python -m coaction.create \
    --parent_dir ../ \
    --project_name example_project \
    --experiment_name example_experiment_1 example_experiment_2 example_experiment_3 example_experiment_4 \
    --agent_types SynchronousFictitiousPlay SynchronousFictitiousPlay \
    --agent_types CustomAgent SynchronousFictitiousPlay \
    --agent_types AsynchronousFictitiousPlay AsynchronousFictitiousPlay \
    --agent_types AsynchronousFictitiousPlay AnotherCustomAgent \
    --game_types MatrixGame MatrixGame MarkovGame MarkovGame

"parent_dir" is the directory in which the project will be created. "project_name" is the name of the project. "experiment_name" is a list of experiment names. "agent_types" is the classes of agents that will be used in the experiments. Note that each entry of agent types is for the corresponding experiment you listed via the "experiment_name" argument. For custom agents, write the name of the custom agent class you will implement. coaction will create a template for your custom agent. "game_types" is either "MatrixGame" or "MarkovGame." Recall that Markov games contains multiple matrix games as its stage games. Internally, all the games are converted to a Markov game. This distinction removes the burden of creating a transition matrix of all ones for matrix games.

After the creation of the configuration files, you will find templates that you need to complete before running the experiment. When you complete the configuration files, you can run the project as given below:

python -m coaction.run --project ../example_project

This script will start the experiments according to your configuration. coaction also copies the configuration files to the corresponding log directory. This allows you to change the configuration of the project without losing the information about your previous runs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coaction-0.0.5.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

coaction-0.0.5-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

Details for the file coaction-0.0.5.tar.gz.

File metadata

  • Download URL: coaction-0.0.5.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for coaction-0.0.5.tar.gz
Algorithm Hash digest
SHA256 5b45b3753f93cd962dd4b31d7a9c492f2b0eacc6eeb11be07d89ec8f6ae7ece3
MD5 ad2475918531c1a357127183cdcedd5a
BLAKE2b-256 00a50c66c0956b9752af9d95bada2e61d346201ed3e7277b1ad13ea823bcdfce

See more details on using hashes here.

File details

Details for the file coaction-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: coaction-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 42.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for coaction-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 07c3bf69201cd35c606828a5a498841525b1e4529c2fa0eb747fc26848940114
MD5 b9f45a4a2accb171c82a096315d2c166
BLAKE2b-256 4c625fbdb02ffdeee115d29c4eaeb0b16cfb1813f5263b642245168e614c55a4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page