Inference And Action: Relating Beliefs To The World