0% found this document useful (0 votes)
9 views8 pages

Ai Lab 12

Uploaded by

Nitya Kushwah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views8 pages

Ai Lab 12

Uploaded by

Nitya Kushwah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Experiment- 12

Aim: To study the available platforms for AI programming.


There are three types of platforms available for AI programming-
A. Python
B. Lisp
C. Prolog
C. Prolog:
 The problems that were faced by the traditional programming
languages that lead to the evolution of prolog.
Prolog (Programming in Logic) is a declarative programming language that was developed in the
1970s, and it evolved as a response to the limitations and challenges faced by traditional imperative
programming languages. Here are some of the problems with traditional programming languages that
led to the development and evolution of Prolog:

1. Lack of Declarative Semantics: Traditional programming languages, like C, Java, and Pascal,
are imperative and require programmers to specify how to achieve a particular task step by step.
This can make code hard to read, understand, and maintain. Prolog, on the other hand, o ffers a
declarative approach, where you specify what you want to achieve, and the system figures out how
to do it. This makes Prolog particularly well-suited for tasks involving complex logical
relationships.

2. Inefficiency in Symbolic Reasoning: Traditional languages are not well-suited for symbolic
reasoning and complex rule-based systems. They require extensive programming to handle symbolic
manipulation and rule-based inference. Prolog, with its built-in support for symbolic reasoning,
makes it easier to work with knowledge representation and rule-based systems.
3. Limited Pattern Matching: Pattern matching is a fundamental aspect of many applications, such as
text processing and artificial intelligence. Traditional languages often lack powerful built-in pattern
matching capabilities, making it harder to work with data matching specific patterns. Prolog excels at
pattern matching, making it an excellent choice for tasks like natural language processing and expert
systems.
4. Explicit Data Manipulation: Traditional languages require explicit data manipulation, which
can be tedious and error-prone. Prolog, on the other hand, uses unification and pattern matching to
handle data manipulation implicitly, simplifying the code and reducing the chance of errors.
5. Procedural Complexity: Traditional languages often lead to complex and lengthy code due to
their procedural nature. Prolog's declarative nature allows for more concise code, making it easier to
express complex relationships and logic in a compact manner.
6. Difficulties in Handling Uncertainty: Many real-world problems involve uncertainty and incomplete
information. Traditional languages struggle to handle these issues e ffectively. Prolog, with its ability to
represent and reason with uncertain information through probabilistic and fuzzy logic extensions, is
better equipped to address such problems.
• Evolution of Prolog:
The programming language, Prolog, was born of a project aimed not at producing a programm3ing
language but at processing natural languages; in this case, French. The project gave rise to a preliminary
version of Prolog at the end of 1971 and a more definitive version at the end of 1972.
Year Milestone

Birth of Prolog - Alain Colmerauer and Robert Kowalski laid the foundation for
1972 Prolog with the development of the first Prolog system at the University of Aix-
Marseille.

First Interpreter - The first Prolog interpreter was implemented, which marked the
1973 practical realization of Prolog as a programming language.

Edinburgh Prolog - David H. D. Warren developed the Warren Abstract Machine (WAM)
1980 and Edinburgh Prolog, making Prolog more efficient and widely adopted.

ISO Standardization - The first official Prolog standard, Edinburgh Prolog, was proposed
1981 as an international standard, but it wasn't accepted.

C-Prolog - Quintus Prolog, one of the first commercially available Prolog systems,
1982 was developed by SRI International.

ISO Prolog Standard - The International Organization for Standardization (ISO)


1987 released the official standard for Prolog, known as ISO Prolog.

Prolog Implementations - Several Prolog implementations, such as SWI-Prolog and


1990s SICStus Prolog, were developed, enhancing the language's capabilities and
performance.

Logic Programming in AI - Prolog gained popularity in the AI and expert systems


2000s community for its natural support of symbolic reasoning and knowledge
representation.

Integration with Other Languages - Prolog saw integration with other languages and
2010s tools, enabling hybrid systems and more extensive applications.

Active Development - Prolog continues to be actively developed, with ongoing


Present improvements in performance, libraries, and compatibility.

Expanding Use Cases - Prolog is being explored for new applications, including
Future natural language processing, data analysis, and rule-based systems.
The problem domain of AI lab and the library which will be used and their distribution.

