Code for information flow experiments