Skip to content

athoscf/CPR-MAS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an OpenAI gym implementation of the Commons Game, a multi-agent environment proposed in A multi-agent reinforcement learning model of common-pool resource appropriation using gym as game engine.

We will use a Deep Q-Network (DQN) to train the agents in this environment, allowing them to learn optimal strategies for resource appropriation while balancing cooperation and competition. The DQN algorithm leverages deep learning to approximate the Q-value function, enabling agents to make decisions in this multi-agent setting.

Installation

To install cd to the directory of the repository and run pip install -e .

Usage

The file main.py contains a simple usage example where you can modify the map config, the size of its field of vision, the number of episodes and the action policy. To run the file cd to the directory of the repository and run python main.py.

The current version includes the results, it may be necessary to remove the metrics.csv files and also create the result folders of the correspondent maps and methods to avoid errors.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%