machine learning on athlete performances to predict the time in a future race Example Data

I have a dataset (in R as a data frame) of race results for athletes.

athlete racedistance time    location tracktype       date    coach
A          100       10.0       UK     typeA       2014-01-01  carlos
A          200       20.0       US     typeB       2014-02-01  carla
A          100        9.5      AUS     typeC       2014-03-01  chris
B          100       11.0       UK     typeA       2014-01-01  carla
B          200       21.0       US     typeB       2014-02-01  carlos
B          400       61.0      AUS     typeC       2014-03-01  carla
B          100       10.5      GER     typeA       2014-04-01  clive
C          100        9.5       UK     typeA       2014-01-01  clive
C          200       21.5       US     typeB       2014-02-01  chris


Question

Is there an appropriate machine learning algorithm or method that can use the previous results of each athlete as a feature, when trying to predict the time for an athlete in a future race? 

For example, athlete A has three races, with one month rest between them. In the third race he performs slightly better than the first race over the same distance. 

Can an algorithm learn that the second race had an effect on the athlete, which meant he performed better in the third race?

From what I've read on the subject and the training examples I've completed it would appear that each 'row' of data should be independent, is this the case for all ML algorithms? Is there another prediction technique I should be considering to solve this type of problem?
I think the key here is what you believe to be dependent variables. You mentioned, for instance, a three month rest. Encoding the rest between races is likely to be a better idea than simply encoding the date of the rest as a lot of the date is redundant to what is actually being said. As with any machine learning algorithm, representation of the data is key and in many ways, the actual algorithm applied is less important.