emergent-prosociality-through-gifting

Companion code for IJCAI 2021 paper "Emergent Prosociality in Multi-Agent Games Through Gifting"

https://github.com/stanford-iliad/emergent-prosociality-through-gifting

Science Score: 52.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
    Organization stanford-iliad has institutional domain (iliad.stanford.edu)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.7%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Companion code for IJCAI 2021 paper "Emergent Prosociality in Multi-Agent Games Through Gifting"

Basic Info
  • Host: GitHub
  • Owner: Stanford-ILIAD
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 14.6 KB
Statistics
  • Stars: 4
  • Watchers: 5
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Created over 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

readme.md

Gifting

This directory is supplementary material for the IJCAI 2021 paper:

Woodrow Z. Wang*, Mark Beliaev*, Erdem Bıyık*, Daniel A. Lazar, Ramtin Pedarsani, Dorsa Sadigh. "Emergent Prosociality in Multi-Agent Games Through Gifting"

All relevant citations for methods used are found in the paper's list of references.

Requirements

We recommend using package manager pip as well as cuda to install the relative packages:

NOTE:

(1) open-ai's gym and pytorch need to be compatible, the following versions used were chosen for this reason.

(2) one might need to build pytorch from source when working on an intel-cpu with Linux

pip:

  • gym-0.17.2 gym

conda:

Usage

This directory gives the code responsible for the two main elements in our analysis:

(1) Computing Basins of Attraction

To model the dynamics of stag hunt with and without gifting, as done in Section 4.2, one should look at the file: compute_boa.py. All relevant information and explanation can be found in the file.

(2) Running a DQN algorithm on Stag Hunt with gifting

As done in most experiemnts in Section 5, we run DQN on various environments all deriving from open-ai's basic "gym environment" structure. These environments can be found in /games/. The DQN structure and algorithm was written for this experiment using pytorch. All relevant files needed to run DQN are given in /utils/. We show how to run a DQN algorithm on Stag Hunt with and without gifting, and varying levels of risk in example.py. By default example.py will run for only 16 seeds. Nonetheless this is enough to show that higher risk settings benefit greatly from additional gifting actions. Parameters used in example.py correspond to the ones described in Section 5.2, but can be changed for different experiment settings, such as varying the gift value.

Owner

  • Name: Stanford Intelligent and Interactive Autonomous Systems Group
  • Login: Stanford-ILIAD
  • Kind: organization
  • Location: Stanford University

Stanford Intelligent and Interactive Autonomous Systems Group

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Woodrow"
  given-names: "Wang"
- family-names: "Beliaev"
  given-names: "Mark"
- family-names: "Bıyık"
  given-names: "Erdem"
title: "emergent-prosociality-through-gifting"
version: 1.0.0
doi: 10.5281/zenodo.1234
date-released: 2021-12-01
url: "https://github.com/Stanford-ILIAD/emergent-prosociality-through-gifting"

GitHub Events

Total
  • Watch event: 2
  • Push event: 1
Last Year
  • Watch event: 2
  • Push event: 1