The law of effect, or Thorndike's law, is a psychology principle advanced by Edward Thorndike in 1898 on the matter of behavioral conditioning (not then formulated as such) which states that "responses that produce a satisfying effect in a particular situation become more likely to occur again in that situation, and responses that produce a discomforting effect become less likely to occur again in thatsituation."
This notion is very similar to that of the evolutionary theory, if a certain character trait provides an advantage for reproduction then that trait will persist. The terms "satisfying" and "dissatisfying" appearing in the definition of the law of effect were eventually replaced by the terms "reinforcing" and "punishing," when operant conditioning became known. 'Satisfying’ and ‘dissatisfying’ conditions are determined through behavior and cannot be reliably predicted, as each animal may interpret these conditions differently. The new terms, "reinforcing" and "punishing" are used differently in psychology than they are colloquially. Something that reinforces a behavior makes it more likely that that behavior will occur again, and something that punishes a behavior makes it less likely that behavior will occur again.