How to make a simple back fourth AI

There are many AI tutorials out there for AI, but none of them cover creating a very simple back and fourth AI. I just want to make an object move back and fourth from one edge of a platform to the other, so if anybody knows how to go about that would be great