This has been theorised by Daniel Dennett, philosopher, in his essay, Why the Law of Effect Will Not Go Away. Chapter 5 of his book, Brainstorms. By the Law of Effect he means actions followed by rewards are repeated.
It takes two to invent anything. The two refers to a birfurction within the one individual. One makes up combinations, the other chooses from the combinations.
This can be compared to Darwinian evolution by natural selection.
Skinner's behaviourist approach presupposes a materialist world view. We live in an absurd, pointless world without higher meaning.
Skinner was looking for non question begging explanations of learning. One starting point was his rejection of question begging "intentional" or "mentalist" vocabulary such as belief, desire, expectation, recognition, action. All of these terms beg the question of explaining behaviour because they imply a self interested agent within the human, who "believes", "desires", "expects" etc. Nothing is really explained.
Skinner had valid reasons to reject mentalist explanations that only created an illusion of explanation.
Skinner's principle of operant conditioning (an operant is a new learnt behaviour, such as a bird presses a lever and is rewarded with food, stimulus -> response learning) accounts for a lot of learning but not all of it!
What is right about the Law of Effect? From an evolutionary standpoint behaviour such as a bird making a nest or a spider making a web can be explained through Darwinian natural selection. Tropistic, instinctual, innate hard wired, rigid behaviours such as these provide a survival advantage.
The next evolutionary step requires some plasticity, more capacity to learn. Humans have adaptive soft wiring, undesigned temporary interconnections that can be programmed. A new connection is formed (a reinforcer) linking a given stimulus (press the lever) to a given response (food appears). The capacity to be conditioned in this way has survival value.
However, humans and monkeys seem to be able to think out and select adaptive actions without any external feedback or reinforcement. At this point Skinner's explanations grind to a halt.
Dennett's wishful thinking: If only thinking could have an environmental effect.
It can! Creatures have two environments: an inner and outer environment.
The inner environment can provide feedback for events in the brain. That feedback can be rigid or plastic (learnt). However, inner plastic feedback is faster and safer!
"Selection by inner environment" can explain learning and learning to learn.
Dennett further enhances behaviourism by introducing ideas from Artificial Intelligence (AI) research into the mix.
AI programmers characterise problems intentionally, they use the language of cognitive psychology - maps, beliefs, expectations, concepts, preferences, plans of action.
They view the computer andropomorphically and then proceed to break the problem into bits. AI programs, programs that are designed to learn, generate possible solutions and then test against criteria. The criteria are part of the inner environment. Natural selection and the Law of Effect are a guideline to this process.
Learning can be viewed as self design. There doesn't appear to be a more powerful way to think about design than thinking of it as an evolution wrought by generate and test!
Generate and test is only a powerful and efficient mechanism provided that the generator is highly selective about likely, plausible candidates. Invention requires both fertility of imagination (in generation) and a critical eye (in testing).
This is also a reason for Skinner's unpopularity. He doesn't make us feel creative. Where do the ideas come from? Either the generator of ideas, the unconscious self has some discernment. Or the generator is a blind automaton. Neither alternative does much for our self esteem. Usually clever people (Poincare, Mozart) are not able to explain how their great ideas originated.