Causal discovery of polystructural models by embodied artificial agents