Agents situated in a dynamic environment with an ini- tially unknown causal structure, which, moreover, links certain behavioral choices to rewards, must be able to learn such structure incrementally on the y. We report an experimental study that characterizes human learn- ing in a controlled dynamic game environment, and de- scribe a computational model that is capable of similar learning. The model learns by building up a represen- tation of the hypothesized causes and eects, including estimates of the strength of each causal interaction. It is driven initially by simple guesses regarding such inter- actions, inspired by events occurring in close temporal succession. The model maintains its structure dynam- ically (including omitting or even reversing the current best-guess dependencies, if warranted by new evidence), and estimates the projected probability of possible out- comes by performing inference on the resulting Bayesian network. The model reproduces the human performance in the present dynamical task.