Planning in Dynamic Environments with Conditional Autoregressive Models