In Maryland there is a duty to retreat before force for self defense can be used. It is the "duty of the defendant to retreat or avoid danger if such means were within his power and consistent with his safety,".
Stand Your Ground Laws are often expansions of the Castle Laws. They address the use of force outside of one's home, place of work, or vehicle. They cover most of the same issues as the castle laws (the places where this law applies, the requirements fro use of deadly force, if there is a duty to retreat, the amount of force that maybe used in defending one's self or others) the main difference is the location. Some states that do not have a technical Stand Your Ground Law have extensive Castle Laws that address locations outside of the home, place of work, etc. The circumstances of the law vary widely from state to state.