Functionalism is the view that defines mental states in terms of their functional roles. It is a materialist view, adopting a Token physicalism view.

In this view, pain is whatever internal state causes to have aversion behavior, regardless of the particular physical system.

Functional role is what defines a mental states. It describes what the state does = how it is caused, how it interacts with other mental states, and what behavior it produces. Mental states, hence, form a causal network, where each mental state causally interact with each other in producing behaviors. This means functionalist explanations can be complex and layered, since multiple mental states often work together to produce one behavior.

Example Perception (it is raining) + Desire (I want to go outside) = behavior (grabbing the umbrella)

Functionalism avoids the chauvinism objection of Mind-Brain-Identity-theory as it does not make any assumptions about what kind of states will fulfill the relevant functional roles.

Functionalism (and mainly any other materialist view of the mind) struggles with the problem of consciousness in explaining subjective experiences

Functionalism and artificial intelligence

Functionalism allows for the possibility that machines could realize the functional roles of states associated with intelligence. I.E. if a computer could be designed such that its hardware states could realize the same functional roles we associate with human intelligence, then the computer would be intelligent.