It’s the Language of AI – So Why Doesn’t AI Use Prolog?

preview_player
Показать описание
#prolog #ai #swi-prolog
Artificial Intelligence is all over the place these days. Prolog was supposed to be the language that would be used to create all kinds of super-intelligent “5th Generation” programs. Back in the 1980s, it really seemed as though Prolog would be the natural language of AI.

In this video, I look back at the promise of Prolog and try to work out why that promise has not been fulfilled.

If you want to try Prolog for yourself, I recommend the free SWI-Prolog:

Also, Visual Prolog:



MORE LESSONS
=============
I have hundreds of videos and even complete programming courses on my YouTube channel. They cover everything from low-level programming in C to coding an adventure game in C# or Java. I cover languages as varied as Ruby, Object Pascal and Smalltalk. No matter what your programming level or area of expertise, I’m sure you’ll find something to interest you. Go to my Playlists page and browse around:

Be sure to subscribe to the Code With Huw channel so that you get a notification when I upload more lessons in this series.

PROGRAMMING BOOKS
====================
If you want to learn programming in more depth (and also support this channel!) you might think of buying one of my books. I have written books on C programming, Using Pointers in C, Delphi, Ruby, Recursion and other programming topics. You can buy my books (paperback or Kindle) on Amazon.

*** The Little Book Of Pointers ***

*** The Little Book Of C Programming ***

“CODE WITH HUW” ON TWITTER:
=================================

“CODE WITH HUW” ON FACEBOOK:
=================================

Good luck! And good programming!
Рекомендации по теме
Комментарии
Автор

There are similarities between prolog and dependent strictly typed languages used in mathematical theorem proving. They do a form of pattern matching and can then give proofs of their solution-output. What is missing from LLM today is the ability to reason and prolog has this to an extent.

oldtom
Автор

Prolog needs to be programmed in 'crisp logic' by a human, whereas modern AI uses 'fuzzy statements' derived from statistical scores. An AI using Prolog (as a user, rather than being prolog based itself) might be interesting. (adding reasoning skills)

d.j.wiendels
Автор

Prolog with it rule and predicate clauses might be suitable for applications on the planet of Vulcan, but here on earth logic tends to be a bit more chaotic.

berglandvideo
Автор

For certain things prolog is still just so good though. I'm working on a type inference system and the easiest way to solve it was to write it in prolog and embed it in the compiler.

Biriadan
Автор

I've always found SQL does prolog like things more flexibly, such as Cartesian joins. SQL remains very widely used today, including with AI systems like retrieval augmented generation large language models. I think I've seen in the news recently that datalog is used by some AI firms.

AbAb-thqe
Автор

I was thinking about philosophy, found out that Polish philosophy is tied with mathematical logic and ended up looking into prolog. I just wrote my first program and was amazed by it.

wawelkrol
Автор

I remember when it was talked about. I wondered what it might actually be used for, but just now with your description of it I thought of a very suitable use case in one of the industries where I worked. Thxs for the interesting info.

disqusrubbish
Автор

Prolog has found a niche with logic constraint programming.

Grahamplaysgo
Автор

i remember prolog kind of famously solved the tower of hanoi in some ungodly few lines of code (i think 7). i used it for rules dev in targeting bad guys, and it was really nice to just define the world and then just ask the system to find solutions. IMHO far superior than procedural, and system requirements can literally be written as english sentences that prolog can literally use as facts; i've done this. But does this suddenly allow you to create Back Prop networks needed for ML in prolog? unfortunately not. Just like was needed for Python, the libs would have to be developed for it. I'd love to see that though, because a) compiled binaries are way faster than interpreted, and b) the rules would be more natural to write so the code would likely be more maintainable

dwyerwk
Автор

whatever it is, I just love, doing with Prolog and maintaining knowledge banks for such logic analysis problems !

sandeepnag
Автор

Estoy en estudiando ingenieria informatica y en la universidad edtoy cursando Algoritmos 2, estamos estudiando Prolog y Haskell

juanpizzo
Автор

Oh my! This "backtrack" memories of late 80s when I had a lot of fun with TurboProlog. For someone looking for something different, this was food for thought.

Bob-
Автор

I am using Winprolog and VIsual Prolog. My preferred Prolog books are Prolog Programming for Artificial Intelligence by Ivan Bratko and Advanced Programming in Turbo Prolog by Herbert Schildt.

VictorHugoAngel
Автор

I bought a copy of Clocksin & Mellish in the late 1980s, or early 1990s, and it’s languished on my shelf ever since. I now feel the urge to pick it up and dive in. Thank you Huw!

simonknights
Автор

Thank you; very interesting!
I have blind-spots for lesser-known languages like this.

Ben-M
Автор

Huw, I’m new to programming. What language should I learn ?

za
Автор

Interesting history about many of the false starts in AI (which Prolog was part of). I wonder if we are still at that point today as I was I went conference where a company was pitching their LLMs to parse financial documents to get key stats out of them. One of the audience members said they tested it and found that if the LLM did not know the answer it was generating random numbers to fill in the gaps which is worse. She said if she was not an analyst that knew her data well, it would have been difficult to see that is was generating random BS. To which the presenter mentioned "the art of prompting" . Makes one wonder if what is been done is to automate BS generators.

Anyway over 30+ years I have seen many languages come up that seem to solve one problem really well (like C++ generators from UML), but don't generalize well or handle edge cases well so people fall back to tried and true procedural style paradigms. Easier to support and debug. etc. I wonder if prolog is one of those.

I appreciate the history lessons so one understands how we got to where we are at today.

johnkuehler
Автор

We are already having issue convincing ai human readable period lol . Its not just prolog .

Karol-gd
Автор

long term ? Evrn binary code might not make the cut . We ll know in 10 years

Karol-gd
Автор

Binary code handle all that so useless for ai .

Karol-gd
visit shbcf.ru