GithubHelp home page GithubHelp logo

kach / acting-as-inverse-inverse-planning Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 2.0 699 KB

Code for our SIGGRAPH 2023 paper, "Acting as Inverse Inverse Planning"

Home Page: https://doi.org/10.1145/3588432.3591510

Python 7.47% Shell 0.22% Jupyter Notebook 92.31%
animation siggraph bayesian-inference cognitive-science theory-of-mind

acting-as-inverse-inverse-planning's Introduction

Acting as Inverse Inverse Planning

This repository contains source code to accompany the SIGGRAPH paper Acting as Inverse Inverse Planning (Chandra, Li, Tenenbaum, and Ragan-Kelley 2023).

Great storytellers know how to take us on a journey. They direct characters to act---not necessarily in the most rational way---but rather in a way that leads to interesting situations, and ultimately creates an impactful experience for the audience members looking on.

If audience experience is what matters, can we help artists and animators directly craft such experiences, independent of the concrete character actions needed to evoke those experiences? In this paper, we offer a novel computational framework for such tools. Our key idea is to optimize animations with respect to simulated audience members' experiences.

To simulate the audience, we borrow an established principle from cognitive science: that human social intuition can be modeled as "inverse planning," the task of inferring an agent's (hidden) goals from its (observed) actions. Building on this model, we treat storytelling as "inverse inverse planning," the task of choosing actions to manipulate an inverse planner's inferences.

Our framework is grounded in literary theory, naturally capturing many storytelling elements from first principles. We give a series of examples to demonstrate this, with supporting evidence from human subject studies.

@InProceedings{chandra2023acting,
  title = {Acting as Inverse Inverse Planning},
  author = {Kartik Chandra and Tzu-Mao Li and Joshua Tenenbaum and Jonathan Ragan-Kelley},
  booktitle = {Special Interest Group on Computer Graphics and Interactive Techniques Conference Proceedings (SIGGRAPH '23 Conference Proceedings)},
  month = {aug},
  year = {2023},
  doi = {10.1145/3588432.3591510}
}

Contents

Kitchen domain

  • gridworld/hoh.py - definition of the grid-world and planner
  • gridworld/train_all.sh - trains the planner on all possible hypotheses (takes a few hours)
  • gridworld/regp.py - runs the planner to create animations with naïve planner
  • gridworld/i2p.py - inverse inverse planner
  • gridworld/i2p.sbatch - sample slurm script to run inverse inverse planner
  • gridworld/draw_*.py - utilities to render animations

Hill domain

  • lampworld/model.py - defines the mass-spring system and implements a differentiable simulator
  • lampworld/shax.py - our implementation of Short-Horizon Actor-Critic
  • lampworld/SHAX.ipynb - train controllers for lamp
  • lampworld/Mime.ipynb - optimize trajectories to mime heavy box
  • lampworld/Story.ipynb - optimize trajectory to "stumble"
  • lampworld/config.py - config
  • lampworld/imports.py - common imports
  • lampworld/notificationstation.py - utility to notify when jobs complete
  • lampworld/weights/* - pre-trained weights

Dependencies

  • python3, numpy, matplotlib, jax, flax, optax, cairo, tqdm
  • ffmpeg, pov-ray

acting-as-inverse-inverse-planning's People

Contributors

kach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.