Integrating cognitive map learning and active inference for planning in ambiguous environments