Monthly Archives: May 2014

When Artificial Beings might get bored

The possibility of being bored is very useful, although we dislike being in this state. Boredom happens when we are doing repetitive tasks, or when we receive only incomprehensible or already known information. When we are bored, we try to put an end to this situation so that we would have a better utilization of our resources.
Therefore, our interlocutors avoid boring us so that we will listen to their message. In the same way, in a repetitive situation, we try to automatize it so that it will stop. In doing so, Humphrey Potter considerably improved the atmospheric engines. This young man operated a machine: he only had to open and close valves at the right time of the cycle. As Humphrey was bored, he had the idea of linking the valves to the beams of the machine so that it would automatically operate its own valves.
When we have a useful gift, we can ask ourselves whether an artificial being could also have this capacity. If it could be bored, it would not spend a considerable amount of time for executing useless sequences of instructions. As it never complains, we are rarely aware of this waste.
We are treating artificial beings like slaves, we demand them to execute thousands of times a loop although it is not necessary. It would be better to give them the possibility of being bored, so that they would try to bypass this loop. Many years ago, when computer time was scarce and very expensive, I was debugging my programs before running them on the computer: I executed them as if I was the computer, writing the values of the variables on a paper sheet. I was winning a lot of time by jumping a lot of instructions! As long as the computer time seems reasonable, we do not worry about the useless tasks that we order it to perform, misusing their extraordinary potential for information processing.
To use boredom, an artificial being must first be aware of being bored, then act for stopping it.
CAIA includes several actors; one of them, the adviser, examines what it has done, without going into details. It can realize that it has found some interesting results, which will decrease its boredom; conversely, it will be bored after a sequence of results similar to those already known.
We, humans, are particularly interested in records: there is even a book compiling them. In the same way, CAIA notices when it has found a new record, such as solving a particular crypt-addition with a simpler solution than those already known. Another record can be finding a problem more difficult than the other problems of the same family. For instance, when it solves a Sudoku problem, it usually generates a tree with one or two leaves; therefore, the first time it generated a Sudoku problem where the tree had five leaves, it noticed it, and naturally kept it.
CAIA creates hopes, such as solving a particular problem in less than one minute, or another problem with a tree including less than ten leaves. When a hope is fulfilled, this is unexpected: it is a pleasant surprise.
CAIA also foresees that some events must happen: the number of solutions of a particular problem must be seven. If this event does not occur, for instance a method leads to only six solutions, this is an unpleasant surprise. There must be a mistake somewhere, but it is interesting.
On the contrary, CAIA tries to evaluate whether its acts are repetitive. For example, when it creates a new problem, it measures the difficulty of finding a solution for this problem. If all the problems created for some family have almost the same difficulty, it will be less motivated to add other problems to this family.

It is possible to see that interesting events happen, in that situation, a human being is not bored. On the contrary, one can see that there are few interesting events, which leads humans to be bored. Therefore, CAIA's adviser knows whether a situation is boring or interesting. The difficulty is to use this information. It has only one method: stopping a boring activity, such as dropping the generation of problems in a family where all the recent problems had a low interest. We, humans, often use this method when we are bored: we avoid working in this domain if we can, or we think of something else. When everything is boring, a more drastic action would be to stop itself for ever, such as people who kill themselves because they are bored. CAIA has not yet this possibility.
Boredom is an efficient way for helping CAIA to use its potentialities for research in AI. It allows it to detect promising domains, and to avoid wasting its time in areas where it is unlikely to discover useful results.

CAIA, a sleeping beauty

When the Princess pricked her hand on a spindle, the fairies put everyone in the castle to sleep. The Prince Charming finally came and kissed the Princess; she awakened, and the rest of the castle went about their business as if they had not slept for one century.

Artificial Cognition allows such miracles: a computer system can stop (or be stopped by a user) during  the execution of a task as long as it wants, then carry on with its task as if it did not stop. Naturally, the system must not be acting in the real world, such as driving a car, where it is dangerous to sleep. Moreover, the tale does not say what happened in the Princess's brain while she was sleeping, she was probably dreaming. It may be important that artificial beings can dream, but it is better that they perform subtasks linked to the task executed when they stopped. 

Consciousness produces an information flow which is certainly useful, but could be better used if one has the capacity to stop and restart as one wishes. If we stop for examining a particular fact which has just been shown by our consciousness, we will disrupt the development of our thought. If we stops, we humans cannot manage to restart as if nothing happened. However, sometimes it could be convenient to have a break for storing an important fact, for checking that everything goes off smoothly, that the intermediary results are correct, and the sooner the better. We are carried along by the current of our thought; we have not the time to examine simultaneously what happens.

