Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 26

Batch: A1 Roll No.

: 1611015

Experiment / assignment / tutorial No. 5

Grade: AA / AB / BB / BC / CC / CD /DD

Signature of the Staff In-charge with date

Title:Implementation of Informed search algorithm( GBFS/A*)

______________________________________________________________________
Objective: Comparison and analysis of informed search algorithms

Expected Outcome of Experiment:

Course After successful completion of the course students should be able to


Outcome
Analyse and solve problems for goal based agent architecture (searching and
CO2
planning algorithms).
______________________________________________________________________
Books/ Journals/ Websites referred:
1. “Artificial Intelligence: a Modern Approach” by Russell and Norving, Pearson
education Publications
2. “Artificial Intelligence” By Rich and knight, Tata Mcgraw Hill Publications
3. http://people.cs.pitt.edu/~milos/courses/cs2710/lectures/Class4.pdf
4. http://cs.williams.edu/~andrea/cs108/Lectures/InfSearch/infSearch.html
5. http://www.cs.mcgill.ca/~dprecup/courses/AI/Lectures/ai-
lecture02.pdfhttp://homepage.cs.uiowa.edu/~hzhang/c145/notes/04a-search.pdf
6. http://wiki.answers.com/Q/Informed_search_techniques_and_uninformed_sea
rch_techniques
______________________________________________________________________
Pre Lab/ Prior Concepts: Problem solving, state-space trees, problem formulation,
goal based agent architecture
______________________________________________________________________
Historical Profile:
The AI researchers have come up many algorithms those operate on state space tree to
give the result. Goal based agent architectures solve problems through searching or
planning. Depending on availability of more information other than the problem
statement decides if the solution can be obtained with uninformed search or informed
search.
K. J. Somaiya College of Engineering, Mumbai-77

Its fact that not all search algorithms end up in giving the optimal solution. So, it states
the need to have a better and methodological approach which guarantees optimal
solution.
______________________________________________________________________
New Concepts to be learned: Heuristic, Informed search, greedy best first search, A*
search
______________________________________________________________________
Informed searching techniques

 Greedy best first search


 A*

Chosen Problem statement:

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

State-space tree :

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Solution with of GBFS/ A* on the state-space tree:

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Comparison of performance of Greedy and A* Algorithm:

Properties of A* algorithm:

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Post lab Objective questions


1. A heuristic is a way of trying
a. To discover something or an idea embedded in a program
b. To search and measure how far a node in a search tree seems to be from a
goal
c. To compare two nodes in a search tree to see if one is better than the other
d. Only (a) and (b)
e. Only (a), (b) and (c).
Answer:

2. A* algorithm is based on
a. Breadth-First-Search
b. Depth-First –Search
c. Best-First-Search
d. Hill climbing.
e. Bulkworld Problem.
Answer:

3. What is a heuristic function?


a. A function to solve mathematical problems
b. A function which takes parameters of type string and returns an integer
value
c. A function whose return type is nothing
d. A function which returns an object
e. A function that maps from problem state descriptions to measures of
desirability.
Answer:

Post Lab Subjective Questions:


1. How best-first-search algorithm supports heuristic evaluation function?
2. Find a good heuristic function for following
a. Monkey and Banana problem
b. Travelling Salesman problem
3. Define the heuristic search. Discuss benefits and short comings.

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Batch: Roll No.:

Experiment / assignment / tutorial No. 6

Grade: AA / AB / BB / BC / CC / CD /DD

Signature of the Staff In-charge with date

Title: Implementation of Min-Max algorithms

______________________________________________________________________
Objective: Implementation of Min-Max algorithm

Expected Outcome of Experiment:

Course After successful completion of the course students should be able to


Outcome
Analyse and solve problems for goal based agent architecture (searching and
CO2
planning algorithms).
______________________________________________________________________

Books/ Journals/ Websites referred:


1. “Artificial Intelligence: a Modern Approach” by Russel and Norving, Pearson
education Publications
2. “Artificial Intelligence” By Rich and knight, Tata Mcgraw Hill Publications
3. www.cs.sfu.ca/CourseCentral/310/oschulte/mychapter5.pdf
4. http://cs.lmu.edu/~ray/notes/asearch/
5. www.cs.cornell.edu/courses/cs4700/2011fa/.../06_adversarialsearch.pdf
______________________________________________________________________
Pre Lab/ Prior Concepts: Two/Multi playerGames and rules, state-space tree,
searching algorithms and their analysis properties
______________________________________________________________________
Historical Profile: - The game playing has been integral part of human life. The
multiplayer games are competitive environment in which everyone tries to gain more
points for himself and wishes the opponent to gain minimum.
The game can be represented in form of a state space tree and one can follow
the path from root to some goal node, for either of the player.
______________________________________________________________________
New Concepts to be learned: Adversarial search, minmax algorithm, minmax
pruning,
______________________________________________________________________

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Adversarial Search:-

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Min-Max algorithm:

Chosen Problem:

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Solution of chosen Problem:

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Post Lab objective Questions:

1. Which search is equal to minmax search but eliminates the branches that can’t
influence the final decision?
a. Breadth-first search
b. Depth first search
c. Alpha-beta pruning
d. None of the above
Answer:

2. Which values are independent in minmax search alogirthm?


a. Pruned leaves x and y
b. Every states are dependant
c. Root is independent
d. None of the above
Answer:

Post Lab Subjective Questions:

1. Explain the concept of adversarial search


2. Explain how alpha-beta pruning improves memory efficiency of algorithm
3. Explain how game of chess may benefit from min-max and alpha-beta pruning
algorithm.

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Batch: Roll No.:

Experiment / assignment / tutorial No. 7

Grade: AA / AB / BB / BC / CC / CD /DD

Signature of the Staff In-charge with date

Title: Implementation of Genetic algorithms

______________________________________________________________________
Objective: Implementation of Genetic Algorithm

Expected Outcome of Experiment:

Course After successful completion of the course students should be able to


Outcome
Analyse and solve problems for goal based agent architecture (searching and
CO2
planning algorithms).
______________________________________________________________________

Books/ Journals/ Websites referred:


1. “Artificial Intelligence: a Modern Approach” by Russel and Norving, Pearson
education Publications
2. “Artificial Intelligence” By Rich and knight, Tata Mcgraw Hill Publications
3. http://www.cs.cmu.edu/Groups/AI/html/faqs/ai/genetic/part2/faq-doc-2.html
4. http://www.doc.ic.ac.uk/~nd/surprise_96/journal/vol1/hmw/article1.html
5. https://www.youtube.com/watch?v=Y-XMh-iw07w
______________________________________________________________________
Pre Lab/ Prior Concepts: Informed, uninformed search,Local search
______________________________________________________________________
Historical Profile:
All the informed and uninformed search algorithm follow a kind of sequential search
in the state space from root to goal node. On the contrary, Genetic
Algorithm (GA), can join two separate/distant parts of answer and can obtain the best
solution in minimum steps. Just one has to choose those parts wisely by using fitness
function.
______________________________________________________________________

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

New Concepts to be learned: fitness function, evaluation function, cross-over,


population, mutation.
______________________________________________________________________

Definition:-In the field of artificial intelligence, a genetic algorithm (GA) is a search


heuristic that mimics the process of natural selection. This heuristic (also sometimes
called a metaheuristic) is routinely used to generate useful solutions to optimization and
search problems. Genetic algorithms belong to the larger class of evolutionary
algorithms (EA), which generate solutions to optimization problems using techniques
inspired by natural evolution, such as inheritance, mutation, selection, and crossover.

Genetic algorithm:-

function GENETIC-ALGORITHM(Population, Fitness-FN)returns an individual


inputs: population, a set of individuals
FITNESS-FN, a function that measures the fitness of an individual
repeat
new-population empty set
loop for i from 1 to Size(population)do
x <- Random-Selection(Population, Fitness-FN)
x <- Random-Selection(Population, Fitness-FN)
childREPRODUCE(x,y)
if (small random probability) then child  Mutate(child)
addchild to new-population
population new-population
until some individual is fit enough, or enough time has elapsed
return the best individual in population, according to FITNESS-FN

Problem chosen:

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Step by styep solution to the problem:

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Post Lab objective Questions:

1. How the new states are generated in genetic algorithm?


a. Composition
b. Mutation
c. Cross-over
d. Both b & c
Answer:

2. Evaluation function in genetic algorithm is called?


a. Heuristic Function
b. Fitness Function
c. Crossover Function
d. None of the above
Answer:

Post Lab Subjective Questions:

1. List applications of GA in various fields.


2. Explain your ideas about solving any one of the problems in Computer Science
and Engineering using GA.

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Batch: Roll No.:

Experiment / assignment / tutorial No. 9

Grade: AA / AB / BB / BC / CC / CD /DD

Signature of the Staff In-charge with date

Title: Solution of a logic based agent for Wumpus World

______________________________________________________________________
Objective:Solution of a logic based agent for an exploration problem

Expected Outcome of Experiment:

Course After successful completion of the course students should be able to


