Sie sind auf Seite 1von 33

Solar System

1. INTRODUCTION
Artificial intelligence is the intelligence exhibited by machines or software. It is also
the name of the academic field of study which studies how to create computers and computer
software that are capable of intelligent behavior.AI, is the field that studies the synthesis and
analysis of computational agents that act intelligently. Major AI researchers and textbooks
define this field as "the study and design of intelligent agents", in which an intelligent agent
is a system that perceives its environment and takes actions that maximize its chances of
success.AI research is highly technical and specialized, and is deeply divided into subfields
that often fail to communicate with each other. Some of the division is due to social and
cultural factors; subfields have grown up around particular institutions and the work of
individual researchers. AI research is also divided by several technical issues. Some subfields
focus on the solution of specific problems. Others focus on one of several possible
approaches or on the use of a particular tool or towards the accomplishment of particular
applications.
Early AI researchers developed algorithms that imitated the step-by-step reasoning
that humans use when they solve puzzles or make logical deductions. By the late 1980s and
1990s, AI research had also developed highly successful methods for dealing with uncertain
or incomplete information, employing concepts from probability and economics.
For difficult problems, most of these algorithms can require enormous computational
resources most experience a "combinatorial explosion": the amount of memory or computer
time required becomes astronomical when the problem goes beyond a certain size. The search
for more efficient problem-solving algorithms is a high priority for AI research.
Human beings solve most of their problems using fast, intuitive judgments rather than
the conscious, step-by-step deduction that early AI research was able to model.AI has made
some progress at imitating this kind of "sub-symbolic" problem solving: embodied agent
approaches emphasize the importance of sensor motor skills to higher reasoning; neural net
research attempts to simulate the structures inside the brain that give rise to this skill;
statistical approaches to AI mimic the probabilistic nature of the human ability to guess.
Artificial Intelligence (A.I.) is the field of computer science focused on ensuring that
the dream of these scientists becomes a reality. A.I. systems are currently capable of

K L University

Department of Computer Science and Engineering

Solar System

understanding speech, playing chess and performing household tasks. A.I. is set to play an
important role in our lives. Researchers produce new products which duplicate intelligence,
understand speech, beat the opponent chess player, and acting in complex conditions. The
major problems of Artificial Intelligence include qualities such as knowledge, planning,
learning, reasoning, communication, perception and capability to move and control the
objects.
Let us examine each part of this definition. An agent is something that acts in an
environment - it does something. Agents include worms, dogs, thermostats, airplanes, robots,
humans, companies, and countries. We are interested in what an agent does; that is, how it
acts. We judge an agent by its actions. An agent acts intelligently when
what it does is appropriate for its circumstances and its goals,
it is flexible to changing environments and changing goals,
it learns from experience, and
it makes appropriate choices given its perceptual and computational limitations. An
agent typically cannot observe the state of the world directly; it has only a finite
memory and it does not have unlimited time to act.
A computational agent is an agent whose decisions about its actions can be explained
in terms of computation. That is, the decision can be broken down into primitive operation
that can be implemented in a physical device. This computation can take many forms. In
humans this computation is carried out in "wetware"; in computers it is carried out in
"hardware." Although there are some agents that are arguably not computational, such as the
wind and rain eroding a landscape, it is an open question whether all intelligent agents are
computational. The central scientific goal of AI is to understand the principles that make
intelligent behaviour possible in natural or artificial systems. This is done by
the analysis of natural and artificial agents;
formulating and testing hypotheses about what it takes to construct intelligent agents;
and
designing, building, and experimenting with computational systems that perform tasks
commonly viewed as requiring intelligence.

K L University

Department of Computer Science and Engineering

Solar System

As part of science, researchers build empirical systems to test hypotheses or to


explore the space of possibilities. These are quite distinct from applications that are built to
be useful for an application domain. Note that the definition is not for intelligent thought. We
are only interested in thinking intelligently insofar as it leads to better performance. The role
of thought is to affect action. The central engineering goal of AI is the design and synthesis of
useful, intelligent artefacts.
The aim of Artificial Intelligence is to develop the machines to perform the tasks in a
better way than the humans. Another aim of Artificial Intelligence is to understand the
actions whether it occurs in humans, machines or animals. As a result, Artificial Intelligence
is gaining Importance in science and engineering fields.

