By 1153 Averroes was in Marrakesh (Morocco), the capital of the Almohad Caliphate, to perform astronomical observations and to support the Almohad project of building new colleges. He was hoping to find physical laws of astronomical movements instead of only the mathematical laws known at the time but this research was unsuccessful. During his stay in Marrakesh he likely met Ibn Tufayl, a renowned philosopher and the author of "Hayy ibn Yaqdhan" who was also the court physician in Marrakesh. Averroes and ibn Tufayl became friends despite the differences in their philosophies.