Skip to content

fephsun/theoryofmind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

theoryofmind

This is code for running the computational experiments described in insert paper here. The code implements an inverse planning algorithm, which infers the goals of an agent, given the agent's actions. For these experiments, the agent is picking up objects in a 2D grid room. There are two colors of objects (labeled as 1 and 2 in the code), and the agent has different preferences for each color. The inverse planning algorithm takes in the layout of the room and the path of the agent, and returns a posterior distribution over how much the agent prefers each color.

Running the code

You need Python 2.7 to run this code. No other dependencies are needed. Execute runner.py or runFromData.py. The algorithm takes a few minutes to complete.

Interpreting the results

You should see a graph that looks like this: alt text

The x-axis represents the value the agent assigns to color 1. The value of color 2 is one minus the value of color 1. The y-axis shows the log-likelihood of that value assignment, given the agent's actions. In this case, the agent is likely to prefer color 1 at least a little bit over color 2.

The demo code (runner.py or runFromData.py) is exactly that: it is designed to demonstrate the use of momdp.py to do theory of mind inference. To collect real data on each stimulus, you should look at the getStatistics function, which provides a variety of useful statistics on each posterior distribution. To process the complete set of stimuli, we used a cluster of 100 machines, running momdp.testGrid in parallel.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages