Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

AI Puzzles Artificial intelligence is an important field in computer science. AI

ID: 3773818 • Letter: A

Question

AI Puzzles
Artificial intelligence is an important field in computer science. AI includes a variety of topics including computer vision, machine learning, pattern matching, robotics, and so on. Most AI areas can be described as either a recognition task or a reasoning task. In this assignment, you will simplify tasks to either recognize a pattern or solve a puzzle.
Part 1 - Towers of Hanoi
The Tower of Hanoi puzzle was invented in 1883. You are given three pegs and three disks which are initially stacked in decreasing size on the leftmost peg. The object of the puzzle is to recreate the stack on the right peg while observing two restrictions: you can only move one disk at a time, and a larger disk can never be placed on top of a smaller disk. This puzzle can be generalized to any discs. For more information, you can read about the Towers of Hanoi at:
http://en.wikipedia.org/wiki/Tower_of_Hanoi
Answer the following questions.
1. What are the possible states after 2 moves for a 3-disc puzzle? How about after 3 moves?
2. What is the optimal solution to the 3-disc puzzle?
3. Given one second per move, how long would it take you complete a 34-disc puzzle?
Part 2 - Outbreak
Another common AI task is pattern recognition. In this example scenario, a new disease, Starcraftitis, has been discovered. The test for Starcraftitis is very accurate, but it is also very expensive. A doctor wants to determine if there is a way to identify people who have the disease only by looking at a few symptoms. He has the following data from patients who have taken the expensive test for reference:
Patient
Cough
Stomach Ache
Sore Throat
Chills
Infected
Patient A
No
No
Yes
Yes
No
Patient B
Yes
Yes
No
No
No
Patient C
Yes
Yes
Yes
No
Yes
Patient D
No
No
Yes
No
No
Patient E
No
Yes
Yes
Yes
Yes
Patient F
No
Yes
Yes
No
?????
Answer the following question.
4. Do you think Patient F has the disease? Why or why not?
Part 3 - Bloxorz
Bloxorz is an Internet puzzle game with many levels of increasing difficulty. The objective of the game is to drop a 1x2x1 block through a hole in the middle of each level without falling off of the sides. Obstacles, such as bridges triggered by switches, may also lie between you and your goal. Bloxorz can be found at:
http://www.miniclip.com/games/bloxorz/en/
Answer the following questions.
5. An optimal solution is one that solves the puzzle in the fewest possible moves. What is the optimal solution to level one? Use Up, Down, Left, and Right to represent the moves.
6. Come up with solutions for levels two and three. Are they optimal?
7. What is the passcode for level 4?

Explanation / Answer

include <stdio.h>

// C recursive function to solve tower of hanoi puzzle

void towerOfHanoi(int n, char fromrod, char torod, char auxrod)

{

    if (n == 1)

    {

        printf(" Move disk 1 from rod %c to rod %c", fromrod, torod);

        return;

    }

    towerOfHanoi(n-1, fromrod, auxrod, torod);

    printf(" Move disk %d from rod %c to rod %c", n, fromrod, torod);

    towerOfHanoi(n-1, auxrod, torod, fromrod);

}

int main()

{

    int n = 4; // Number of disks

    towerOfHanoi(n, 'A', 'C', 'B'); // A, B and C are names of rods

    return 0;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote