Some problems Cse-402 K3r20,k3r23.

Slides:



Advertisements
Similar presentations
Uninformed Search CS 63 Chapter 3
Advertisements

Uninformed Search.
Algorithmic Problem Solving Lecture 3 River Crossing Problems.
Min terms and logic expression
Problem Solving Well-formed predicate calculus expressions provide a means of describing objects and relations in a problem domain and inference rule.
1 SE-561 Formal Methods in Software Petri Nets - I.
Prolog Search. Implementing Search in Prolog How to represent the problem Uninformed Search –depth first –breadth first –iterative deepening search Informed.
Formal Description of a Problem
CSC 423 ARTIFICIAL INTELLIGENCE
Feng Zhiyong Tianjin University Fall  datatype PROBLEM ◦ components: INITIAL-STATE, OPERATORS, GOAL- TEST, PATH-COST-FUNCTION  Measuring problem-solving.
SEARCH ALGORITHMS David Kauchak CS30 – Spring 2015.
SEARCH APPLICATIONS David Kauchak CS30 – Spring 2015.
W w w. P u z z l e B a s e d L e a r n i n g. e d u. a u Copyright © 2008 Hybrid Publishers 1 Puzzle Power: Problem-Solving Made AWESOME! Adapted from.
Building Control Algorithms For State Space Search
State Spaces Introduction to Artificial Intelligence Dr. Robin Burke.
Boolean Algebra Lecture 7: Supporting Material Dr Kathryn Merrick Tuesday 24 th March, 2009.
Listening: Riddle Goal, Wolf & Cabbage. Riddle – River Crossing GOAT, WOLF & CABBAGE A farmer is going home from the market. He bought a goat, a cabbage.
CSC-470: ARTIFICIAL INTELLIGENCE
State-Space Searches. State spaces A state space consists of –A (possibly infinite) set of states The start state represents the initial problem Each.
Toy Problem: Missionaries and Cannibals
Problem solving by Searching Problem Formulation.
Intelligent agents Intelligent agents are supposed to act in such a way that the environment goes through a sequence of states that maximizes the performance.
Introduction to Artificial Intelligence Problem Solving Ruth Bergman Fall 2002.
Intelligent agents Intelligent agents are supposed to act in such a way that the environment goes through a sequence of states that maximizes the performance.
Dr Eleni Mangina – COURSE: LOGIC PROGRAMMING (during a joint degree with Fudan University in Software Engineering) DEPT. OF COMPUTER SCIENCE UCD Problem.
1 Pertemuan 1 WHAT IS ARTIFICIAL INTELLIGENCE ? Matakuliah: T0264/Inteligensia Semu Tahun: 2005 Versi: 1/0.
1 Chapter 3 Knowledge Representation. 2 Chapter 3 Contents l The need for a good representation l Semantic nets l Inheritance l Frames l Object oriented.
Artificial Intelligence Problem solving by searching CSC 361 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi.
State-Space Searches. 2 State spaces A state space consists of –A (possibly infinite) set of states The start state represents the initial problem Each.
1 Problem Solving We view many situations in life as problems we need to solve Also, much of human behavior can be considered problem solving, even if.
State-Space Searches.
Class #3/4 – Thursday, September 8 / Tuesday, September 13

Formal Description of a Problem In AI, we will formally define a problem as –a space of all possible configurations where each configuration is called.
CMSC 471 Spring 2014 Class #3 Tue 2/4/14 Problem Solving as Search Professor Marie desJardins,
Problem solving.
Uninformed Search Chapter 3. Building Goal-Based Agents We have a goal to reach –Driving from point A to point B –Put 8 queens on a chess board such that.
Module 1- Getting Started Tell me what to do Using sets of instructions…
CSC 463.
Uninformed Search Chapter 3 Some material adopted from notes by Charles R. Dyer, University of Wisconsin-Madison.
Knowledge and search, page 1 CSI 4106, Winter 2005 Knowledge and search Points Properties of knowledge  Completeness  Objectivity  Certainty  Formalizability.
CMSC 671 Fall 2001 Class #3/4 – Monday, September 9 / Wednesday, September 11.
Code Design Using Functions CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Sight Words.
High Frequency Words.
Uninformed Search.
1/16 Problem solving by Searching Problem Formulation.
Uninformed Search Chapter 3 Some material adopted from notes by Tom Finin of CSEE, UMBC, and by Charles R. Dyer, University of Wisconsin-Madison.
CMSC 671 Fall 2003 Class #3/4 – Monday, September 8 / Wednesday, September 10.
How do you define AI? You were supposed to write a paper for today?
Class #3/4 – Thursday, September 9 / Tuesday, September 15
The Decision-making Process
Problem solving by Searching
Uninformed Search Chapter 3.
David Kauchak CS30 – Spring 2016
Some problems Cse-402 K3r20,k3r23.
High Frequency Words. High Frequency Words a about.
Uninformed Search Chapter 3
CMSC 471 Fall 2011 Class #3 Thu 9/8/11 Problem Solving as Search
The Wolf, the Goat, and the Cabbage
4. Computational Problem Solving
Artificial Intelligence
State-Space Searches.
State-Space Searches.
Uninformed Search Chapter 3.
David Kauchak CS51A – Spring 2019
State-Space Searches.
Problem Solving by Searching Search Methods :
missionaries-and-cannibals problem
Presentation transcript:

