Skip to main content

A Minimum Price Markov Game modular environment

Project description

Minimum Price Markov Game (MPMG) Environment

Overview

mpmg is a modular environment designed for studying the Minimum Price Markov Game (MPMG), a concept in game theory and algorithmic game theory. It provides an easy-to-use framework for conducting experiments with multiple agents using collusion and cooperation dynamics. This environment is useful for researchers and developers interested in game theory, reinforcement learning, and multi-agent systems.

Features

  • Customizable Multi-Agent Environment: Supports different numbers of agents and heterogeneous vs. homogeneous settings.

Project Structure

mpmg/
├── mpmg/                  # Main package directory
│   ├── __init__.py        # Package initialization
│   └── mpmg_env.py        # Environment implementation
├── .gitignore             # Ignored files for git
├── README.md              # Project description and usage guide
├── requirements.txt       # Project dependencies
├── setup.py               # Installation script
└── LICENSE                # License information

Installation

To install the package locally, run the following command from the root directory:

pip install mpmg .

This installs the package in "editable" mode, meaning any changes made in the source code will immediately reflect in the installed package.

Requirements

  • Python 3.6+

Dependencies can be installed from requirements.txt:

pip install -r requirements.txt

Usage

To use the mpmg package, import the MPMGEnv class and create an instance of the environment:

from mpmg import MPMGEnv

# Create an instance of the environment
env = MPMGEnv(n_agents=2, sigma_beta=0.0, alpha=1.3)

# Reset the environment
state = env.reset()

# Take a step in the environment
actions = [1, 0]  # Example actions for each agent
rewards, next_state, done = env.step(actions)

The MPMGEnv class provides methods for resetting the environment, taking steps, and observing the state, rewards, and dynamics of multi-agent interactions.

Parameter Definition

num_agents (int): Number of agents. Must be a positive integer, default value is 2.

sigma_beta (float): Heterogeneity level, standard deviation of the power parameters' distribution. Must be in [0,1], default value is 0.

alpha (float): Collusive bid multiplier. Must be > 1.

Scenarios

MPMGEnv is a social dilemma based on the Prisoner's Dilemma.

  • Full Defection: All agents choose to defect (action 0), Nash Equilibrium.
  • Full Cooperation: All agents cooperate (action 1), Pareto Optimal.
  • Asymmetric play: actions taken can be separated into two sets, other suboptimal outcome.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request for improvements, bug fixes, or new features.

Author

Igor Sadoune - igor.sadoune@polymtl.ca

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

mpmg-0.1.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mpmg-0.1.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file mpmg-0.1.1.tar.gz.

File metadata

  • Download URL: mpmg-0.1.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for mpmg-0.1.1.tar.gz
Algorithm Hash digest
SHA256 24f5c46be669c2969bc66ec8d7bb80d1140ddd0d4e75f00d241fa25b9403e339
MD5 d86a961c8261bdf5311f64c0e4965014
BLAKE2b-256 c08c4d557ddce93e5ebaacef01a9a32a4b5fd6b1fccbc16fdb8b0f48ab9fd72c

See more details on using hashes here.

File details

Details for the file mpmg-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mpmg-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for mpmg-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ef5912c4d16eeef225704d68d99d2d17caec40aa1f2af675af60082d1a4823b
MD5 872eb17573189fb109a69d5d246fa46c
BLAKE2b-256 21a0fadc37096ae1cf55f2618eae6974b63803e07b8429674f0cd7d6ccb9fe83

See more details on using hashes here.

Supported by

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