Spatial and temporal reasoning