This paper studies robotic exploration in unknown 2D environments using a frontier-based strategy with an automatic-differentiable information gain measure. The method improves autonomous exploration by helping robots better evaluate where to move next in order to gather useful environmental information. The work contributes to intelligent exploration and mapping by combining classical frontier-based ideas with differentiable optimization-oriented metrics.