1.2 AI SPECIALIZATION
Artificial intelligence includes the following areas of specialization: games playing:
programming computers to play games against human opponents expert systems:
programming computers to make decisions in real-life situations natural language:
programming computers to understand natural human languages neural networks: Systems
that simulate intelligence by attempting to reproduce the types of physical connections that
occur in animal brain robotics: programming computers to see and hear and react to other
sensory stimuli. Artificial intelligence is a science and technology based on disciplines such
as Computer Science, Biology, Psychology, Linguistics, Mathematics, and Engineering. A
major thrust of AI is in the development of computer functions associated with human
intelligence, such as reasoning, learning, and problem solving.

1.3 APPLICATIONS OF AI
AI has been dominant in various fields such as:
1. Gaming: I plays crucial role in strategic games such as chess, poker, tic-tac-toe, etc.,
where machine can think of large number of possible positions based on heuristic
knowledge.

K L University

Department of Computer Science and Engineering

Solar System

2. Natural Language Processing: It is possible to interact with the computer that


understands natural language. Natural-language processing offers the greatest
potential rewards because it would allow people to interact with computers without
needing any specialized knowledge. You could simply walk up to a computer and talk
to it. Unfortunately, programming computers to understand natural languages has
proved to be more difficult than originally thought. Some rudimentary translation
systems that translate from one human language to another are in existence, but they
are not nearly as good as human translators. There are also voice recognition systems
that can convert spoken sounds into written words, but they do not understand what
they are writing; they simply take dictation. Even these systems are quite limited -you must speak slowly and distinctly.
3. Expert Systems: A ``knowledge engineer'' interviews experts in a certain domain and
tries to embody their knowledge in a computer program for carrying out some task.
How well this works depends on whether the intellectual mechanisms required for the
task are within the present state of AI. When this turned out not to be so, there were
many disappointing results. One of the first expert systems was MYCIN in 1974,
which diagnosed bacterial infections of the blood and suggested treatments. It did
better than medical students or practicing doctors, provided its limitations were
observed. Namely, its ontology included bacteria, symptoms, and treatments and did
not include patients, doctors, hospitals, death, recovery, and events occurring in time.
Its interactions depended on a single patient being considered. Since the experts
consulted by the knowledge engineers knew about patients, doctors, death, recovery,
etc., it is clear that the knowledge engineers forced what the experts told them into a
predetermined framework. In the present state of AI, this has to be true. The
usefulness of current expert systems depends on their users having common sense.
4. Vision Systems: These systems understand, interpret, and comprehend visual input
on the computer. For example,
A spying airplane takes photographs which are used to figure out spatial information
or map of the areas.
Doctors use clinical expert system to diagnose the patient.

K L University

Department of Computer Science and Engineering

Solar System

Police use computer software that can recognize the face of criminal with the stored
portrait made by forensic artist.
5. Speech Recognition: Some intelligent systems are capable of hearing and
comprehending the language in terms of sentences and their meanings while a human
talks to it. It can handle different accents, slang words, noise in the background,
changein humans noise due to cold, etc.
6. Handwriting Recognition: The handwriting recognition software reads the text
written on paper by a pen or on screen by a stylus. It can recognize the shapes of the
letters and convert it into editable text.
7. Intelligent Robots: Robots are able to perform the tasks given by a human. They
have sensors to detect physical data from the real world such as light, heat,
temperature, movement, sound, bump, and pressure. They have efficient processors,
multiple sensors and huge memory, to exhibit intelligence. In addition, they are
capable of learning from their mistakes and they can adapt to the new environment.
8. Heuristic classification: One of the most feasible kinds of expert system given the
present knowledge of AI is to put some information in one of a fixed set of categories
using several sources of information. An example is advising whether to accept a
proposed credit card purchase. Information is available about the owner of the credit
card, his record of payment and also about the item he is buying and about the
establishment from which he is buying

1.4 ADVANTAGES
1. With artificial intelligence, the chances of error are almost nil and greater precision and
accuracy is achieved.
2. Artificial intelligence finds applications in space exploration. Intelligent robots can be used
to explore space. They are machines and hence have the ability to endure the hostile
environment of the interplanetary space. They can be made to adapt in such a way that
planetary atmospheres do not affect their physical state and functioning.

K L University

Department of Computer Science and Engineering

Solar System

3. Intelligent robots can be programmed to reach the Earth's nadirs. They can be used to dig
for fuels. They can be used for mining purposes. The intelligence of machines can be
harnessed for exploring the depths of oceans. These machines can be of use in overcoming
the limitations that humans have.
4. Intelligent machines can replace human beings in many areas of work. Robots can
do certain laborious tasks. Painstaking activities, which have long been carried out by
humans can be taken over by the robots. Owing to the intelligence programmed in them, the
machines can shoulder greater responsibilities and can be programmed to manage
themselves.
5. Smart phones are a great example of the application of artificial intelligence. In
utilities like predicting what a user is going to type and correcting human errors in spelling,
machine intelligence is at work. Applications like Siri that act as personal assistants, GPS and
Maps applications that give users the best or the shortest routes to take as well as the traffic
and time estimates to reach there, use artificial intelligence. Applications on phones or
computers that predict user actions and also make recommendations that suit user choice, are
applications of AI. Thus, we see that artificial intelligence has made daily life a lot easier.