Some problems Cse-402 K3r20,k3r23

Tic Tac Toe 1 Board Move table  A vector of 19,683 elements

Tic Tac Toe 2 Board turn

Question Answering Example Mary went shopping for a new coat. She found a red one she really liked. When she got it home, she discovered that it went perfectly with her favorite dress.  Q1 : What did Mary go shopping for?  Q1 : What did Mary find that she liked?  Q1 : Did Mary buy anything?

A Structure Representation of a Sentence

A Shopping Script

Missionaries and Cannibals There are 3 missionaries, 3 cannibals, and 1 boat that can carry up to two people on one side of a river. Goal: Move all the missionaries and cannibals across the river. Constraint: Missionaries can never be outnumbered by cannibals on either side of river, or else the missionaries are killed. State: configuration of missionaries and cannibals and boat on each side of river. Operators: Move boat containing some set of occupants across the river (in either direction) to the other side.

Missionaries and Cannibals Solution Near side Far side 0 I nitial setup: MMMCCC B - 1 Two cannibals cross over: MMMC B CC 2 One comes back: MMMCC B C 3 Two cannibals go over again: MMM B CCC 4 One comes back: MMMC B CC 5 Two missionaries cross: MC B MMCC 6 A missionary & cannibal return: MMCC B MC 7 Two missionaries cross again: CC B MMMC 8 A cannibal returns: CCC B MMM 9 Two cannibals cross: C B MMMCC 10 One returns: CC B MMMC 11 And brings over the third: - B MMMCCC

State space Representation of Farmer, wolf, goat and cabbage problem: A farmer with wolf, goat & cabbage come to the edge of river. They want to cross the river. There is a boat at river edge but only the farmer can row, the boat can carry two things at a time. If the wolf is ever left alone with the goat, the wolf will eat the goat, similarly if the goat is left alone with cabbage, the goat will eat cabbage. Schedule the things so that all four characters arrive safely on the other side of the river. Man →M Wolf →W Goat →G Cabbage →C Seq. of crossing the river so that all four character arrive safely is First Man cross the river with goat. Man come back. Man either takes cabbage or wolf with him to another side. Man comes back with goat to first side. Man taken wolf (or cabbage) with him to another side. Man comes back. Man takes goat with him to another back.

Cryptarithmetic Find an assignment of digits (0, ..., 9) to letters so that a given arithmetic expression is true. examples: SEND + MORE = MONEY and FORTY Solution: 29786 + TEN 850 ----- ----- SIXTY 31486 F=2, O=9, R=7, etc. Note: In this problem, the solution is NOT a sequence of actions that transforms the initial state into the goal state, but rather the solution is simply finding a goal node that includes an assignment of digits to each of the distinct letters in the given problem.

CRYPTARITHMET CY2 CY1 O N E -------------------------- T E N In this method we want result by satisfying all the constraints and get value of each variable. CY2 CY1 O N E -------------------------- T E N SOLUTION: E=2, N=8, CY2=3,CY1=0, O=1, T=7

CY2=1 & E-=6(Invalid Result) when E=2 N= E+E+E+E = 8 Different choices of E and corresponding different choices of N will leads to a states of problems and problem will become the state space problem when E=1 N= E+E+E+E = 4 N+N+N+N= 4+4+4+4 = 16 CY2=1 & E-=6(Invalid Result) when E=2 N= E+E+E+E = 8 N+N+N+N=8+8+8+8= 32 CY2=3 AND E = 2( valid choice) when E=3 N= E+E+E+E=3+3+3+3=12 N=2 AND CY1=1 CY1+N+N+N+N=1+2+2+2+2=9 CY2=0 & E=9 (Invalid result)

when E=4 N= E+E+E+E = 4+4+4+4=16 N=6 & CY1=1 N+N+N+N+CY1 = 6+6+6+6+1 =25 CY2=2 & E=5(Invalid choice) when E=5 N= E+E+E+E = 5+5+5+5 = 20 N=0 & CY1=2 N+N+N+N+CY1 = 0+0+0+0+2 = 2 CY2=0 & E=2(Invalid Choice) when E=6 N= E+E+E+E = 6+6+6+6 = 24 N=4 & CY1=2 N+N+N+N+CY1 = 4+4+4+4+2=18 CY2=1 & E=8(Invalid choice)

when E=7 N= E+E+E+E = 7+7+7+7 = 28 CY1=2 & N=8 N+N+N+N+CY1 = 8+8+8+8+2=34 CY2=3 & E=4(Invalid Choice) when E=8 N= E+E+E+E = 8+8+8+8 = 32 CY1=3 & N=2 N+N+N+N+CY1 = 2+2+2+2+3=11 CY2=1 & E=1(Invalid Choice) when E=9 N= E+E+E+E = 9+9+9+9 = 36 CY1=3 & N=6 N+N+N+N+CY1= 6+6+6+6+3= 27 CY2=2 & E=7(Invalid choice) Now This is Confirm that the valid choice of E is 2 and choice of N is 8

we want to know the choice of the O As we see that the T is the summation of Four O and has no carry in result there is a previous carry CY2(3) in O Now T= O+O+O+O+CY2(3) So there is only one choice of O Which is 1 as if we take the choice of greater than 1 it means the result exceeds 10 and there is definitely one carry in the result which is not there in the result so we will take the choice O=1 in the problem and this one leads to the following result T=1+1+1+1+3 =7

Thank You!!!