Code Monkey home page Code Monkey logo

cvar_jmathpsych_2021's Introduction

Overview

This repository contains the data and code needed to reproduce the main results from our paper:

C.Gagne and P.Dayan, Peril, prudence and planning as risk, avoidance and worry. Journal of Mathematical Psychology (2021) 102617, https://doi.org/10.1016/j.jmp.2021.102617.

Installations

The code has only a few requirements, which can installed by running:

conda env create -f environment.yml

Code organization

The code is organized according to the sections of the paper.

Code for:

  • calculating CVaR for a single choice (Figure 1) is in 'cvar_single_choice'.
  • plotting the nCVaR/pCVaR tree (Figure 2) is in 'cvar_tree'
  • evaluating nCVaR/pCVaR for a random policy (Figure 3) is in 'policy_evaluation'
  • calculating the optimal nCVaR/pCVaR policies (Figures 4-5) is in 'policy_optimization'
  • obtaining the optimal greedy replay sequences (Figures 6-7) are in 'replay optimization'

Policy evaluation, optimization, and replay shares code in the folder 'shared'. Here, you can find the nCVaR/pCVaR Bellman evaluation and optimality operators.

Simulation results

All of the simulations have already been run and the results are stored in 'simulation_results'. The '.mat' files were created using code privately borrowed from Chow et al. 2015 (not contained in the repo); these files contain some information about the MDPs, which is reused by our scripts and also were used to check our implementation versus theirs. These should not be deleted. All of the other '.npy' files can be recreated.

If you have any questions, please feel free to contact [email protected].

cvar_jmathpsych_2021's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

xinsui77

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.