Trial and error
Encyclopedia
Trial and error, or trial by error, is a general method of problem solving
Problem solving
Problem solving is a mental process and is part of the larger problem process that includes problem finding and problem shaping. Consideredthe most complex of all intellectual functions, problem solving has been defined as higher-order cognitive process that requires the modulation and control of...

, fixing things, or for obtaining knowledge
Knowledge
Knowledge is a familiarity with someone or something unknown, which can include information, facts, descriptions, or skills acquired through experience or education. It can refer to the theoretical or practical understanding of a subject...

.
"Learning doesn't happen from failure itself but rather from analyzing the failure, making a change, and then trying again."

In the field of computer science
Computer science
Computer science or computing science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems...

, the method is called generate and test. In elementary algebra, when solving equations, it is "guess and check".

This approach can be seen as one of the two basic approaches to problem solving and is contrasted with an approach using insight
Insight
Insight is the understanding of a specific cause and effect in a specific context. Insight can be used with several related meanings:*a piece of information...

 and theory
Theory
The English word theory was derived from a technical term in Ancient Greek philosophy. The word theoria, , meant "a looking at, viewing, beholding", and referring to contemplation or speculation, as opposed to action...

. However, there are intermediate methods which for example, use theory to guide the method, an approach known as guided empiricism.

Methodology

This approach is more successful with simple problems and in games, and is often resorted to when no apparent rule applies. This does not mean that the approach need be careless, for an individual can be methodical in manipulating the variables in an attempt to sort through possibilities that may result in success. Nevertheless, this method is often used by people who have little knowledge in the problem area.

Simplest applications

Ashby
William Ross Ashby
W. Ross Ashby was an English psychiatrist and a pioneer in cybernetics, the study of complex systems. His first name was not used: he was known as Ross Ashby....

 (1960, section 11/5) offers three simple strategies for dealing with the same basic exercise-problem; and they have very different efficiencies:
Suppose there are 1000 on/off switches which have to be set to a particular combination by random-based testing, each test to take one second. [This is also discussed in Traill (1978/2006, section C1.2]. The strategies are:


  • the perfectionist all-or-nothing method, with no attempt at holding partial successes. This would be expected to take more than 10^301 seconds, [i.e. 2^1000 seconds, or 3·5×(10^291) centuries!];
  • a serial-test of switches, holding on to the partial successes (assuming that these are manifest) would take 500 seconds; while
  • a parallel-but-individual testing of all switches simultaneously would take only one second.


Note the tacit assumption here that no intelligence or insight is brought to bear on the problem. However, the existence of different available strategies allows us to consider a separate ("superior") domain of processing — a "meta-level" above the mechanics of switch handling — where the various available strategies can be randomly chosen. Once again this is "trial and error", but of a different type. This leads us to:

Trial-and-error Hierarchies

Ashby's book develops this "meta-level" idea, and extends it into a whole recursive
Recursion
Recursion is the process of repeating items in a self-similar way. For instance, when the surfaces of two mirrors are exactly parallel with each other the nested images that occur are a form of infinite recursion. The term has a variety of meanings specific to a variety of disciplines ranging from...

 sequence of levels, successively above each other in a systematic hierarchy. On this basis he argues that human intelligence emerges from such organization: relying heavily on trial-and-error (at least initially at each new stage), but emerging with what we would call "intelligence" at the end of it all. Thus presumably the topmost level of the hierarchy (at any stage) will still depend on simple trial-and-error.

Traill (1978/2006) suggests that this Ashby-hierarchy probably coincides with Piaget
Jean Piaget
Jean Piaget was a French-speaking Swiss developmental psychologist and philosopher known for his epistemological studies with children. His theory of cognitive development and epistemological view are together called "genetic epistemology"....

's well-known theory of developmental stages. [This work also discusses Ashby's 1000-switch example; see §C1.2]. After all, it is part of Piagetian doctrine that children learn by first actively doing in a more-or-less random way, and then hopefully learn from the consequences — which all has a certain to Ashby's random "trial-and-error".

The basic strategy in many fields?

