TakuyaHiraoka / Multi-Agent-Reinforcement-Learning-in-Stochastic-Games

Unofficial PyBrain extension for multi-agent reinforcement learning in general sum stochastic games.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi-agent reinforcement learning in stochastic games

What is this package?

This package is unofficial PyBrain extension for multi-agent reinforcement learning in general sum stochastic games. The package provides 1) the framework for modeling general sum stochastic games and 2) its multi-agent reinforcement learning algorithms.

General sum stochastic games (GSSGs)

GSSGs is generalized Markov decision processes (MDPs) for multi-agent situations, and represented as a tuple <D, S, A, T, R> (right side of following figure). D represents a agents set, S represents a state of an environment, A represents a joint action of all agents, and R represents a joint reward for each agent. In contrast to MDPs, GSSGs allows multiple agents to affect the environment and receive rewards simultaneously. We can model many phenomena in the real world with GSSGs (e.g., trading in market place, negotiation of stakeholders, or collaborative task of robots).

img

Multi-agent reinforcement learning (MARL)

MARL is used for learning agent policies $\pi$ concurrently. $\pi$ is a mapping function from an observed state S to an agent action A (see above figure). Each agent policy is learnt to maximize its own expected cumulative rewards, converging to equilibrium (typically Nash equilibrium) where all agent policies cannot be modified to better one. This package provides variations of PHC, PHC-WoLF, Correlated-Q Learning, SGSP in addition to GSSGs version of single-agent reinforcement learning implemented in PyBrain.

How to use this package?

To use this package, we need 1) install all requirements, 2) implement GSSGs to specify target domain, and 3) apply MARL to implemented GSSGs to learn agent policies.

1. Install Requirement

  • Python 2.7.6
  • Numpy 1.11.0rc1+
  • Scipy 0.17.0+
  • PyBrain 0.3.3+

2. Implement GSSGs

Implement the class extending EpisodicTaskSG (pybrainSG.rl.environments.episodicSG) and the class extending Environment class (pybrain.rl.environments.environment). Some examples of implementation are put on following package:

  • pybrainSG.rl.examples.tasks

For example, "gridgames.py" provides examples of grid world domain, and "staticgame.py" provides examples of bi-matrix game domain.

3. Apply MARL to implemented GSSGs

To apply MARL to implemented GSSGs, we need construct an agent set and an experiment. You can find examples of a construction in the following folder:

  • pybrainSG.rl.examples

For example, "example_gridgames.py" in "ceq" package shows how to use one of Correlated-Q learning implementations in the grid game domain.

Future work

Refactoring and cleaning up source codes. Introducing inverse reinforcement learning for estimation of other agents reward structure.

Author

Takuya Hiraoka

About

Unofficial PyBrain extension for multi-agent reinforcement learning in general sum stochastic games.


Languages

Language:Python 99.8%Language:Ruby 0.2%