Expert Systems: The Dawn Of AI

We’ll be honest. If you had told us a few decades ago we’d teach computers to do what we want, it would work some of the time, and you wouldn’t really be able to explain or predict exactly what it was going to do, we’d have thought you were crazy. Why not just get a person? But the dream of AI goes back to the earliest days of computers or even further, if you count Samuel Butler’s letter from 1863 musing on machines evolving into life, a theme he would revisit in the 1872 book Erewhon.

Of course, early real-life AI was nothing like you wanted. Eliza seemed pretty conversational, but you could quickly confuse the program. Hexapawn learned how to play an extremely simplified version of chess, but you could just as easily teach it to lose.

But the real AI work that looked promising was the field of expert systems. Unlike our current AI friends, expert systems were highly predictable. Of course, like any computer program, they could be wrong, but if they were, you could figure out why.

Experts?

As the name implies, expert systems drew from human experts. In theory, a specialized person known as a “knowledge engineer” would work with a human expert to distill his or her knowledge down to an essential form that the computer could handle.

This could range from the simple to the fiendishly complex, and if you think it was hard to do well, you aren’t wrong. Before getting into details, an example will help you follow how it works.

From Simple to Complex

One simple fake AI game is the one where the computer tries to guess an animal you think of. This was a very common Basic game back in the 1970s. At first, the computer would ask a single yes or no question that the programmer put in. For example, it might ask, “Can your animal fly?” If you say yes, the program guesses you are thinking of a bird. If not, it guesses a dog.

Suppose you say it does fly, but you weren’t thinking of a bird. It would ask you what you were thinking of. Perhaps you say, “a bat.” It would then ask you to tell it a question that would distinguish a bat from a bird. You might say, “Does it use sonar?” The computer will remember this, and it builds up a binary tree database from repeated play. It learns how to guess animals. You can play a version of this online and find links to the old source code, too.

Of course, this is terrible. It is easy to populate the database with stupid questions or ones you aren’t sure of. Do ants live in trees? We don’t think of them living in trees, but carpenter ants do. Besides, sometimes you may not know the answer or maybe you aren’t sure.

So let’s look at a real expert system, Mycin. Mycin, from Stanford, took data from doctors and determined what bacteria a patient probably had and what antibiotic would be the optimal treatment. Turns out, most doctors you see get this wrong a lot of the time, so there is a lot of value to giving them tools for the right treatment.

This is really a very specialized animal game where the questions are preprogrammed. Is it gram positive? Is it in a normally sterile site? What’s more is, Mycin used Bayesian math so that you could assign values to how sure you were of an answer, or even if you didn’t know. So, for example, -1 might mean definitely not, +1 means definitely, 0 means I don’t know, and -0.5 means probably not, but maybe. You get the idea. The system ran on a DEC PDP-10 and had about 600 rules.

The system used LISP and could paraphrase rules into English. For example:

(defrule 52
if (site culture is blood)
(gram organism is neg)
(morphology organism is rod)
(burn patient is serious)
then .4
(identity organism is pseudomonas))
Rule 52:
If
1) THE SITE OF THE CULTURE IS BLOOD
2) THE GRAM OF THE ORGANISM IS NEG
3) THE MORPHOLOGY OF THE ORGANISM IS ROD
4) THE BURN OF THE PATIENT IS SERIOUS
Then there is weakly suggestive evidence (0.4) that
1) THE IDENTITY OF THE ORGANISM IS PSEUDOMONAS

In practice, the program did as well as real doctors, even specialists. Of course, it was never used in practice because of ethical concerns and the poor usability of entering data into a timesharing terminal. You can see a 1988 video about Mycin below.

Under the Covers

Mycin wasn’t the first or only expert system. Perhaps the first was SID. In 1982, SID produced over 90% of the VAX 9000’s CPU design, although many systems before then had dabbled in probabilities and other similar techniques. For example, DENDRAL from the 1960s used rules to interpret mass spectrometry data. XCON started earlier than SID and was DEC’s way of configuring hardware based on rules. There were others, too. Everyone “knew” back then that expert systems were the wave of the future!

Expert systems generally fall into two categories: forward chaining and backward chaining. Mycin was a backward chaining system.

What’s the difference? You can think of each rule as an if statement. Just like the example, Mycin knew that “if the site is in the blood and it is gram negative and…. then….” A forward chaining expert system will try to match up rules until it finds the ones that match.

Of course, you can make some assumptions. So, in the sample, if a hypothetical forward-chaining Mycin asked if the site was the blood and the answer was no, then it was done with rule 52.

However, the real Mycin was backward chaining. It would assume something was true and then set out to prove or disprove it. As it receives more answers, it can see which hypothesis to prioritize and which to discard. As rules become more likely, one will eventually emerge.

If that’s not clear, you can try a college lecture on the topic from 2013, below.

Of course, in a real system, too, rules may trigger more rules. There were probably as many actual approaches as there were expert systems. Some, like Mycin, were written in LISP. Some in C. Many used Prolog, which has some features aimed at just the kind of things you need for an expert system.

What Happened?

Expert systems are actually very useful for a certain class of problems, and there are still examples of them hanging around (for example, Apache Drools). However, some problems that expert systems tried to solve — like speech recognition — were much better handled by neural networks.

Part of the supposed charm of expert systems is that — like all new technology — it was supposed to mature to the point where management could get rid of those annoying programmers. That really wasn’t the case. (It never is.) The programmers just get new titles as knowledge engineers.

Even NASA got in on the action. They produced CLIPS, allowing expert systems in C, which was available to the public and still is. If you want to try your hand, there is a good book out there.