1.5 DISADVANATGES
1. One of the main disadvantages of artificial intelligence is the cost incurred in the
maintenance and repair. Programs need to be updated to suit the changing requirements, and
machines need to be made smarter. In case of a breakdown, the cost of repair may be very
high. Procedures to restore lost code or data may be time-consuming and costly.
2. An important concern regarding the application of artificial intelligence is about ethics and
moral values. Is it ethically correct to create replicas of human beings? Do our moral values
allow us to recreate intelligence? Intelligence is a gift of nature. It may not be right to install
it into a machine to make it work for our benefit.
3. Machines may be able to store enormous amounts of data, but the storage, access, and
retrieval is not as effective as in case of the human brain. They may be able to perform
repetitive tasks for long, but they do not get better with experience, like humans do. They are
not able to act any different from what they are programmed to do. Though this is mostly

K L University

Department of Computer Science and Engineering

Solar System

seen as an advantage, it may work the other way, when a situation demands one to act in way
different from the usual. Machines may not be as efficient as humans in altering their
responses depending on the changing situations.

1.6 INTRODUCTION TO PROLOG


PROLOG is a simple, yet powerful programming language, based on the principles of first
order predicate logic. Prolog means Programming Logic. Prolog is a declarative
programming language unlike most common programming languages .In a declarative
language the programmer specifies a goal to be achieved the Prolog system works out how to
achieve it relational databases owe something to Prologss.procedural programmer must
specify in detail how to solve a problem. In purely declarative languages, the programmer
only states what the problem is and leaves the rest to the language system

1.7 LOGIC PROGRAMMING


In more conventional, imperative languages such as C++, Java and Pascal, a program is a
specification of a sequence of instructions to be executed one after the other by a target
machine, to solve the problem concerned. The description of the problem is incorporated
implicitly in this specification, and usually it is not possible to clearly distinguish between the
description of the problem, and the method used for its solution. In logic programming, the
description of the problem and the method for solving it are explicitly separated from each
other. The splitting of an algorithm into a logic component and a control component has a
number of advantages:
The two components may be developed separately from each other. For example, when
describing the problem we do not have to be familiar with how the control component
operates on the resulting description; knowledge of the declarative reading of the problem
specification suffices.
A logic component may be developed using a method of stepwise refinement; we have only
to watch over the correctness of the specification.

K L University

Department of Computer Science and Engineering

Solar System

Changes to the control component affect (under certain conditions) only the efficiency of
the algorithm; they do not influence the solutions produced.
Clauses:
Any prolog program consists of only clauses be those rules or facts. All the clauses are
terminated by a full stop. Prolog program consists of only a sequence of clauses. The
knowledge is represented in the form of series of statements known as facts. And the rules
operate on these facts to derive the goal state or the answer to our queries. The facts are
enclosed in a specific class called predicate and they have arguments.
The rules will consist of variables which only should start with upper case characters. These
variables get substituted for the constants in the facts ok the knowledge when the rules get
executed. The execution make use of backtracking procedure for the process of their
execution.
1.7.1 PROGRAMMING IN PROLOG
Declare facts describing explicit relationships between objects and properties objects might
have implicit relationships between objects and/or rules defining implicit object properties
1.7.2 ADVANTAGES OF PROLOG

Logic based languages are able to represent the real world more accurately.

Prolog is able to derive new rules from the existing rules contained within the
knowledge base.

it has built-in list handling, very useful for representing sequences, trees, and so on.

1.7.3 DISADVANTAGES

It can be very difficult to design a database that accurately represents relationships.

Prolog is not best suited to solving complex arithmetical computations.

Prolog programs are not best suited to the current PC architecture (sequential
execution) and are best optimized on parallel architectures (fifth generation
computers).

K L University

Department of Computer Science and Engineering

Solar System

