rl_cheap_talk

Code for "D. Condorelli, M. Furlan (2024). Cheap Talking Algorithms"

https://github.com/massimilianofurlan/rl_cheap_talk

Science Score: 54.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
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.8%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

Code for "D. Condorelli, M. Furlan (2024). Cheap Talking Algorithms"

Basic Info
  • Host: GitHub
  • Owner: massimilianofurlan
  • License: gpl-3.0
  • Language: Julia
  • Default Branch: main
  • Homepage:
  • Size: 117 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

Overview

This repository contains the code for "D. Condorelli, M. Furlan (2024). Cheap Talking Algorithms". Replication instructions are listed in the replication file.

Table of Contents

Installation

  1. Install Julia: Download and install Julia: julialang.org.

  2. Install Dependencies: Run in the Julia REPL:

    using Pkg Pkg.add("ArgParse") Pkg.add("TOML") Pkg.add("JLD2") Pkg.add("PrettyTables") Pkg.add("ProgressMeter") Pkg.add("Random") Pkg.add("StatsBase") Pkg.add("PGFPlotsX") Pkg.add("DataStructures")

  3. Clone the Repository: Clone this repository to your local machine.

    bash git clone https://github.com/massimilianofurlan/rl_cheap_talk.git

Usage

  1. Navigate to the Project Folder:

    bash cd rl_cheap_talk

  2. Basic Usage: To run a batch of simulations use

    bash julia --threads=auto --check-bounds=no main.jl [options]

    You can replace auto with the desired number of threads. Options are primarily used to select the configuration of the game, such as the number of states, the extent of the sender's bias, the utility functions and the distribution over states. To get the complete list of options use

    bash julia main.jl --help

    To change the reinforcement learning hyperparameters, such as the learning rate and exploration rate, edit the config file. The section [default] is loaded by default. A different section can be loaded using the --config option.

  3. Others: To automatically run a batch of simulations for each bias level in {0.0, 0.01, ..., 0.49, 0.5} use

    bash julia --threads=auto scripts/script1.jl --config=CONFIG_SECTION --out_dir=OUT_DIR --step_bias=0.01

    Replace CONFIG_SECTION with the desired section from the config file and OUT_DIR with the desired name for the output directory. Use --help to get the complete list of options.

    After running the script, TikZ plots can be generated using

    bash julia --threads=auto scripts/generate_plots_1.jl --in_dir=OUT_DIR --step_bias=0.01

    where OUT_DIR must match the output folder of the previous command. Also the increment in the bias must match che one used in the previous command. Generating plots requires an additional Julia dependency. To install it, run in the Julia REPL

    using Pkg Pkg.add("PGFPlotsX") Note that PGFPlotsX also requires having a LaTeX installation on your machine.

License

This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.

For more information about the AGPL-3.0 license, please visit the GNU website.

Owner

  • Name: Massimiliano Furlan
  • Login: massimilianofurlan
  • Kind: user
  • Location: Coventry, United Kingdom
  • Company: University of Warwick

MRes in Economics

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Condorelli"
  given-names: "Daniele"
- family-names: "Massimiliano"
  given-names: "Furlan"
title: "Reinforcement learning in cheap-talk games."
version: 1.0.0
date-released: 2023-09-25
url: "https://github.com/massimilianofurlan/rl_cheap_talk"

GitHub Events

Total
Last Year