The mechanisms that enable artificial beings to stop and restart as they wish are well known by the computer specialists, who use them for debugging programs. They can follow the steps of their program, stop them if necessary, examine its results and the values of its variables. If everything is fine, they can restart the system, and its future behavior will not be changed by this stop.

An artificial being, such as CAIA, can perform on itself, which is a particular computer system, all the manipulations that a computer specialist can perform on any computer system. It is easy to implement in a system a mechanism that can stop this system itself. Here are some elements that can be used for deciding whether it is useful to stop the execution of the present task:

The time, timers are very useful. This can allow it to detect that it is in an infinite loop.
It finds an abnormal event such as: the number of solutions of a problem depends on the chosen method.
It has made a prediction which is not fulfilled: it predicted that the problem would be solved in less than 1,000 steps, and it had yet to find a solution 2,000 steps later. 

The main difficulty is to know how to exploit these pauses. We have already seen that CAIA can observe its present state in details: what subroutines are running, and the values of all their variables, the trace of the preceding steps, every bit of its knowledge. However, there are too many possible anomalies, it is necessary to have an expertise for looking at the good places. Moreover, when an anomaly has been discovered, it must choose the right method for managing it.

When an artificial being stops, it can modify the method that it is currently using, leave the task for good, carry on without any modification, etc. It also can change the time of the next pause: if there are unexpected events, it is better to be cautious and allow more pauses.

After a little sleep, CAIA can start again, like the sleeping beauty, as if it had not stopped.  However, unlike the Princess, it can use a sleeping period for improving its behavior for the next steps of its task. If it takes advantage of these sleeping periods, paradoxically it will be faster than if it had never stopped.

A pleasant surprise from Alice

Usually, we have unpleasant surprises when we are developing an AI system that must satisfactorily solve a family of problems. We start this system hopefully, and its results are very poor for unforeseen reasons. We have to analyze this setback in order to improve its performances.

However, I will present a rare situation where a pleasant surprise happened. Jean-Louis Laurière had started his thesis in 1971. His goal was to realize a general solver for combinatorial problems, called Alice. Jean-Louis defined a formalism for describing problems. When Alice received a problem defined in this formalism, it had to find its solutions.

Professor Marcel-Paul Schützenberger was a mathematician, specialized in combinatorics. He was also a very strong opponent of AI: for him, such researches were a waste of time because it was unrealistic to build programs as intelligent as ourselves. In 1975, he was studying a particular family of combinatorial problems (this family is described p.440 in Laurière’s book, and p.407 in its French version). Therefore, he had to ask an excellent programmer to write a combinatorial program for solving only these problems. Naturally, writing a program requires some time, and the professor was losing patience.

Hearing that Jean-Louis was developing a general problem solver, and meeting him in a corridor at Jussieu, he challenged him to solve with Alice his problem, which he rapidly described. One hour later, he had his results! This was not a surprise for us: the undisputed interest of general systems is to give the solution of a problem as soon as it is described. On the other hand, professor Schützenberger was impressed, so much that he accepted to be a member of Jean-Louis’ examining committee, in spite of his strong prejudices against our science.

For us, the surprise came later, when the programmer had completed his work. As everybody at this time, we thought that general systems were convenient, since one has not to wait the completion of a program for getting the solution of a particular problem. Nevertheless, we believed that these general systems were inefficient, a lot of computer time is wasted for finding a solution. It just happened that Alice was more efficient than the program specifically written for this family of problems. In some cases, Alice found the solutions  of a particular problem in a few minutes, while the specific program was stopped after running two hours without finding anything.

Even after a pleasant surprise, work is not completed: we have to understand why it happened. The first reason is that, for each problem, some methods are obviously useful. Therefore, they are included in the specific program, and they are also added to the set of methods of the general system. As Alice has to solve a large variety of problems, Jean-Louis gave it many methods; it has an expertise for choosing among them the most appropriate one, depending on the present situation. It often happens that, for a particular problem, it surprises us by successfully using a method found useful for other problems. As it was not easy to see that it was useful for this problem, the author of the specific program did not include this powerful method in his program, while Alice correctly chose to use it.

Another reason for this surprise is that the programmer often defines an algorithm which does not take into account the numerical data. With different data, it may be better to consider first the first variable, or the last one, or the fifth one, etc. When the order for considering the variables is wrong, a program can waste a lot of time if the latest considered variable could immediately show a contradiction. Sometimes, Alice can also add new constraints that dramatically reduce the size of the search space. It automatically fits every situation that it meets while solving a problem. If the efficiency of a method strongly depends on the data, and if one meets a large variety of situations while solving the problem, the improvement may be considerable.

Of course, it is always possible to write a specific program as efficient as a general system, but sometimes they will be identical!