2. PROJECT DESCRIPTION
The Solar System is the gravitationally bound system comprising the Sun and the
objects that orbit it, either directly or indirectly. Of those objects that orbit the Sun directly,
the largest eight are the planets, with the remainder being significantly smaller objects, such
as dwarf planets and small Solar System bodies. Of the objects that orbit the Sun indirectly,
the moons, two are larger than the smallest planet, Mercury.
The Solar System formed 4.6 billion years ago from the gravitational collapse of a
giant interstellar molecular cloud. The vast majority of the system's mass is in the Sun, with
most of the remaining mass contained in Jupiter. The four smaller inner planets, Mercury,
Venus, Earth and Mars, are terrestrial planets, being primarily composed of rock and metal.
The four outer planets are giant planets, being substantially more massive than the
terrestrials. The two largest, Jupiter and Saturn are gas giants, being composed mainly of
hydrogen and helium; the two outermost planets, Uranus and Neptune, are ice giants, being
composed mostly of substances with relatively high melting points compared with hydrogen
and helium, called ices, such as water, ammonia and methane. All planets have almost
circular orbits that lie within a nearly flat disc called the ecliptic.
The Solar System also contains smaller objects. The asteroid belt, which lies between
the orbits of Mars and Jupiter, mostly contains objects composed, like the terrestrial planets,
of rock and metal. Beyond Neptune's orbit lie the Kuiper belt and scattered disc, which are
populations of trans-Neptunian objects composed mostly of ices and beyond them a newly
discovered population of sednoids. Within these populations are several dozen to possibly
tens of thousands of objects large enough that they have been rounded by their own gravity.
Such objects are categorized as dwarf planets. Identified dwarf planets include the asteroid
Ceres and the trans-Neptunian objects Pluto and Eris. In addition to these two regions,
various other small-body populations, including comets, centaurs and interplanetary dust,
freely travel between regions. Six of the planets, at least three of the dwarf planets, and many
of the smaller bodies are orbited by natural satellites, usually termed "moons" after the Moon.
Each of the outer planets is encircled by planetary rings of dust and other small objects.
The solar wind, a stream of charged particles flowing outwards from the Sun, creates
a bubble-like region in the interstellar medium known as the heliosphere. The heliopause is
the point at which pressure from the solar wind is equal to the opposing pressure of
interstellar wind; it extends out to the edge of the scattered disc. The Oort cloud, which is
thought to be the source for long-period comets, may also exist at a distance roughly a
K L University

Department of Computer Science and Engineering

Solar System

10

thousand times further than the heliosphere. The Solar System is located in the Orion Arm,
26,000 light-years from the centre of the Milky Way.

The Solar System is made up of all the planets that orbit our Sun. In addition to
planets, the Solar System also consists of moons, comets, asteroids, minor planets, and dust
and gas.
Everything in the Solar System orbits or revolves around the Sun. The Sun contains
around 98% of all the material in the Solar System. The larger an object is, the more gravity it
has. Because the Sun is so large, its powerful gravity attracts all the other objects in the Solar
System towards it. At the same time, these objects, which are moving very rapidly, try to fly
away from the Sun, outward into the emptiness of outer space. The result of the planets trying
to fly away, at the same time that the Sun is trying to pull them inward is that they become
trapped half-way in between. Balanced between flying towards the Sun, and escaping into
space, they spend eternity orbiting around their parent star.
2.1. Galaxy:
A galaxy is a gravitationally bound system of stars, stellar remnants, interstellar gas, dust,
and dark matter. The word galaxy is derived from the Greek galaxias, literally "milky", a
reference to the Milky Way. Galaxies range in size from dwarfs with just a few thousand
(103) stars to giants with one hundred trillion (1014) stars, each orbiting its galaxy's center of
mass.

Galaxies

are

categorized

according

to

their

visual

morphology

as elliptical, spiral and irregular. Many galaxies are thought to have black holes at their active
centers. The Milky Way's central black hole, known as Sagittarius A*, has a mass four
million times greater than the Sun. As of March 2016, GN-z11 is the oldest and most distant
observed galaxy with a commoving distance of 32 billion light-years from Earth, and
observed as it existed just 400 million years after the Big Bang. Previously, as of July
2015, EGSY8p7 was the most distant known galaxy, estimated to have a light travel distance
of 13.2 billion light-years away.
Approximately 170 billion (1.7 1011) to 200 billion (2.0 1011) galaxies exist in
the observable universe. Most of the galaxies are 1,000 to 100,000 parsecs in diameter and
usually separated by distances on the order of millions of parsecs (or mega parsecs).
The space between galaxies is filled with a tenuous gas having an average density of less than
one atom per cubic meter. The majority of galaxies are gravitationally organized into
K L University

Department of Computer Science and Engineering

Solar System

11

