 Complete the following phrase:  Recent research has shown that Doune Castle was originally built in the thirteenth century, then probably damaged in the Scottish Wars of Independence, before being rebuilt in its present form in the late 14th century by Robert Stewart, Duke of Albany c. 13401420, the son of King Robert II of Scots, and Regent of Scotland from 1388 until his death. Duke Roberts stronghold has survived relatively unchanged and complete, and the whole castle was traditionally thought of as the result of a single period of construction at this time. The castle passed to the crown in 1425, when Albanys son was executed, and was used as a royal hunting lodge and dower house. In the later 16th century, Doune became the property of the Earls of Moray. The castle saw military action during the 