Human spatiotemporal pattern learning as probabilistic program synthesis