associations known as galaxy groups, clusters, and superclusters. At the largest scale, these
associations are generally arranged into sheets and filaments surrounded by immense voids.
2.2.Planet:
A planet is an astronomical object orbiting a star or stellar remnant that is massive enough to
be rounded by its own gravity, is not massive enough to cause thermonuclear fusion, and
has cleared its neighbor region of planetesimals.
The term planet is ancient, with ties to history, science, mythology, and religion. Several
planets in the Solar System can be seen with the naked eye. These were regarded by many
early cultures as divine, or as emissaries of deities. As scientific knowledge advanced, human
perception of the planets changed, incorporating a number of disparate objects. In 2006,
the International Astronomical Union (IAU) officially adopted a resolution defining
planets within the Solar System.
The planets were thought by Ptolemy to orbit Earth in deferent and epicycle motions.
Although the idea that the planets orbited the Sun had been suggested many times, it was not
until the 17th century that this view was supported by evidence from the
first telescopic astronomical observations, performed by Galileo Galilei. By careful analysis
of the observation data, Johannes Kepler found the planets' orbits were not circular
but elliptical. As observational tools improved, astronomers saw that, like Earth, the planets
rotated around tilted axes, and some shared such features asice caps and seasons. Since the
dawn of the Space Age, close observation by space probes has found that Earth and the other
planets share characteristics such as volcanism, hurricanes, tectonics, and even hydrology.
Planets are generally divided into two main types: large low-density giant planets, and
smaller rocky terrestrials.
2.3. Star:
A star is a luminous sphere of plasma held together by its own gravity. The nearest star
to Earth is the Sun. Other stars are visible to the naked eye from Earth during the night,
appearing as a multitude of fixed luminous points in the sky due to their immense distance
from

Earth.

Historically,

into constellations and asterisms,

K L University

the
and

most
the

prominent
brightest

stars

stars

gained

were
proper

grouped
names.

Department of Computer Science and Engineering

Solar System

12

Extensive catalogues of stars have been assembled by astronomers, which provide


standardized star designations.
Binary and multi-star systems consist of two or more stars that are gravitationally bound, and
generally move around each other in stable orbits. When two such stars have a relatively
close orbit, their gravitational interaction can have a significant impact on their
evolution. Stars can form part of a much larger gravitationally bound structure, such as a star
cluster or a galaxy.
2.4. Comets:
Comets are small Solar System bodies, typically only a few kilometres across,
composed largely of volatile ices. They have highly eccentric orbits, generally a perihelion
within the orbits of the inner planets and an aphelion far beyond Pluto. When a comet enters
the inner Solar System, its proximity to the Sun causes its icy surface to sublimate and ionise,
creating a coma: a long tail of gas and dust often visible to the naked eye.
Comets are distinguished from asteroids by the presence of an extended,
gravitationally unbound atmosphere surrounding their central nucleus. This atmosphere has
parts termed the coma (the central part immediately surrounding the nucleus) and the tail (a
typically linear section consisting of dust or gas blown out from the coma by the Sun's light
pressure or out streaming solar wind plasma). However, extinct comets that have passed close
to the Sun many times have lost nearly all of their volatile ices and dust and may come to
resemble small asteroids. Asteroids are thought to have a different origin from comets,
having formed inside the orbit of Jupiter rather than in the outer Solar System. The discovery
of main-belt comets and active centaurs has blurred the distinction between asteroids and
comets.
As of November 2014 there are 5,253 known comets, a number that is steadily
increasing.
2.5. Orbits:
Most comets travel in highly elliptical orbits around the Sun with orbital periods (time
between returns) ranging from just over three years to millions of years. Some comets, called
"periodic comets", return near the Sun every few years, and travel no further from the Sun

K L University

Department of Computer Science and Engineering

Solar System

13

than the orbit of Jupiter. Other comets have periods of several millions of years with orbits
that take them far beyond the orbit of Pluto.
Short-period comets have orbits lasting less than two hundred years. Long-period comets
have orbits lasting thousands of years. Short-period comets are thought to originate in the
Kuiper belt, whereas long-period comets, such as HaleBopp, are thought to originate in the
Oort cloud. Many comet groups, such as the Kreutzer Sun grazers, formed from the breakup
of a single parent. Some comets with hyperbolic orbits may originate outside the Solar
System, but determining their precise orbits is difficult. Old comets that have had most of
their volatiles driven out by solar warming are often categorised as asteroids.
Comets travel in regular orbits, their motions dominated by the gravity of the sun and the
major planets, but other forces can come into play. Solar radiation causes ice to evaporate on
the sunward side of the nucleus. Molecules released by the evaporation stream away from the
comet and generate a jet-type reaction that pushes the comet away from the Sun and slows it
down. If the nucleus is rotating, the force may be in another direction and cause it to speed
up.