The problem domain of an AI lab encompasses the study and development of artificial intelligence (AI) technologies
and applications. It involves creating algorithms, models, and systems that mimic human intelligence and
behavior, enabling computers to perform tasks that typically require human cognitive abilities. AI labs focus on
areas such as
 Face recognition
 Speech recognition
 Solving Complex Problems
 Training Future AI Experts
 Collaboration and Networking

 PROLOG IDE (Offline)


1. SWI-Prolog IDE: SWI-Prolog, one of the most widely used Prolog implementations, includes a built-in
development environment with an integrated editor, debugger, and other tools. It can be used o ffline on Windows,
macOS, and Linux.
2. GNU Prolog IDE: GNU Prolog provides a simple and efficient development environment that can be used
offline on various platforms, including Windows, macOS, and Linux.
3. Sicstus Prolog Development Environment: Sicstus Prolog, a commercial Prolog implementation, includes a
feature-rich development environment with a built-in editor, debugger, and other tools. It is available for o ffline use on
Windows, macOS, and Linux.
4. XSB Prolog IDE: XSB Prolog offers an integrated development environment that you can use o ffline. It is available
for Windows, macOS, and Linux.
5. ECLiPSe Prolog: ECLiPSe, a popular Prolog system, provides an offline development environment that
includes a code editor, debugger, and other development tools. It is available for Windows, macOS, and Linux.
 PROLOG IDE (Online) :-
1. SWI-Prolog Web IDE: SWI-Prolog offers an online development environment called SWISH (SWI-Prolog
for SHaring) that allows you to write and run Prolog code in your web browser. SWISH provides a web-based
code editor, a console for interacting with Prolog, and the ability to share your code with others. You can access it
at SWISH.

2. Repl.it: Repl.it is an online platform that supports various programming languages, including Prolog. It provides
an online code editor, compiler/interpreter, and collaborative coding features. You can write and run Prolog code in
your browser on Repl.it at Repl.it Prolog.

3. Ideone: Ideone is an online compiler and debugging tool that supports Prolog. You can write Prolog code in the
online editor and run it to see the output. It's available at Ideone Prolog.

4. OnlineGDB: OnlineGDB is an online IDE and debugger that supports Prolog. You can write, run, and
debug Prolog code within your web browser. It's accessible at OnlineGDB Prolog.

5. TutorialsPoint: TutorialsPoint offers an online Prolog compiler and editor that allows you to write and
execute Prolog code. You can access it at TutorialsPoint Prolog.

Online Prolog IDE-SWISH Web IDE


Fig 1.6 Online IDE for Prolog

 Installation of SWI Offline Prolog IDE

Step 1: Visit swi-prolog.org website using any web browser.

Step 2: Click on Download which is adjacent to Home, dropdown list will appear then click on SWI-Prolog.
Fig 1.7 SWI Download website

Step 3: New webpage will open, click on Stable release.

Step 4: After clicking on stable release new webpage will open which will contain stable versions of prolog for
different platforms. Click on the one as per your system configuration. Lets take the one for 64-bit operating system.

Step 5: After clicking on SWI-Prolog 8.4.0-1 for Microsoft Windows (64 bit), a new webpage will open, check
on I understand checkbox to make the download link active.

Step 6: Now check for the executable file in downloads in your system and run it.

Step 7: It will prompt confirmation to make changes to your system. Click on Yes.

Fig 1.8 User Account Control prompt

Step 8: Setup screen will appear, click on Next.

Step 9: The next screen will be of License Agreement, click on I Agree.

Step 10: After it there will be screen of installing options so check the box for Add swipl to the system path for all
users, and also check the box for create a desktop icon and then click on the Next button.
Fig 1.9 Installation formatting

Step 11:The last screen is of choosing components, all components are already marked so don’t change anything just
click on Install button.

Step 12: After this installation process will start and will hardly take a minute to complete the installation.

Step 13: Click on Finish after the installation process is complete.

Step 14: SWI Prolog is successfully installed on the system and an icon is created on the desktop.

Step 15: Run the software and see the interface.

Fig 2.0 SWI Offline Prolog IDE Interface

You might also like