With the advent of the Mughals in 1526 , Delhi alternated with Agra as the capital , and each ruler asserted his particular taste in architectural caprice .
Each subsequent ruler picked one of the cities based on what his advisers told him .