It does not seem, at first glance, easy to express the concept of habit mathematically, that is, express the concept from a mathematical general systems framework. Habit is a very difficult notion to grasp as is the way causality enters in. Image a system S which temporally evolves through a state space Q. Consider two "small" disjoint regions A and B in Q. Then we can observe the situation X in which the system in a state in A in a given time T1 and then in B in a subsequent time T2 (were interval [T1,T2] must be smaller than some bound W passing through a neighbourhood U of a certain path in Q linking A to B. Now in the evolution of the system S we may observe that behaviour X because more common and frequent as time goes along, as if X develops the "habit" of X. Is the developing of habit X a special case of X being an attractor in the dynamical-system sense ? Could this evolution of system S be specified by a causal law ? Not an infinitesimal law but a finite interval (probabilistic) law. If system is in state A then its evolution in an interval with bound W is determining by the most frequent path starting at A in the past. Its present behavior in situation A is determined by the highest unanimity of the processes of previous A-cases. In a physical sense the repetition of X can be seen as exerting a causal influence in the future, a kind of morphogenetic field. We can also conceive a hierarchical organization of a behavior X decomposable into smaller behaviors X1,...,Xn all subject to the law of habit. There is a kind of self-reference involved, a weak kind of self-determining behavior.
Now things get interesting if we consider the system as spatialized so that the state is assigned not merely to a given time but also to a region (point) in space. Now we can postulate the frequency of behavior X in a location L1 influences causally the frequency (at a later time) of the same behavior in a distinct location L2. Thus we distinguish between self-inductive habit and propagating habit (cf. solutions to certain PDE expressed via Green's functions or integral operators). This propagating aspect (perhaps not instantaneous) can be compared for instance to the creation of electromagnetic radiation through periodically moving charges. Thus local behavior is determined not only by the past habit of that region but the sum-total of the habits of other regions. This is of course a profoundly holistic or "holomorphic" situation.