Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AI and Deep Learning by (50.2k points)

I designed a rule-based engine in prolog that is basically a set of rules on how to beat real humans in a Card-game. Each time I find a weakness in my algorithm which leads one of my subjects to take advantage of and get an edge; I go in and fix the rules for the next release.

The same thing that I did in prolog in under 500 lines of code could've been done (not easily) in C++ or C# in about 10,000 lines including tons of nested if-else and fixing logical issues would be a nightmare.

A friend of mine told me that my Card game is not doing any AI because the same thing could be done in functional or object-oriented programming languages (of course with more effort). He said it was more like a Case-based Reasoning.

Is this true? Is prolog not an AI tool? I have seen examples of people writing NLP code in prolog.

What other tools are out there that are considered AI tools?

1 Answer

0 votes
by (107k points)

First of all, Prolog is a declarative programming language. This means that in prolog, you do not write out what the computer should do a line by line, as in procedural languages such as C and Java. The main idea behind declarative languages is that you describe a situation. Based on the code of the situation, the interpreter or compiler will tell you a solution. In prolog based code, it will tell you whether a prolog sentence is true or not and if it contains variables, what the values of the variables need to be.

It is considered to be an important tool for Artificial Intelligence applications and in the development of the customize knowledge-based, expert system, natural language interface, and smart information systems.  

The term "intelligence" has a very broad definition. Your program is able to solve a problem that is beating someone at a card game. Thus, it is a special-purpose artificial intelligence.

As for your question, whether Prolog is an AI tool. A tool for 'Q'  is some process that the tool applies so that it can make your 'Q' easier. While Prolog does not help so much writing neuronal networks, it makes it very easy to write rule-based decision engines (you said so yourself). So, it's at least a tool for that.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...