This repository contains code for the NeurIPS 2023 paper "Probabilistic inverse optimal control for non-linear partially observable systems disentangles perceptual uncertainty and behavioral costs" (Straub, Schultheis, Koeppl, Rothkopf).
The easiest way is to create a fresh virtual environment and install the nioc package using pip:
python -m venv env
source env/bin/activate
python -m pip install -e .python example.pyruns an example that simulates trajectories from the reaching task, estimates the parameters using our method and the baseline, and plots simulated trajectories using the parameter estimates.
- Figure 2 (trajectories and log likelihood):
fig2_likelihood.py - Figure 4 (light-dark domain):
fig4_infoseeking.py
The package nioc contains implementations of
-
Control algorithms
nioc.controllqrlinear quadratic regulatorlqglinear quadratic Gaussian (LQG) controlglqggeneralized LQG with signal-dependent noise (Todorov, 2005)ilqriterative LQR (Li & Todorov, 2004)gilqrgeneralized iterative LQR with signal-dependent noise, also known as fully observable iLQG (Li & Todorov, 2005) , equation numbers in code comments are from Li's PhD thesis (2006)gilqggeneralized iterative LQG with signal-dependent noise, also known as partially observable iLQG (Todorov & Li, 2007), equation numbers in comments are from Li's PhD thesis (2007)ilqg_fixedandilqr_fixedcompute one iteration of ilqg or ilqr given a fixed nominal trajectory (see Section 3.3 in the paper)
-
Environments
nioc.envsnonlinear_reaching.pynon-linear reaching task (Li & Todorov, 2007)navigation.pynavigation taskclassic_control.pendulum.pyclassic inverted pendulum control problemclassic_control.cartpole.pyclassic cartpole control problemlightdark.pylight-dark domain (Platt et al., 2010)
-
Environment wrappers
nioc.envs.wrappersFullyObservedWrapperturns a partially observed problem into a fully observed problemEKFWrapperwraps a partially observed problem with an extended Kalman filter (EKF) to turn it into a belief space problem
-
Paramter inference algorithms
nioc.inferinv_ilqr.pyinverse iterative (generalized) LQR (fully observable)inv_ilqg.pyinverse iterative (generalized) LQG (partially observable)inv_maxent.pymaximum entropy IOC baseline (Section 4.1)