Skip to content

AlexAdrian-Hamazaki/RL_COUP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 

Repository files navigation

A Multi-agent RL environment for COUP

This repo contains a pettingzoo and gymnasium compliant environment for multi-agent reinforcement learning

The step function for the environment leverages previously designed assets from my object-orientated instantiation of the game's logic found here

Usage

Basic usage of the environment is as follows. This pattern is compliant with pettingzoo environment requirements.

from coup_env.coup_env import CoupEnv
env = CoupEnv(n_players=2)
env.reset(seed=42)

for agent in env.agent_iter():
    observation, reward, termination, truncation, info = env.last()
    if termination or truncation:
        action = None
    else:
        # this is where you would insert your policy
        action_mask = info['action_mask']
        action = env.action_space(agent).sample(action_mask) 
    env.step(action)
env.close()

Future Development

For a 100% correct implementation of the game, some features need to be added (see issues)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages