Heuristic immutability is the property (or a set of properties), that a "mutable code" may or may not have, one of the basic principles behind code's potential behavior. Heuristic immutability is some behavior patterns of code that do not change, as mutable code gains more and more experience.

Human consciousness with its memory and the ability "to change our minds, habits, and preferences" is a good example of mutable code. However, with all the flexibility available with a human brain, heuristic immutability can co-exist along with flexibility as the property of the mind.

Examples of heuristic immutability in humans are strong beliefs that do not change during the course of man's life. Patriotism, monogamy, support for one's family are examples of (often - quite rational) heuristic immutability.