Chapter 5   Thinking = Inference + Search + Inference

 

Jonathan Baron (1994) in his textbook, “Thinking and Deciding” writes on page 4:

 

            “Thinking about actions, beliefs and personal goals can all be described in terms of a common framework, which asserts that thinking consists of search and inference. We search for certain objects and then make inferences from and about the objects we have found.”

 

Although Baron sees the role of logic as limited to inference, in our logic-based model of thinking, search is performed by means of backward reasoning, and inference by forward reasoning. The objects that we search for are solutions of goals. Like Baron, we distinguish between the role of thinking, in generating candidate solutions and deriving their consequences, and the role of deciding, in evaluating different solutions and choosing between them.

 

It seems to be a common view that logic has nothing to do with search. Indeed Paul Thagard in his introduction to cognitive science (page 45) states: “In logic-based systems the fundamental operation of thinking is logical deduction, but from the perspective of rule-based systems the fundamental operation of thinking is search.”

 

To see how logic is concerned with search, consider the problem of

 

Going from A to B

 

We are all familiar with searching for objects in physical space, and with searching how to get from one place to another:

 

                        To go from A to B,

                        if A is directly connected to B then

                        go from A to B directly.

 

                        To go from A to B,

                        if C is between A and B then

                        go from A to C and  

                        go from C to B.

 

More generally and expressed as beliefs in logical terms:  

 

                        An agent goes from A to B,

                        if A is directly connected to B and

                        the agent goes from A to B directly.

 

                        An agent goes from A to B,

                        if C is between A and B and

                        the agent goes from A to C and

                        the agent goes from C to B.

 

The procedures and beliefs apply not only to physical places but also to conceptual places, like “rags” and “riches”.

 

The goal-reduction procedures are a special case of the beliefs. They are the special case in which the beliefs are used to reason backward and “the agent” is the agent who uses them to reduce goals to sub-goals. Unlike the procedures, the beliefs can also be used to reason forward, for example to draw consequences from observations about another agent’s behaviour.

 

There can be many ways of choosing a place C, between A and B. For example, you can go from rags to riches either by getting a paid job or by robbing a bank. Similarly, there can be many ways of going from A to C and of going from C to B. For example, you can get a paid job either by going to work directly after finishing school or by getting higher qualifications first and then going to work after you graduate.

 

Some of the choices for the intermediate place C might not succeed in solving the other sub-goals of going from A to C or of going from C to B. For example, although you might be able to get a paid job directly after leaving school, you might not then be able to go on from there to become rich.

 

In the general case, therefore, to solve the goal of going from A to B, you need to search for a solution. Instead of searching in material space, you can save some of the work by doing some of the searching in your mind.

 

You can use the beliefs, for example if you’re planning your summer holiday, to search for a plan for getting from A to B, long before you actually start your holiday. You can mentally explore alternative plans, and even search for a plan that optimises the outcome, perhaps seeking to minimise its costs and maximise its benefits. Moreover, you can interleave your planning with other things, suspending it when you have other more pressing commitments to attend to, and resuming it when you have nothing more important to do.

 

How to get to the French Riviera

 

If you still need convincing, consider the goal:

 

Goal:                           I go from Wimbledon to the French Riviera.

 

Suppose that I have the following information:

 

Beliefs:                        Nice is between Wimbledon and the French Riviera.

                                    Paris is between Wimbledon and the French Riviera.

                                    Heathrow is between Wimbledon and the French Riviera.

                                    Gatwick is between Wimbledon and Nice.

                                    Clapham Junction is between Wimbledon and Gatwick.

 

                                    Wimbledon is directly connected to Clapham Junction.

                                    Clapham Junction is directly connected to Gatwick.

                                    Gatwick is directly connected to Nice.

                                    Nice is directly connected to the French Riviera.

 

                                    etc.

 

I might have this information already stored in my memory directly as atomic facts, or I might be able to derive it from other sources.

 

Reasoning backwards, I have two alternative ways of trying to solve my goal. I can either generate the sub-goals:

 

                                    Wimbledon is directly connected to the French Riviera and

                                    I go from Wimbledon to the French Riviera directly.

 