Outcome
Represent and formulate the knowledge to solve the problems using various
CO3
reasoning techniques
______________________________________________________________________
Books/ Journals/ Websites referred:
1. “Artificial Intelligence: a Modern Approach” by Russel and Norving, Pearson
education Publications
2. “Artificial Intelligence” By Rich and knight, Tata Mcgraw Hill Publications
3. http://www.kr.tuwien.ac.at/students/prak_wumpusjava/simulator/Rules.html
4. http://www.cis.temple.edu/~giorgio/cis587/readings/wumpus.shtml
5. www.cs.laurentian.ca/dgoforth/cosc4117/ppt/63wumpusFOL.ppt
6. http://www.cs.uku.fi/~mnykanen/TEK/teklectures6.pdf
______________________________________________________________________
Pre Lab/ Prior Concepts: Problem formulation, Basic Logic concepts (AND, OR etc.)
______________________________________________________________________
Historical Profile:
Sometimes the problem so unknown that the state space tree cannot be generated for
the same. Such problems interleave actions of search and execution and are called
Exploration Problems. Wumpus World is an example exploration problem.
The agent should be able to work also in the unknown environment. This program
gives an idea about how it should explore and memorize the unknown world.
______________________________________________________________________
New Concepts to be learned: Solving the problems partial knowledge of task
environment. Knowledge representation method.

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

______________________________________________________________________
ExampleWumpus World configuration:

PEAS:

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Properties of task environment:

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Base knowledge for the agent:

Knowledge Representation:(Both in Propositional and Predicate Logic)

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Solution for the problem world chosen:

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Team Members:
1.
2.

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Post Lab Objective Questions


1. Uncertainty arises in the wumpus world because the agent’s sensors give only
a. Full & Global information
b. Partial & Global Information
c. Partial & local Information
d. Full & local information
e. Global information only.
Answer:

2. A knowledge base contains:


a. rules, facts, and relationships.
b. only rules and relationships.
c. simulation of human thinking.
d. only facts.
Answer:

3. How do you represent “All dogs have tails”.


a. ۷x: dog(x)hastail(x)
b. ۷x: dog(x)hastail(y)
c. ۷x: dog(y)hastail(x)
d. ۷x: dog(x)hastail(x)
e. ۷x: dog(x)hastail(y)
Answer:

4. What are you predicating by the logic: ۷x: €y: loyalto(x, y).
a. Everyone is loyal to some one
b. Everyone is loyal to all
c. Everyone is not loyal to someone
d. Everyone is loyal
e. Everyone is not loyal.
Answer:

Post Lab Subjective Questions


1. Differentiate between Propositional Logic and First Order Logic.
2. What are the issues for knowledge representation?
3. What is inferential knowledge and procedural knowledge?
4. Translate these sentences into formulae in predicate logic
a. John likes all kinds of food
b. Apples are food
c. Chicken is food
d. Anything anyone eats and isn’t killed by its food
e. Bill eats peanuts and is still alive
f. Sue eats everything Bill eats

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Batch: Roll No.:

Experiment / assignment / tutorial No. 10

Grade: AA / AB / BB / BC / CC / CD /DD

Signature of the Staff In-charge with date

Title: Case Study: Expert System


______________________________________________________________________
Objective:To study and understand design and working of expert systems
______________________________________________________________________

Expected Outcome of Experiment:

Course After successful completion of the course students should be able to


Outcome
Understand the process involved in expert system and importance of learning
CO 4
for building expert systems
______________________________________________________________________
Books/ Journals/ Websites referred:
1. “Artificial Intelligence: A Modern Approach” by Russell and Norving,
Pearson Education Publications
2. “Artificial Intelligence” By Rich and Knight , Tata McGraw Hill Publications
3. George F Luger “Artificial Intelligence” Low Price Edition, Pearson
Education., Fifth edition
______________________________________________________________________
Pre Lab/ Prior Concepts:
Agent architectures, knowledge engineering, learning, planning
______________________________________________________________________
Historical Profile:
AI is the study of making computers the things , which at present, people are doing
better. The tasks done by human beings require different levels of intelligence
required. They typically involve perception, natural language understanding, common
sense reason, robot/organ control, playing games, solving mathematics, solving
engineering problems, scientific and financial analysis and medical diagnosis, etc. Out
The last few tasks require higher degree of intelligence and accuracy is highly desired.
These tasks are performed by expert systems; i.e. the intelligent programs which may
have large knowledgebase and can handle more amount of uncertainty and still give
best results. Some ES can even explain the reasoning behind reaching to a particular
conclusion.

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

_____________________________________________________________________

New Concepts to be learned: Expert Systems, components of


ES, Case-based ES, Rule-based ES
______________________________________________________________________

Expert systems (Definition)-In artificial intelligence, an expert system is a computer


system that emulates the decision-making ability of a human expert.Expert systems are
designed to solve complex problems by reasoning about knowledge, represented
primarily as if–then rules rather than through conventional procedural code.

Expert Systems Architecture Diagram:-

Chosen Case study (Title with reference):

Department of Computer Engineering (AI/Jan -May2019) Page


K. J. Somaiya College of Engineering, Mumbai-77

Components of ES from chosen CASE :

Findings/Analysis/Conclusion:-

Team members:
1.
2.

Department of Computer Engineering (AI/Jan -May2019) Page

You might also like