I don't know about the idea that the story is already written. It's possible I suppose, if you believe in a creator. I believe there's a degree of randomness to the world but that if your brain was perfectly simulated in an advanced model predictive control algorithm, it would make the same choices you do if given the same inputs. Many of the inputs that go into decisions aren't available to the conscious mind, but the conscious mind is tricked into believing it is making choices. This is why free will is considered to be an illusion by Sam and others.
Processes of learning and communicating are conscious processes, IMO. But they're based on unconscious processes such as ideas and emotions which bubble up from below.
Here's a thought experiment for you: if you put your hand on a hot stove or if some object is flying at your eye, do you decide how to react or is that decision made before you even realize what is happening?