K L University

Department of Computer Science and Engineering

Solar System

14

3. MODULE CONTENT AND GOALS


This project is a database of our solar system, along with a few stars outside our solar
system. It includes details such as the object classification (star/planet/moon), as well as some
attributes of the objects (what it orbits/density/diameter).

3.1. Module 1:
This module includes Galaxy, Planet and Diameter of the Solar System.
1. Galaxy
2. Planet
3. Diameter
4. Prepare goal for name of the galaxy
5. Prepare goal for names of the planets
6. Prepare goal for density of the given term

In this module we are giving the names of the planets in the facts and the diameter in
between the planets from the Knowledge base. With that information we are going to display
names of the planets according to the given goals.

3.2.Module 2:
This module includes Star, moon and Density of the Solar System.
1. Star
1. Moon
2. Density
3. Prepare goal for names of the stars
4. Prepare goal for names of the moons

In this module we are giving the names of the stars, moons and the density in between
them. We are preparing the goals with refer to the goals given.

K L University

Department of Computer Science and Engineering

Solar System

15

3.3.Module 3:
This module includes Comet, Orbit of the Solar System.
1. Comet
2. Orbits
3. Prepare goal for names of the comets
4. Prepare goal for names of the orbits
5. Prepare goal for diameter of the given term
In this module we are giving the facts related to the comet and the orbits. According
to the given goals we are displaying the names of those comets and orbits.

K L University

Department of Computer Science and Engineering

Solar System

16

4. SOURCE CODE

FACTS:
galaxy(milkyway).

planet(mercury).
planet(venus).
planet(earth).
planet(mars).
planet(saturn).
planet(jupiter).
planet(uranus).
planet(neptune).
planet(pluto).

star(sun).
star(proximacentauri).
star(rigilkentaurus).
star(barnardsstar).
star(wolf359).
star(lalande21185).
star(siriusa).
star(siriusb).

K L University

Department of Computer Science and Engineering

Solar System

17

star(procyona).
star(procyonb).

moon(themoon).
moon(phobos).
moon(deimos).
moon(europa).
moon(io).
moon(callisto).
moon(ganymede).
moon(janus).
moon(mimas).
moon(enceladus).
moon(tethys).
moon(dione).
moon(titan).
moon(miranda).
moon(ariel).
moon(umbriel).
moon(oberon).
moon(titania).
moon(nereid).
moon(triton).
K L University

Department of Computer Science and Engineering

Solar System

18

moon(charon).
moon(hydra).
moon(nix).

comet(halley).
comet(borrely).
comet(tempel).
comet(wild).
comet(skiff).
comet(loneos).
comet(soho).
comet(linear).
comet(lagerkvist).
comet(hale_bopp).
comet(hyakutake).

orbits(lagerkvist,periodic).
orbits(linear,periodic).
orbits(soho,periodic).
orbits(loneos,periodic).
orbits(skiff,periodic).
orbits(hale_bopp,long).
orbits(hyakutake,long).
K L University

Department of Computer Science and Engineering

Solar System

19

orbits(halley,periodic).
orbits(borrely,long).
orbits(tempel,long).
orbits(wild,long).

orbits(proximacentauri,milkyway).
orbits(rigilkentaurus,milkyway).
orbits(barnards,milkyway).
orbits(wolf359,milkyway).
orbits(lalande21185,milkyway).
orbits(siriusa,milkyway).
orbits(siriusb,milkyway).
orbits(procyona,milkyway).
orbits(procyonb,milkyway).
orbits(sun,milkyway).
orbits(mercury,sun).
orbits(venus,sun).
orbits(earth,sun).
orbits(mars,sun).
orbits(saturn,sun).
orbits(jupiter,sun).
orbits(uranus,sun).
orbits(neptune,sun).
K L University

Department of Computer Science and Engineering

Solar System

20

orbits(pluto,sun).
orbits(halley,sun).
orbits(halebopp,sun).
orbits(hyakutake,sun).
orbits(themoon,earth).
orbits(phobos,mars).
orbits(deimos,mars).
orbits(europa,jupiter).
orbits(io,jupiter).
orbits(callisto,jupiter).
orbits(ganymede,jupiter).
orbits(janus,saturn).
orbits(mimas,saturn).
orbits(enceladus,saturn).
orbits(tethys,saturn).
orbits(dione,saturn).
orbits(titan,saturn).
orbits(miranda,uranus).
orbits(ariel,uranus).
orbits(umbriel,uranus).
orbits(oberon,uranus).
orbits(titania,uranus).
orbits(nereid,neptune).
K L University

