Assignment #1: Desperate Jealous Husbands

Slides:



Advertisements
Similar presentations
Continuation of chapter 6…. Nested while loop A while loop used within another while loop is called nested while loop. Q. An illustration to generate.
Advertisements

Algorithm Design Techniques
Cooperating Intelligent Systems
Algorithmic Problem Solving Lecture 3 River Crossing Problems.
 Review: The Greedy Method
Chapter 7 Sorting Part II. 7.3 QUICK SORT Example left right pivot i j 5 > pivot and should go to the other side. 2 < pivot and should go to.
Algorithmic Software Verification II. Modeling using FSA.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 4 Jim Martin.
1 Depth First Search dfs(0, 0) open site blocked site reachable from top via open sites.
SEARCH ALGORITHMS David Kauchak CS30 – Spring 2015.
Lecture 3 Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
SEARCH APPLICATIONS David Kauchak CS30 – Spring 2015.
Three jealous couples. Problem statement Three couples (husband and wife) wish to cross a river. They have only one boat that can carry at most 2 people.
MATH 310, FALL 2003 (Combinatorial Problem Solving) Lecture 13, Monday, September 29.
State Spaces Introduction to Artificial Intelligence Dr. Robin Burke.
Artificial Intelligence
Toy Problem: Missionaries and Cannibals
1 Lecture 21 Introduction to Sorting I Overview  What is Sorting?  Some Useful Array Handling Methods.  Selection Sort and its Implementation.  Brief.
Artificial Intelligence Chapter 3: Solving Problems by Searching
1 Solving Problems by Searching. 2 Terminology State State Space Initial State Goal Test Action Step Cost Path Cost State Change Function State-Space.
Lecture 12 CSE 331 Sep 30, Announcements Final exam: Dec 16, 11:45am-2:45pm, NSC 210 HW 2 solutions at the end of the lecture Mid term: Oct 16,
1 Introduction to CS Agenda Syllabus Schedule Lecture: the management of complexity.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 580 Artificial Intelligence Problem Spaces and Search Fall 2008 Jingsong.
Thoughts on AI Will computers ever be intelligent? Really intelligent? Tasks that previously were thought to require intelligence: adding and subtracting.
1 Algorithms and Problem Solving. 2 Outline  Problem Solving  Problem Solving Strategy  Algorithms  Sequential Statements  Examples.
1 Section 9.2 Tree Applications. 2 Binary Search Trees Goal is implementation of an efficient searching algorithm Binary Search Tree: –binary tree in.
1 Sorting Algorithms (Part I) Sorting Algoritms (Part I) Overview  What is Sorting?  Some Useful Array Handling Methods.  Selection Sort and its Implementation.
CHAPTER 10 Recursion. 2 Recursive Thinking Recursion is a programming technique in which a method can call itself to solve a problem A recursive definition.

Solving Problems by Searching
The break and continue statements. Introduction There are 2 special statements that can affect the execution of loop statements (such as a while-statement)
Intelligent Workflow Management System(iWMS). Agenda Background Motivation Usage Potential application domains iWMS.
ICT301 Concurrent Systems Anthony Lee
JAVA: An Introduction to Problem Solving & Programming, 5 th Ed. By Walter Savitch and Frank Carrano. ISBN © 2008 Pearson Education, Inc., Upper.
1 State Space of a Problem Lecture 03 ITS033 – Programming & Algorithms Asst. Prof.
Working with arrays (we will use an array of double as example)
Lecture 5 Methods. Sometimes we want to perform the same sequence of operations multiple times in a program. While loops allow us to do this, they are.
Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.
MATH 224 – Discrete Mathematics
CS344: Introduction to Artificial Intelligence (associated lab: CS386)
Main MenuExercise Set 1Exercise Set 2 Interactive Exercises Set 1 Exercise 1.1 Exercise 1.2 Exercise 1.3.
Merge Sort: Taught By Example CO1406: Algorithms and Data Structures Module Lecturer: Dr. Nearchos Paspallis Week 10 Lab - Practice with Merge sort and.
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Problem solving by search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
Quoridor and Artificial Intelligence
Basic Search Procedure 1. Start with the start node (root of the search tree) and place in on the queue 2. Remove the front node in the queue and If the.
The assignment expressions. The assignment operator in an assignment statement We have seen the assignment statement: Effect: var = expr; Stores the value.
The Assignment operator tMyn1 The Assignment Operator The result of a calculation can be stored in a variable using the assignment operator =. Because.
1 Solving Problems by Searching. 2 Terminology State State Space Goal Action Cost State Change Function Problem-Solving Agent State-Space Search.
Computer Science I Programming in Java (programming using Processing IN Java, using IntelliJ IDE) Classwork/Homework: copy your Processing projects over.
Creating Applications Using RMI Lesson 1B / Slide 1 of 19 Network and Distributed Programming in Java Pre-assessment Questions 1.Which of the following.
Programming With Java ICS201 University Of Ha’il1 Chapter 11 Recursion.
Java - hello world example public class HelloWorld { public static void main (String args[]) { System.out.println("Hello World"); }
1 Design Model Use-Case realizations with GRASP Larman chapter 17.
Friend Function.
Analysis of Computing Options at ISU
using System; namespace Demo01 { class Program
Applied Combinatorics, 4th Ed. Alan Tucker
Algorithm Design and Analysis (ADA)
Decision statements. - They can use logic to arrive at desired results
Applied Combinatorics, 4th Ed. Alan Tucker
Recursive GCD Demo public class Euclid {
The Hanoi Tower Problem
class PrintOnetoTen { public static void main(String args[]) {
Insertion Sort Demo Sorting problem:
G51IAI Introduction to AI
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
Recursive backtracking
ECE457 Applied Artificial Intelligence Fall 2007 Lecture #2
Presentation transcript:

Assignment #1: Desperate Jealous Husbands Artificial Intelligence IS-383 Dr. Daniel Vallejo Team: Ruslán Ledesma Garza 125362 Juan Fernando Santos Montaño 125712 Liliana Rojas Campos 125412 Jair Cazarin Villanueva 125535

Agenda Problem Statement. Architecture. Algorithm. Demo.

Problem Statement Problem: Three jealous husbands and their wives need to cross a river. They find a small boat that can contain no more than two people. At least one person has to be in the boat for each crossing.

Problem Statement Goal: Find a schedule of crossings that will permit all six people to cross the river so that none of the women shall be left in company with any of the men, unless her husband is present. It is assumed that all passengers on the boat unboard before the next trip and at least one person has to be in the boat for each crossing.

Architecture MVC (Model, View, Controller).

Architecture Controller: Model: View Processes and responds to events from the View. Invoke changes on the model. Model: A.k.a. Domain Layer. Interchangeable models. (we have the possibility to change the main algorithm). View Two views: text based and graphical.

Architecture DJHState: Encapsulate the states of both sides of the river and the boat. Implements the basic moves or states that can be used according to the problem statement. Generate possible movements in order to get the solution.

Architecture Main Program: public class DesperateJealousHusbands { public static void main(String args[]) DJHModelInterface model = new DJHModel(); DJHControllerInterface controller = new DJHController(model); }

Algorithm DFS (Depth First Search) a.k.a. Brute Force. State aware algorithm (won’t repeat states). Recursive-Iterative solution distributed in two recursive functions. DFS1: Move to right bank and verify goal. Move two people. DFS2: Move to left bank. Move 1 or 2 people. Stops on first solution.

Demo