Edinburgh Castle, where Scottish monarchs lived for hundreds of years, sits atop an imposing rock outcropping called Castle Rock. Along with the Royal Mile, a hilly thoroughfare gently sloping down one side of the castle, it’s one of Scotland’s biggest tourist attractions. But for a long time, it was just an incredibly convenient rock, from a defensive standpoint, with sheer cliffs along three sides. Ancient people started using it in the Bronze Age, and flattened its top around 900 BCE....