Department of Computer Science and Engineering

Solar System

21

orbits(triton,neptune).
orbits(charon,pluto).
orbits(hydra,pluto).
orbits(nix,pluto).

diameter(milkyway,9e17).
diameter(sun,1392000).
diameter(proximacentauri,201695).
diameter(rigilkentaurus,1708000).
diameter(barnards,208650).
diameter(wolf359,222560).
diameter(lalande21185,639860).
diameter(siriusa,2380000).
diameter(siriusb,11684).
diameter(procyona,2851000).
diameter(procyonb,17200).
diameter(mercury,4880).
diameter(venus,12104).
diameter(earth,12756).
diameter(mars,6795).
diameter(saturn,120537).
diameter(jupiter,142984).
diameter(uranus,51119).
K L University

Department of Computer Science and Engineering

Solar System

22

diameter(neptune,49529).
diameter(pluto,2300).
diameter(halley,11).
diameter(halebopp,60).
diameter(hyakutake,4.2).
diameter(themoon,3462).
diameter(phobos,22.2).
diameter(deimos,12.4).
diameter(europa,3138).
diameter(io,3642).
diameter(callisto,4820).
diameter(ganymede,5268).
diameter(janus,178.8).
diameter(mimas,396).
diameter(enceladus,504).
diameter(tethys,1066).
diameter(dione,1122).
diameter(titan,5152).
diameter(miranda,470).
diameter(ariel,1156).
diameter(umbriel,1168).
diameter(oberon,1522).
diameter(titania,1576).
K L University

Department of Computer Science and Engineering

Solar System

23

diameter(nereid,340).
diameter(triton,2706).
diameter(charon,1206).
diameter(hydra,90).
diameter(nix,70).

density(milkyway,8.86e-20).
density(sun,1408).
density(proximacentauri,56825.3).
density(rigilkentaurus,838.7).
density(barnards,42048).
density(wolf359,30947).
density(lalande21185,6656).
density(siriusa,567.99).
density(siriusb,2.32e9).
density(procyona,232.15).
density(procyonb,4.51e8).
density(mercury,5427).
density(venus,5204).
density(earth,5515).
density(mars,6795).
density(saturn,687).
density(jupiter,1326).
K L University

Department of Computer Science and Engineering

Solar System

24

density(uranus,1270).
density(neptune,1638).
density(pluto,2030).
density(halley,800).
density(themoon,3346).
density(phobos,1876).
density(deimos,1471).
density(europa,3010).
density(io,3528).
density(callisto,1834).
density(ganymede,1936).
density(janus,640).
density(mimas,1147).
density(enceladus,1609).
density(tethys,973).
density(dione,1476).
density(titan,1880).
density(miranda,1200).
density(ariel,1660).
density(umbriel,1390).
density(oberon,1630).
density(titania,1711).
density(nereid,1500).
K L University

Department of Computer Science and Engineering

Solar System

25

density(triton,2061).
density(charon,1650).

