This document presents a modified artificial potential fields algorithm for mobile robot path planning in unknown and dynamic environments. The algorithm uses artificial potential fields to iteratively find optimal points to form a collision-free path from the start to destination. For static obstacles, potential values are used to identify clusters of points around the start and goal, and find a connecting midpoint. This process is repeated iteratively. For dynamic obstacles, Markov models are used to analyze obstacle behavior from sensor data and predict collision points. The robot's path is replanned as needed to avoid collisions based on feedback from sensors and odometry. Simulation results show the algorithm can efficiently plan paths in unknown environments and avoid both static and dynamic obstacles.