From Shadows to reality: the algorithm and the cave