The dog turns round about three times before sleeping. (Lorenz)

The dog has not learned it before from his parent. Then how has he got it? He turns round three times before sleeping every day all by his gene only.
The cat sits with one-foreleg in front of his owner like staggering. Why? Not for his baby, but just because of his own hunger begging for mercy. When has he learned such a trick? Also, the cat staggers with a sham broken leg for hunger all by his given gene only.
One gene's module can or must do this far.