The Unpredictable Sentry
A castle had three gates but only one guard for night patrol. At first, the guard checked the north gate every hour. Thieves learned the schedule and used the south gate.
So the guard switched to a rotation: north, south, east. The thieves learned that too.
Finally, a wise captain instructed the guard to roll dice before each patrol. One and two: north gate. Three and four: south. Five and six: east.
The thieves could no longer predict which gate was unguarded. The guard became effective not by being systematic, but by being genuinely random.