or generate the sub-goals:

 

                                    C is between Wimbledon to the French Riviera and

                                    I go from Wimbledon to C and

                                    I go from C to the French Riviera.

 

Which of these I generate first, or whether I generate both simultaneously, depends on my search strategy. If I generate the first one first, then I have to decide which sub-goal to work on first, the sub-goal Wimbledon is directly connected to the French Riviera or the sub-goal I go from Wimbledon to the French Riviera directly.

 

Suppose I decide to work on the first sub-goal Wimbledon is directly connected to the French Riviera first. Given only the beliefs I have listed above, this sub-goal can not be solved. I must, therefore, abandon or suspend this line of search or else perform an external action to try to find additional information in case there is a connection I don’t know about. Suppose I decide to suspend this line of search.

 

I am left with the other alternative way of trying to solve my top-level goal:

 

                        C is between Wimbledon to the French Riviera and

                        I go from Wimbledon to C and

                        I go from C to the French Riviera.

 

Suppose I decide to work on the first of the three sub-goals. (There is no point of working on either of the other two before I have picked an intermediate place C.) Given the limited information I have listed above, there are three ways to solve this sub-goal. I have to decide which way to try first.

 

And so the search continues, considering alternatives, deciding which sub-goal to work on first, and deciding whether to perform external actions to get more information, until I find one or more solutions. In this case, if I decide not to perform any external, information-gathering actions, the only solution is the plan:

 

                                    I go from Wimbledon to Clapham Junction directly.

                                    I go from Clapham Junction to Gatwick directly.

                                    I go from Gatwick to Nice directly.

                                    I go from Nice to the French Riviera directly.

 

I can derive this plan, searching in my mind, either forward from Wimbledon or backward from the French Riviera, depending on which sub-goals I work on first. However, in either case, I search by reasoning backwards from goals to sub-goals.

 

Of course, if I had additional information, I might be able to find additional solutions for my initial goal. I would then need to choose between the alternatives, not only to decide what solution to implement, but also, before that, to decide how to search for a solution. Because the purpose of thinking in this case is ultimately to help in deciding what to do, I could use the same criteria that I use to decide between solutions - for example the criterion of most benefit for least cost – as a search strategy, to explore more promising before less promising avenues of thought.

 

Logical Reasoning = Search + Inference

 

There is another, more interesting sense in which logic combines search and inference – the sense in which Jonathan Baron characterises thinking in general: “We search for certain objects and then we make inferences from and about the objects we have found.”  

 

In our logic-based framework, we search for solutions by reasoning backwards from goals. However, to help in deciding between alternative solutions, we explore the space of forward inferences, to find any additional, desirable or undesirable consequences of the solutions.

 

To illustrate this sense in which thinking combines search and inference, Baron gives the example of a student trying to decide what course to take as an elective. First she considers a course on modern history, which sounds interesting, but involves too much work. Then she thinks of another modern history course, which is also interesting, but which might not be as much work. So she tries to find someone who has taken the course before to find out how much work actually is involved.

 

Baron’s example is similar to our example of planning to take a holiday on the French Riviera, but it illustrates the importance of information-gathering actions. It shows that you can’t expect to have all the information you need to solve a problem already in your internal memory. You might need to consult external sources as well.

 

However, the main purpose of the example is to illustrate the use of inference to derive consequences of candidate solutions, to help in deciding what to do. In Baron’s example, the inference is simple: If the student takes the first course, then it will involve a lot of work.

 

Deciding what to do, based on these inferences, is more complex. It involves comparing different candidate courses for their advantages and disadvantages. Since no single course is likely to outrank all other courses on all the relevant criteria, hard choices will probably need to be made, perhaps sacrificing some advantages of a course in order to avoid some of its disadvantages. To make matters even more complicated, the student will need to base her estimates of the costs and benefits of the different alternatives on uncertain, perhaps probabilistic information.

 

Uncertainty

 

