Map state logging and replay

Does anyone know of a way to log the state of the map at each turn? Additionally, with that, a way to then redisplay past turns? It would help with analyzing strategies. You could observe a skilled players plays, and try to determine what went right or wrong with your own. With just the written log it's difficult to visualize the actual board state when reviewing past turns.