The robot would need to be able to know where it is, measure distance and direction. An encoder on one of the drive wheels or motor could be counted and used for distance traveled. Didn't specify how stearing was done, but that would be where you would get which direction you are moving. Pretty simple math to plot on a graph or store in an array. Not sure about 2 dimensional arrays on an MCU, probably no big deal in 'C' or BASIC.
Without sensors, your car isn't technically a robot, but the term is used very loosely these days... But know reason to start a debate on terminology, its a beginning of a bigger project, a base to build on.
I use to read about robots that people built that remembered and learned, but mostly they build them to deal as they go. You might find something be searching for maze solving robots. The challenge is the shortest time to navigate the maze, seems like some sort of mapping would be need to keep the robot out of an endless circle pattern...