Help with AI that follows a set path

Hi there hello,

I would like to make an AI that follows a set path. I want to make the AI to go from one position to the next and keep going to the next position until it cannot find any more positions in it's path. I would also like this AI to work with as many positions in it's path as it needs to without me needing to set any variables and values. How do I program this?