In a world of evolution, every individual agent has a goal: to maximize its fitness. Though fitness is a broad term and appears abstract with its meaning subject to the physical environment, it actually drives daily decisions. In ancient time when resources are scarce and fitness means survivability, it is apparent that a great part of maximizing one's fitness involves obtaining enough food. An agent's activity concentrate on food seeking, hunting, cultivating. Body building exercises like running, jumping or swimming are intended to improve one's ability of capture food.
With the advancement of our society, many options are emerging in modern time, people don't have to directly seek food to survive. One can choose to be a farmer, lawyer, doctor, etc. Despite the various options, fitness remains a primary goal and underlies real life choices. For example, to be fit, one needs food. To have food, one needs money. To have money, one needs a job. To have a job, one needs some skills. To have some skills, one needs to have a training, learn and practice. The above reasoning can keep going on and thus forms a chain of goals, with fitness at its root. The chain of decisions breaks the abstract goal of fitness into multiple small pieces so that it can be served in reality.
With multiple options present, an agent has to make one choice or the other, which gives rise to the impression of free will. It may be hard to say that fitness is the only goal of every agent. But if an agent intentionally acts against this primary goal, i.e. intentionally decreases its fitness, its situation will deteriorate and it may cease existing eventually. So most, if not all, goals of an agent will be consistent with fitness. Thus free will is subject to the goal of fitness.
When there are more than one possible options, an intelligent agent selects one to act. Free will is the ability to decide among the set of all options. The normal order of this process is reasoning -> decision -> action -> outcome. With reasoning precedes outcome, one key step in any decision is prediction, which enables an agent to evaluate the outcome of each possible actions before a decision. For a prediction, there is a target process to be predicted. Then, physically, prediction is an application of some mechanism to compute certain property of target process at a future time. Mathematically, prediction is performing some computation isomorphic to the target process at a future time.
With prediction as part of decision, one can argue that an agent always makes rational decision (to maximize its fitness), while the irrational behaviors are attributed to a flawed prediction. e.g. in a stock market, one may buy at a high price while sell at a low price. This seemingly foolishness is due to the wrong prediction of the market, even though the agent intentionally would like to earn a profit. Even in the case of suicide, the agent often holds the belief(a prediction) that death is fitter than life.
Prediction implies that the target process is replicated somehow (physically by some mechanism or mathematically by some isomorphism), with the replicate being computed before the target process actually happens. Then a question arises: can all processes be replicated somehow?
To answer, processes (or aspects of a process) can be classified by its repeatability.
1) non-detectable, the process does not have any detectable effect.
2) non-repeatable, the process has detectable effect, but when the process is repeated, its effects are different each time.
3) repeatable, the process has detectable effect, and whenever the process is repeated, its effects are identical each time.
As there is no way to study a non-detectable(class 1) process, we are only concerned with non-repeatable(class 2) and repeatable(class 3) process. For example, when the final result of a tournament is examined, it is repeatable that every tournament has a champion. When each game of a tournament is concerned, it is non-repeatable. (Even if the same players played at the same schedule, the outcome would be different)
In general, science deals with repeatable processes. When a process is applied with identical initial conditions, the outcome effect shall be identical. Such processes are thus deterministic.
On the other hand, non-repeatable processes gives varying outcome each time when it is applied. The non-repeatability arises in 2 senses, 1) the initial condition may not be strictly identical. e.g. aside from the same players and schedule, minor aspects such as the weather, what players eat, when they eat are also initial condition that may contribute to the outcome of a match. 2) memory, when a process is repeated, the memory of earlier run may contribute to the outcome of the later run. e.g. when the same players replay a match, their experience in the earlier match may prompt the players to perform differently in the latter match.
The memory induced non-repeatability can arise in a deterministic process. i.e. for a deterministic process, even if all initial conditions are identical, the memory of previous run can lead to different outcome in a latter run. If memory is considered part of initial condition, then the initial conditions in a later run is inevitably different from those in an earlier run.
A non-repeatable deterministic process(NRDP) may happen within a brain and behave the way that free will, soul and conscience do. Due to its non-repeatability, the NRDP only happens once in its binding brain. Thus only the carrying brain can manifest the NRDP. Then only the carrying brain can be responsible for the effect of a NRDP.
There is no replicate of a NRDP, so NRDP can not be predicted in general.