Castles were "military machines" designed to survive the most brutal sieges of the Middle Ages. Defense centered on a "layered" approach: moats prevented attackers from reaching the walls, while high curtain walls featured "crenellations" and "arrow loops" that allowed archers to fire with nearly total protection. The gatehouse was the most defended point, protected by heavy "portcullises" and "murder holes" through which defenders dropped boiling water, hot sand, or heavy stones. Attacks evolved from simple ladders to sophisticated engineering: battering rams were used to breach gates, and trebuchets hurled massive stones (or diseased cattle) over walls. "Mining" was perhaps the most feared tactic, where attackers dug tunnels under walls to collapse them. However, the most effective attack was often a simple siege, where invaders surrounded the castle and "starved out" the inhabitants until they were forced to surrender.