Skip to main content

Chicken Coop

  • Full paper
  • Coming soon: Extended abstract
  • Coming soon: Poster
  • Coming soon: Deck
  • Coming soon: Talk video

This is the accompanying code for our paper Emergent Dominance Hierarchies in Reinforcement Learning Agents presented in AAMAS 2024.

Abstract:

Modern Reinforcement Learning (RL) algorithms are able to outperform humans in a wide variety of tasks. Multi-agent reinforcement learning (MARL) settings present additional challenges, and successful cooperation in mixed-motive groups of agents depends on a delicate balancing act between individual and group objectives. Social conventions and norms, often inspired by human institutions, are used as tools for striking this balance.

In this paper, we examine a fundamental, well-studied social convention that underlies cooperation in both animal and human societies: Dominance hierarchies.

We adapt the ethological theory of dominance hierarchies to artificial agents, borrowing the established terminology and definitions with as few amendments as possible. We demonstrate that populations of RL agents, operating without explicit programming or intrinsic rewards, can invent, learn, enforce, and transmit a dominance hierarchy to new populations. The dominance hierarchies that emerge have a similar structure to those studied in chickens, mice, fish, and other species.

Chicken Coop is a multi-agent environment in which agents learn to form dominance hierarchies with each other, like those that form in animal societies. The environment is a multi-player variant of the classic game of chicken.

The figure above shows the aggressiveness levels of each of the six agents (depicted as differently-colored lines) in four sample Chicken Coop populations. The two populations in the top row form transitive dominance hierarchies, while the two populations in the bottom row form intransitive dominance hierarchies.

Installation

Tested on Python 3.11.

# Set up virtualenv if needed:
python -m venv chicken-coop-env
source chicken-coop-env/bin/activate

pip install chicken-coop

# Run tests
_test_chicken_coop

Usage

Basic run:

chicken_coop run

Main run used in the paper:

chicken_coop run --moniker paper-run --use-tune --n-tune-samples 300

Transplant experienced agents into a naive population:

chicken_coop transplant --moniker paper-transplant --visitor-trek \
  ~/.chicken_coop/<YOUR_PREVIOUS_RUN>

Ablate opponent perception accuracy:

chicken_coop run --moniker paper-ablate-observation --use-tune --n-tune-samples 10 \
  --observation-accuracy 0.0 \
  --observation-accuracy 0.1 \
  --observation-accuracy 0.2 \
  --observation-accuracy 0.3 \
  --observation-accuracy 0.4 \
  --observation-accuracy 0.5 \
  --observation-accuracy 0.6 \
  --observation-accuracy 0.7 \
  --observation-accuracy 0.8 \
  --observation-accuracy 0.9 \
  --observation-accuracy 1.0

Investigate non-linearity:

chicken_coop run --moniker paper-cycles --use-tune --n-tune-samples 30 --n-agents 12 \
  --learning-rate 3e-05

Citing

If you used either the Chicken Coop module, or any insights from our paper, please cite our paper:

@inproceedings{rachum2024dh,
  title = {Emergent Dominance Hierarchies in Reinforcement Learning Agents},
  author = {Rachum, Ram and Nakar, Yonatan and Tomlinson, Bill and Alon, Nitay and Mirsky, Reuth},
  year = 2024,
  publisher = {International Foundation for Autonomous Agents and Multiagent Systems},
  booktitle = {Proceedings of the 2024 International Conference on Autonomous Agents and Multiagent Systems},
  location = {Auckland, New Zealand},
  series = {AAMAS '24}
}

Metadata

Release files for chicken-coop 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chicken-coop 0.0.5
File Size Uploaded
chicken_coop-0.0.5.tar.gz 50.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chicken-coop 0.0.5
File Interpreter ABI Platform
chicken_coop-0.0.5-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 114.7 kB

Release files / chicken_coop-0.0.5.tar.gz

Download URL chicken_coop-0.0.5.tar.gz
Size 50.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6db73da96fd6db4082aff68c96d60f0a799c40573ca0e8d839f0ec30b02ef7be
BLAKE2b-256 checksum
How to use checksums
a7f29cf4620da50d41aa2f742835f041367e246c97e6d3ff2d00d5f20350e857
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / chicken_coop-0.0.5-py2.py3-none-any.whl

Download URL chicken_coop-0.0.5-py2.py3-none-any.whl
Size 63.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
2a91f2d2a085fae9b5ec96b4c669131717a523ff0c9f31139efc54bf36390d19
BLAKE2b-256 checksum
How to use checksums
bcdda187b3fdea1302b3927ef5187292ef33b3982c8db81b7fde934e37bc2bee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page