GOALS:
%%MODULE 1:
goal13:-write('Enter the object name of the object whose density is be found or Enter all for
the list of densities of all the planets... :'),read(X),go13(X).
go13(X):- X==all,write('All densities are in the order of
kg/m^3'),nl,planet(X1),density(X1,Y),write(X1),write('=='),write(Y),nl.
go13(X):-X\=all,density(X,Y),write(Y),write('kg/m^3').
goal11:-write('The name of the GALAXY is...'),nl,galaxy(X),write(X).
goal12:-write('The names of the planets are...:'),nl,planet(X),write(X),nl.

%%MODULE 2:
goal21:-write('The names of the Stars are...:'),nl,star(X),write(X),nl.
goal22:-write('The names of the Moons are...:'),nl,moon(X),write(X),nl.
goal23:-write('Enter the object name of the object whose density is be found or Enter all for
the list of densities of all the stars... :'),read(X),go23(X).
go23(X):- X==all,write('All densities are in the order of
kg/m^3'),nl,star(X1),density(X1,Y),write(X1),write('=='),write(Y),nl.
go23(X):-X\=all,density(X,Y),write(Y),write('kg/m^3').
goal24:-write('Enter the object name of the object whose density is be found or Enter all for
the list of densities of all the moons.. :'),read(X),go24(X).
go24(X):- X==all,write('All densities are in the order of
kg/m^3'),nl,moon(X1),density(X1,Y),write(X1),write('=='),write(Y),nl.
K L University

Department of Computer Science and Engineering

Solar System

26

go24(X):-X\=all,density(X,Y),write(Y),write('kg/m^3').

%%MODULE 3:
goal31:-write('The List of Comets are...:'),nl,comet(X),write(X),nl.
goal32:-write('The Orbits of Comets based on their
durations...:'),nl,comet(X),orbits(X,Y),write(X),write('=='),write(Y),nl.
goal33:-write('The Orbits of the Planets
are...:'),nl,planet(X),orbits(X,Y),write(X),write('=='),write(Y),nl.
goal34:-write('The Orbits of the Moons
are...:'),nl,moon(X),orbits(X,Y),write(X),write('=='),write(Y),nl.
goal35:-write('The Orbits of the Stars
are...:'),nl,star(X),orbits(X,Y),write(X),write('=='),write(Y),nl.
goal36:-write('Enter the Object whose diameter is to be
found...:'),read(X),diameter(X,Y),write('The diameter for '),write(X),write(' is
'),write(Y),write('mi').

%%COMMON GOALS :
goal1:-write('Relations
are...:'),nl,planet(A),planet(B),density(A,X),density(B,Y),X>Y,write(A),write(' is
'),write('Denser than '),write(B),nl.
goal1(A,B):-density(A,X),density(B,Y),X>Y,write(A),write(' is '),write('denser than
'),write(B),!.
goal1(A,B):-density(A,X),density(B,Y),X<Y,write(B),write(' is '),write('denser than
'),write(A),!.

K L University

Department of Computer Science and Engineering

Solar System

27

goal1(X,Y):-write('Information not available with the database...').

goal2:-write('Relations
are....:'),nl,planet(A),planet(B),diameter(A,X),diameter(B,Y),X>Y,write(A),write(' is
'),write('larger than '),write(B),nl.
goal2(A,B):-diameter(A,X),diameter(B,Y),X>Y,write(A),write(' is '),write('larger than
'),write(B),!.
goal2(A,B):-diameter(A,X),diameter(B,Y),X<Y,write(B),write(' is '),write('larger than
'),write(A),!.
goal2(X,Y):-write('Information not available with the database...').

goal3:-write('Moons are the natural satellites of the


planets...:'),nl,orbits(X,Y),planet(Y),write(X),write(' is the satellite of '),write(Y),nl.
goal3(A,B):-planet(B),orbits(A,B),write('Yes '),write(A),write(' is a satellite of '),write(B),!.
goal3(A,B):-planet(A),orbits(B,A),write('Yes '),write(B),write(' is a satellite of '),write(A),!.
goal3(X,Y):-write('Information not available with the database...').

K L University

Department of Computer Science and Engineering

Solar System

28

5. SCREEN SHOTS

Output for the goal of density of the given term

Output for the goal of finding the galaxy

Output for the goal of listing the names of planets

K L University

Department of Computer Science and Engineering

Solar System

29

Output for the goal of listing the names of the stars

Output for the goal of listing the names of the moons

K L University

Department of Computer Science and Engineering

Solar System

30

Output for the goal of listing the names of the comets

Output for the goal of orbits

Output for the goal of finding the diameter of the given object

K L University

Department of Computer Science and Engineering

Solar System

31

Output for the relation of denser than

Output for the relation of larger than

Output for the query of is a satellite of given planet

K L University

Department of Computer Science and Engineering

Solar System

32

6. CONCLUSION
Through this mini project we have developed a prolog program which gives a basic
information about our solar system. This would be able to answer the questions about the
stars, planets, comets and natural satellites of our solar system. This also contains some of
the information about the other stars present in our galaxy other than the sun. It comes
with the values of the densities and diameter of the stars, planets and comets. Outputs the
relation between two planets or stars basing on their relation in the parameter of diameter
or density.

K L University

Department of Computer Science and Engineering

Solar System

33

7. REFERENCES
[1] Patrick henry Winston, Artificial Intelligence, Pearson education, 2003
[2] Russel and norwig, Artificial Intelligence, Pearson education, 2003
[3] Elaine rich, Kevin knight and shivashankar nair, Artificial Intelligence, 3rd
edition, TMH, reprint, 2008
[4] Carl townsend, introduction to TURBO PROLOG , BPB Publications, 2011

[5] Max Bramer-Logic Programming with Prolog-Springer (2005)

[6] William F. Clocksin, Christopher S. Mellish-Programming in Prolog-Springer


(2003)

[7] http://www.learnprolognow.org/

[8] www.swi-prolog.org

K L University

Department of Computer Science and Engineering

Das könnte Ihnen auch gefallen