But then there's cases where an intelligent person can devise a perfect plan to reach happiness. Do the right habits, sleep, diet, exercise, relationships, therapy, medications, do everything according to science that should make us happy. But still never be "happy" or feel "satisfied".
Your choices, (in)actions, and perceptions are things that can cause the release of said chemicals.
Your intelligence, as well as abilities and habits, can effect how (or even whether you can) do or do not do things.