Real Time AI

The phrase "real time" has been somewhat overworked in AI and in computer science in general. It has often been used in the very general and vague sense of something that is simply supposed to happen quickly. However, when we use the term "real time" in AI we're talking about something a bit more precise. Essentially anything that we do requires that we make tradeoffs. A lot of those tradeoffs involve time, and a big part of intelligence involves the ability to make those tradeoffs well. If we have enough time-if we are not under any time pressure-it is often very easy to make the right decision. Unfortunately, usually we don't have the freedom to think and act at our leisure, and the same goes for computer systems. So when we talk about "real time artificial intelligence", we're talking about AI which operates under very well-defined time constraints, and which makes tradeoffs--makes decisions which in the fullness of time might prove to be suboptimal-because it has to act.

Sometimes this makes people a little nervous. They expect computer systems to be "perfect" and they don't realize or understand that a fundamental property of intelligence-natural or artificial-that it is imperfect. People aren't perfect, not because of some fundamental flaw in human beings, but rather because the types of problems that people tend to solve don't lend themselves to perfect solutions. Machines that mimic human intelligence aren't going to be perfect, either. Yet we often have to make decisions under imperfect conditions.

Consider a simple example of whether or not a stock is going to go up or down in price in three days time. There is an easy, perfect way to determine this: just wait three days and see whether it does in fact go up in price. Of course, by waiting that amount of time, the information becomes useless. This simply underscores the point that we often have to make imperfect decisions in an imperfect world-the ability to do so is a fundamental feature of intelligence. The key is knowing how long to delay making a decision--when to gather more information, and therefore take the risk of delaying too long in acting--and when to act on whatever information we have available.

There are three main kinds of real time AI systems: planning systems, anytime algorithms, and reactive systems. As the name implies, a planning system constructs a plan for solving some problem. There is usually some kind of goal that the system is provided with, and the system then constructs a plan for how to get from its current state to this goal. In constructing the plan, the system generally keeps around some state information about what it expects the state of the world to be like at each stage in the plan. Then, if something happens which is unexpected, the system immediately knows that things are not going according to plan, and can then replan appropriately, giving it an ability to respond in real time. Thus, in a planning system we take steps towards our goal even without knowing for sure that these steps will lead us to that goal-we know only that at the time we make them, they are the best possible course of action. An example of a planning system might be something that manages the distribution of packages for a service such as Fedex. They will have a clear plan for the deployment of various resources such as planes, trucks, vans, and their people. Yet they will need to continually be revising that plan in real time as changes happen-an unexpectedly high volume of packages at a particular location, a delayed flight, and so on.

An anytime algorithm is something which always has an answer, no matter how much (or how little) time it is run for--it is just that the answer improves over time. This contrasts it with a traditional computer algorithm which runs for a fixed amount of time and then completes. The anytime algorithm doesn't know how long it has to come up with an answer. It only knows that at any point, it may be called upon to act, and it better have an idea what to do. An example of an anytime algorithm would be medical diagnosis in an emergency or intensive care situation. You don't necessarily have enough time to do all the tests that you would normally do, yet it may become clear at any point in time that you have to act to save the patient's life. Thus, you need to act based upon whatever information is available to you at that time.

Reactive systems are systems that have a fairly clear-cut set of responses to contingencies that may arise. Most of the intelligence in a reactive system lies in the design of the reactive architecture, so that in real time the response can be pretty clear cut. However, there can be a tradeoff involved in terms of whether the reactive rule is too costly to be continuously checked with respect to the value that it offers in cases where it is relevant. An example of a reactive system would be a pilot's checklist for dealing with unexpected emergencies.

We're going to spend several editions exploring these real time ideas in a bit more detail. They are an important part of AI. Next edition we will look more at reaction rules.

More information about real time artificial intelligence can be found in the book Planning for Real Time Event Response Management.


Home: Ramalila.NET



All copyrights are maintained by respective contributors and may not be reused without permission. Graphics and scripts may not be directly linked to. Site assets copyright © 2000 RamaLila.com and respective authors.
By using this site, you agree to relinquish all liabilities and claims financial or otherwise against RamaLila and its contributors. Visit this site at your own risk.