How to reverse-engineer a rainforest