Traill (2008, espec. Table "S" on p.31) follows Jerne
Niels Kaj Jerne
Niels Kaj Jerne, FRS was a Danish immunologist. He was awarded the Nobel Prize in Physiology or Medicine in 1984. The citation read "For theories concerning the specificity in development and control of the immune system and the discovery of the principle for production of monoclonal antibodies"....

 and Popper
Karl Popper
Sir Karl Raimund Popper, CH FRS FBA was an Austro-British philosopher and a professor at the London School of Economics...

 in seeing this strategy as probably underlying all knowledge-gathering systems — at least in their initial phase.

Four such systems are identified:

  • Darwinian evolution which "educates" the DNA
    DNA
    Deoxyribonucleic acid is a nucleic acid that contains the genetic instructions used in the development and functioning of all known living organisms . The DNA segments that carry this genetic information are called genes, but other DNA sequences have structural purposes, or are involved in...

     of the species,
  • The brain of the individual (just discussed);
  • The "brain" of society-as-such (including the publicly-held body of science); and
  • The immune system
    Immune system
    An immune system is a system of biological structures and processes within an organism that protects against disease by identifying and killing pathogens and tumor cells. It detects a wide variety of agents, from viruses to parasitic worms, and needs to distinguish them from the organism's own...

    .

An ambiguity: Can we have "intention" during a "trial"

In the Ashby-and-Cybernetics
Cybernetics
Cybernetics is the interdisciplinary study of the structure of regulatory systems. Cybernetics is closely related to information theory, control theory and systems theory, at least in its first-order form...

 tradition, the word "trial" usually implies random-or-arbitrary, without any deliberate choice.
However amongst non-cyberneticians, "trial" will often imply a deliberate subjective act by some adult human agent; (e.g. in a court-room, or laboratory). So that has sometimes led to confusion.

Of course the situation becomes even more confusing if one accepts Ashby's hierarchical explanation of intelligence, and its implied ability to be deliberate and to creatively design
Design
Design as a noun informally refers to a plan or convention for the construction of an object or a system while “to design” refers to making this plan...

 — all based ultimately on non-deliberate actions. The lesson here seems to be that one must simply be careful to clarify the meaning of one's own words, and indeed the words of others. [Incidentally it seems that consciousness is not an essential ingredient for intelligence as discussed above.]

Features

Trial and error has a number of features:
  • solution-oriented: trial and error makes no attempt to discover why a solution works, merely that it is a solution.
  • problem-specific: trial and error makes no attempt to generalise a solution to other problems.
  • non-optimal: trial and error is generally an attempt to find a solution, not all solutions, and not the best solution.
  • needs little knowledge: trials and error can proceed where there is little or no knowledge of the subject.


It is possible to use trial and error to find all solutions or the best solution, when a testably finite number of possible solutions exist. To find all solutions, one simply makes a note and continues, rather than ending the process, when a solution is found, until all solutions have been tried. To find the best solution, one finds all solutions by the method just described and then comparatively evaluates them based upon some predefined set of criteria, the existence of which is a condition for the possibility of finding a best solution. (Also, when only one solution can exist, as in assembling a jigsaw puzzle, then any solution found is the only solution and so is necessarily the best.)

Examples

Trial and error has traditionally been the main method of finding new drugs, such as antibiotics. Chemist
Chemist
A chemist is a scientist trained in the study of chemistry. Chemists study the composition of matter and its properties such as density and acidity. Chemists carefully describe the properties they study in terms of quantities, with detail on the level of molecules and their component atoms...

s simply try chemicals at random until they find one with the desired effect. In a more sophisticated version, chemists select a narrow range of chemicals it is thought may have some effect using a technique called structure-activity relationship
Structure-activity relationship
The structure–activity relationship is the relationship between the chemical or 3D structure of a molecule and its biological activity. The analysis of SAR enables the determination of the chemical groups responsible for evoking a target biological effect in the organism...

. (The latter case can be alternatively considered as a changing of the problem rather than of the solution strategy: instead of "What chemical will work well as an antibiotic?" the problem in the sophisticated approach is "Which, if any, of the chemicals in this narrow range will work well as an antibiotic?") The method is used widely in many disciplines, such as polymer technology to find new polymer types or families.

