Coder Social home page Coder Social logo

coevo's Introduction

README

Code repository for Brochhagen, Franke & van Rooij (2018): Coevolution of lexical meaning and pragmatic use. Cognitive Science. DOI: 10.1111/cogs.12681.

This repository is mantained by Thomas Brochhagen ([email protected]).

Get in touch if you have any questions!


Requirements

The code is written in python 2.7

A conda environment, named coevo and supplied within, fulfills all the requirements to run the code

To import and activate it, run:

conda env create --file environment.yaml #import environment from YAML
conda activate coevo 

Illustration of dynamics in a reduced type space

The script 2d/2d-plots.py illustrates independent and joint effects of the replicator and the mutator dynamic using a reduced type space.

Running coevo/2d/2d-plots.py generates Figure 2 of the paper.

The plot is saved in coevo/plots/2d-dynamics.png.

The posterior parameters and lambda values can be changed as arguments of quiver_contour() (l. 240-242).


Experiments

The files to run the main experiments on a large type space are found in experiments/

  • Run run_experiments.py to automatically compute dynamics for a large number of parameter settings. Otherwise;
  • call run_dynamics() from rmd.py to run individual experiments.

Intermediate computations (U and Q matrices) are saved in matrices/ to avoid recomputation.

Both outcomes of individual experimental runs and averages are written to results/

Caution: Estimating the mutation matrix for the full type space can be computationally expensive.


Files for type generation

A type is a combination of a lexicon an a linguistic behavior to act on it.

  • lexica.py has convenience functions to generate all possible lexica for a number of states and messages; to bin them into categories; and to generate a learning prior over them.
  • player.py defines the two player behavior classes we consider: literal and Gricean

coevo's People

Contributors

brochhagen avatar

Stargazers

Ponrawee Prasertsom avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.