To maintain the idea; we have created several environments which contain many obstacles. The search area (Environment) is divided into square grids. Each item in the array represents one of the squares on the grid, and its status is recorded as walkable or unwalkable area (obstacle).The robot can identify two colors inside our environment: dark and white. The dark color is interpreted as an obstacle area (Also affected for the neighbouring pixel area which each pixel has the same approximate luminous intensity value of those pixels belonging to obstacle area); whereas the white color represents the free trajectory to attend the given target area (Also affected for the neighbouring pixel area which each pixel has the same
approximate luminous intensity value of those pixels belonging to free trajectory area);.The robot starts from any position then it must move by sensing and avoiding the obstacles. The trajectory is designed in form of a grid-map, when it moves it must verify the adjacent case by avoiding the obstacle that can meet to reach the target. We use an algorithm containing the information about the target position, and the robot will move accordingly.