Uncertainty about future circumstances beyond our control is a feature of most real-life problem-solving situations. Consider, once more, the problem of going from rags to riches, and suppose that I am thinking about robbing a bank as a way to get rich. Robbing a bank isn’t an easy option. I would need to think hard, to construct a plan that would be likely to succeed. I would need to pick a bank, consider whether to go it alone or to organise a gang to help me, decide whether to do it in broad daylight or after dark, and plan my get-away.

 

But before constructing a plan in all its detail, I could mentally explore the likely consequences of robbing a bank, to see if there are any other desirable or undesirable possible outcomes. Apart from any moral considerations, if I rob a bank, get caught, and am convicted, then I will end up in jail. But I don’t want to go jail.

 

I can control whether or not I try to rob a bank. But I can’t control whether I will be caught or be convicted. Not only are these possibilities beyond my complete control, but I can not even predict their possible occurrence with any certainty. At best, I can only try to estimate their probability.

 

If I judge that the chances of getting caught and being convicted are high, then I will decide not to rob a bank, because I don’t want to go to jail.  I will not even think about how I might rob a bank, because all of the alternatives lead to the same undesirable conclusion.

 

Thinking about robbing a bank not only shows the value of inferring consequences of alternative solutions, but it also shows the need to judge the probability of circumstances outside our control.

 

Combining judgements of probability with assessments of the utility of different outcomes belongs to the domain of Decision Theory. We will come back to these matters of Decision Theory later. In the meanwhile, it suffices to note that in many cases, thinking, which combines searching for options with inferring their consequences, can often be a lot easier than deciding what to do.

 

Thinking without Search

 

The characterisation of thinking as search plus inference is a big advance over some other theories, in which thinking is viewed as little more than just search. However, it fails to account for the kind of thinking that is needed to deal with changes in the environment – especially when those changes necessitate a rapid response, and there isn’t enough time to search for an optimal solution.

 

Thinking by searching and inferring consequences is appropriate in many situations, like when you are planning your summer holidays, choosing an elective course or planning to rob a bank, when you have plenty of time to search for alternative solutions. However, there are other situations, like when you are in an emergency, when you don’t have time to consider all the alternatives and when you don’t even have time to finish thinking before you need to start acting.

 

Suppose, for example, that you are a Mars Explorer Mark II, equipped with the full capabilities of logical thinking. You are physically searching for life on Mars, when a Mars Annihilator leaps into your path over the horizon. Fortunately, you have been forewarned about such emergencies and are equipped with the appropriate maintenance goal:

 

Goal:   If Mars Annihilator in sight, then go from where I am back to the space ship.

 

Observation:                                                  Mars Annihilator in sight.

Forward reasoning, achievement goal:     go from where I am back to the space ship.

 

In theory, you could sit down and mentally explore the different ways of getting back to the safety of the space ship, in the same way you would if you were planning your holidays on the French Riviera. But then in practice, you would probably be finished before you got started.

 

What you need to do instead is to think on your feet, using the same knowledge that you use when planning your summer holidays, but without searching the complete mental space of alternatives. You have to choose a place C directly connected to your current location and in the direction of your space ship and go to C directly, before you start thinking about what you are going to do after that. When you get to C, you choose another place C’ directly connected to your new location and in the direction of the space ship and go there directly. you continue in this way, thinking about where to go next and going there, until you reach the space ship if you are lucky or are caught by the Mars Annihilator if you are not.

 

 

 

 

Thinking about time

 

In the general case, to get the right balance between thinking and acting, an agent needs to think about time – both to think about the time when actions need to be taken and to think about how much time is available for thinking before needing to act. The topic of thinking about time is coming up soon.

 

Thinking = Inference + Search + Inference

 

We now have a more complete view of the role of logic in the observation-thought-decision-action cycle:

 

 

Highest level maintenance goals                                        Achievement goals                      consequences

                                                          Forward reasoning

 

                             Forward reasoning                                                       Backward reasoning

                                                                                                                   searches for solutions

 

 

 

Intermediate level consequences                                        Intermediate sub-goals                      consequences            Decide

 


                                                                                                                                 

                             Forward reasoning                                                       Backward reasoning

 

 

 

Observations                                                                      Candidate actions                        consequences            Actions

 

 


                        Perceptual processing                                                                             Motor processing