Meanwhile, you can chat with Eliza if you don’t want to spend time chatting with her more modern cousins.

18 thoughts on “Expert Systems: The Dawn Of AI

  1. That doesn’t seem to be terribly different in concept from the current batch of LLMs, if much reduced and comparatively manual in the instruction design for the decision ladder.

    As with most things just add some abstraction layers and enough computational power to lever the world and it works as advertised!

  2. Was doing this ‘expert’ system stuff in the early 1990s using good ol’ Borland Turbo C on DOS. Mostly forward chaining. Production-line trouble shooting of hi-power modules. Less time and more accurate than the techs, plus a heck of a lot more safe, as it seperated the human from a module that had 480V/100A going through it.

    What I did, and what most others did with ‘expert’ systems, is not similar to LLC-based ‘AI’. It was deterministic and driven by well-defined mathematical models.

  3. Expert systems are deterministic, that’s why they are trusted.
    AI (neural networks in specific) is very useful when dealing with fuzzy, non linear problems but where you can get a lot of example/training data. LLMs are hopeless for the same problems.

    It is my pet peeve that “AI” is now synonymous with “LLMs”. And its an even more aggravating fact that the global economic bubble is built on the back of LLMs. Do people really not understand its a text prediction engine… Yes I too wish it were more, but its not

    1. Mine to … as the general public knows what AI is from all the movies they’ve seen over the years. LLMs are not that at all … But the perception of AI is driving this craze… It is scary to me seeing the ‘acceptance’.

      We played around with expert systems in the 90s too. Problem we had was keeping the data current. Not the focus, so it just fell into disuse. Easier to just take notes in a text file and refer back to them and add to them.

    1. Indeed – another for instance is the work carried out at the Departmentt of Machine Intelligence and Perception at Edinburgh; formed in 1963 by Donald Michie, who, like Turing worked at Bletchley Park during the war.

      That small unit became the Department of Artificial Intelligence in 1974, when I became aware of their work. I even wrote some code in POP-2, a LISP-like symbolic language written by Robin Popplestone and Rod Burstall.

      I can only imagine what those great people would have done with the sheer amount of compute power available to researchers today.
      Or was it the modesty of computing resources available at the time that was the mother of invention?

  4. Fun fact about Eliza — straight from Weizenbaum’s mouth (met him once, kind of crusty) — anyway, Eliza was basically built to demonstrate how gullible users were and how easy it was to make something “sound” rational.

    Kind of telling …

    Also, some of the more advanced expert systems weren’t completely deterministic — they relied on weightings applied to multi favor inputs (I built one myself that checked multiple probabilities).

    Soooo … in a way, LLMs are just expert systems that are designed to pick the next best token …

    I kind of miss the days of Marvin Minsky, Roger Schank and Rodney Brooks but they all talked quite a bit of toot themselves.

  5. An easy way to explain an expert system is to look at any troubleshooting flow chart. You know to ones with the diamonds asking yes or no questions. That is an expert system on paper. AI LLMs are a bit more generalized and work more with opinion based data and probability rather than yes no decision trees.

  6. I had a project around 1987/8 to build an expert system for troubleshooting a new installation of a complex hardwired Digital Signal Processor (DSP) for an airborne radar. That DSP had 36 circuit cards, and it was notoriously hard to easily isolate a failure to a card. We did have a lot of factory experience in troubleshooting these and a rough troubleshooting procedure to use as a starting point.

    I had an intern that knew a little bit of Borland Turbo Prolog and we built it in that. The initial phase 1 steps all involved replicating the written troubleshooting process steps. Those phase 1 steps would sometimes isolate the fault to a single PCB. If they didn’t, the steps switched to the brute force phase 2 fall back:
    – Swap out boards 1-9 with good spares – Did that fix the failure?
    – No. Swap boards 1-9 back and swap out 10-18 with good spares, and so on
    – Yes. Swap 5-9 back to original boards – Is the problem still fixed?
    – No. Swap original boards 5-9 back one at a time until you find the failed board.
    – Yes. Swap boards 1-4 one at a time until you find the failed board.
    You get the idea.

    The only real ‘expert system’ part of this was that the Turbo Prolog SW would retain the failed board each time that the troubleshooting happened and would suggest swapping out the most commonly failed boards first, in phase 1. I think we pre-filled those common failures with factory data. This approach was quite valid because different installations might have unique environmental conditions (such as cooling and power supplies) that would effect the failure rates for different installations.

  7. “Expert systems” have been around for a long time, especially in the application of automated trading in the the stock markets. It got so ubiquitous that even the signal path to the trade floor came into play, with the computers being moved physically as close as possible to the market; real estate close to the trading floor – or more specifically the computers used to record everything skyrocketed in value.

    Of course, these systems had their flaws, too, and were the cause of several market “anomalies”.

  8. Most mail programs include a simple rule based system to automatically run actions when mail arrives. This really is a (simple) expert system.

    If you create complex mail actions it can quickly get confusing. This is an example of why it is hard to build good expert systems.

  9. We are still pursuing Expert Systems, albeit in a graphical format, with VisiRule:
    https://www.visirule.co.uk

    Expert curated knowledge will produce the same results each time round – and hopefully, you have ensured that they are the correct/desired ones

    But gathering the expert knowledge and the logic needed to determine what disease or fault is most likely, can be a massive task. So LLMs can offer a handy short-cut to finding a likely solution which, once identified, can be ‘validated’ more easily using curated knowledge

    Combining the 2 ,aka NSAI, is becoming more popular

Leave a Reply to Steven NaslundCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.