The scientific method
Scientific method
Scientific method refers to a body of techniques for investigating phenomena, acquiring new knowledge, or correcting and integrating previous knowledge. To be termed scientific, a method of inquiry must be based on gathering empirical and measurable evidence subject to specific principles of...

 can be regarded as containing an element of trial and error in its formulation and testing of hypotheses. Also compare genetic algorithm
Genetic algorithm
A genetic algorithm is a search heuristic that mimics the process of natural evolution. This heuristic is routinely used to generate useful solutions to optimization and search problems...

s, simulated annealing
Simulated annealing
Simulated annealing is a generic probabilistic metaheuristic for the global optimization problem of locating a good approximation to the global optimum of a given function in a large search space. It is often used when the search space is discrete...

 and reinforcement learning
Reinforcement learning
Inspired by behaviorist psychology, reinforcement learning is an area of machine learning in computer science, concerned with how an agent ought to take actions in an environment so as to maximize some notion of cumulative reward...

 - all varieties for search which apply the basic idea of trial and error.

Biological evolution
Evolution
Evolution is any change across successive generations in the heritable characteristics of biological populations. Evolutionary processes give rise to diversity at every level of biological organisation, including species, individual organisms and molecules such as DNA and proteins.Life on Earth...

 is also a form of trial and error. Random mutations and sexual genetic variations can be viewed as trials and poor reproductive fitness, or lack of improved fitness, as the error. Thus after a long time 'knowledge' of well-adapted genomes accumulates simply by virtue of them being able to reproduce.

Bogosort
Bogosort
In computer science, bogosort is a particularly ineffective sorting algorithm based on the generate and test paradigm. It is not useful for sorting, but may be used for educational purposes, to contrast it with other more realistic algorithms; it has also been used as an example in logic programming...

, a conceptual sorting algorithm (that is extremely inefficient and impractical), can be viewed as a trial and error approach to sorting a list. However, typical simple examples of bogosort do not track which orders of the list have been tried and may try the same order any number of times, which violates one of the basic principles of trial and error. Trial and error is actually more efficient and practical than bogosort; unlike bogosort, it is guaranteed to halt in finite time on a finite list, and might even be a reasonable way to sort extremely short lists under some conditions.

Jumping spider
Jumping spider
The jumping spider family contains more than 500 described genera and about 5,000 described species, making it the largest family of spiders with about 13% of all species. Jumping spiders have some of the best vision among invertebrates and use it in courtship, hunting and navigation...

s of the genus Portia use trial and error to find new tactics against unfamiliar prey or in unusual situations, and remember the new tactics. Tests show that Portia fimbriata
Portia fimbriata
Portia fimbriata, sometimes called the fringed jumping spider, is a jumping spider found in Australia and Southeast Asia. Adult females have bodies 6.8 to 10.5 millimetres long, while those of adult males are 5.2 to 6.5 millimetres long...

and Portia labiata
Portia labiata
Portia labiata is a jumping spider found in Sri Lanka, India, Burma , Malaysia, Singapore, Java, Sumatra and the Philippines. In this medium-sized jumping spider, the front part is orange-brown and the back part is brownish...

can use trial and error in an artificial environment, where the spider's objective is to cross a miniature lagoon
Lagoon
A lagoon is a body of shallow sea water or brackish water separated from the sea by some form of barrier. The EU's habitat directive defines lagoons as "expanses of shallow coastal salt water, of varying salinity or water volume, wholly or partially separated from the sea by sand banks or shingle,...

 that is too wide for a simple jump, and must either jump then swim or only swim.

Issues with trial and error

Trial and error is usually a last resort for a particular problem, as there are a number of problems with it. For one, trial and error is tedious and monotonous. Also, it is very time-consuming; chemical engineers must sift through millions of various potential chemicals before they find one that works. There is also an element of risk, in that if a certain attempt at a solution is extremely erroneous, it can produce disastrous results that may or may not be repairable. Fortunately, computer
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...

s are best suited for trial and error; they do not succumb to the boredom that humans do, can test physical challenges in a virtual environment where they will not do harm, and can potentially do thousands of trial-and-error segments in the blink of an eye.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK