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 coaction 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 contain multiple matrix games as their 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. It is, of course, possible to create both the transition and reward matrices to simulate a matrix game using the "MarkovGame" class.

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.8.tar.gz (27.7 kB view details)

Uploaded Source

Built Distribution

coaction-0.0.8-py3-none-any.whl (44.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coaction-0.0.8.tar.gz
  • Upload date:
  • Size: 27.7 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.8.tar.gz
Algorithm Hash digest
SHA256 705f90aef308aa62838bf98c047332593fbd1aff4e4983fddf56a42a18e9d6b8
MD5 b1e6886a9ea5412a76e63f82fd47b758
BLAKE2b-256 28a6bad1cfe60d4e29499019a3da1ddf26f3b86cd06e466103a35330bec2475c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coaction-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 44.7 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 5e9d1614ae6bcf35481bc385b4e9fc258b12541e6d9ca8ff0d599083317cf3d0
MD5 ad1b8d00ae10b422a0b925b71a700e86
BLAKE2b-256 6d9f8b094219aa3c2d124f28aa1cd00194186b4fa6a86059e0acb569b55a4a3a

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