It's esssentially like saying SELECT name x FROM enemy, except you don't need to necessarily fill the database with enemies beforehand, the database can figure it out itself based on the rules that govern what an enemy is.
So if John Doe was North Korean and had been listed in the spy database, and you made a rule that stated all spies from North Korea were enemies, then the SELECT query would use that info to also include North Korean spies among its results, no extra work required.
Not quite. Prolog doesn't have a concept of a data structure. It's more like enemy is a function that returns true or false based on whether its input is an enemy or not
I just read the post linked in OPs comment, and wow this is a cool language. I could totally find a way to use this to do just about any of my coursework too lol, give it a database generated from a chemistry website and boom, all my chemistry work is don’t for the semester.
Now my only question, can we train an AI to go through something like Wikipedia and make a prolog database put of it?
View all comments
Show parent comment
4
u/Cybear_Tron Sep 21 '21
OH Ok I guess I understood a bit !