CSE4002 Artificial Intelligence Fundamentals Assignment

Assignment Help Computer Engineering
Reference no: EM132991127

CSE4002 Artificial Intelligence Fundamentals - La Trobe University

Solving the Towers of Hanoi Problem using State Space Search

Among many classic AI problems is the Towers of Hanoi problem; one of many versions of this, forms the basis of this assignment and is told as follows:

In a monastery in the deepest parts of Tibet there are three crystal columns and 64 golden rings. The rings are different sizes and rest over the columns. At the beginning of time, all of the rings rested on the leftmost column, and since then the monks have toiled ceaselessly trying to perfectly transfer the rings to their resting place on the final column.

The objective of this problem is to move the entire stack of rings from the first, to the last column, while obeying 3 simple rules:

1. Only one ring can be moved at time.

2. Each move consists of taking the upper ring from one of the stacks and placing it on the top of another stack or an empty pole.

3. A larger ring must not be placed on top of a smaller ring.

A state space representation of a 3 column, 2 ring, Towers of Hanoi problem is shown in the graph:

305_figure.jpg

For this assignment, we will consider a Towers of Hanoi problem with 3 columns and 6 rings; although your final algorithm will most likely be capable of solving more complex versions. You will be expected to use the information given in this assignment to code two state space searching algorithms to achieve the objective state described above; an uninformed (Blind) search, and an informed (Heuristic) search.

Part 1 - Problem Analysis
Before writing the python code implementation of this problem, we must perform an analysis in order to conclude the best methodology.

Representing the Problem

How you choose to represent the states of any given problem can be critical in determining whether a solution can be found. Consider the following figure for our problem:

605_figure1.jpg

Scheme 1:
A state is represented by a list, where the list is of length 3 to represent the number of columns. Each index in this list contains the list of all rings stacked on this column; the stack order of each ring is represented by the rings index in each columns' inner list.

Scheme 2:
Another approach is to treat the rings individually, defining a rings class to store their size, current column, and index in that column.

Ring Class:
• Number/Size
• Column
• Column Index

Depending on how you decide to implement your future functions, scheme 2 may result in a cleaner, more readable implementation.

Questions:
1. What representation do you think will be best to implement? Why?

2. What is the optimal number of moves for a Towers of Hanoi problem with n columns and m rings?

3. Write pseudocode to perform the node expansion for this problem. (i.e. in the 8Puzzle we have the left, right, up, down movement functions)

4. Sketch the first four levels (i.e., root node plus next three levels) of the breadth-first search tree. Make sure that you indicate the state corresponding to each node, and

the operators that have been applied to move from one state to another. Do not include illegal states, or states that have already been visited.

5. As discussed in Lab 3, the heuristic function to a problem varies based on application.
For the 8-Puzzle problem, we utilized a count of all misplaced tiles; for the Shortest Path Problem we calculated the distance to the end node. What heuristic function can be used for the Towers of Hanoi Problem? (hint: the end goal is to have all rings on the final column)

6. As in question 4, Sketch the first four levels (i.e., root node plus next three levels) of the A* search tree.

Part 2 - Coding

As previously discussed, your Towers of Hanoi problem must be capable of solving for N Columns and R Rings. The user must enter N and R.

Your final code must implement both Breadth-First Search and A* Search solutions. Similar to your work solving the 8-Puzzle with BFS and A*, both solving algorithms must be implemented into the same file.

The output of your program must be a count of the total number of steps taken to reach the solution; and a path list, showing the rings positions at each level of the search. You need to try different N and R and then create a table (see below) to compare the results between these two algorithms. The compression can be based on the total number of steps taken to reach the solitons and time. You need to run each algorithm 5 times and report the best, worst and average.

Attachment:- Artificial Intelligence Fundamentals.rar

Reference no: EM132991127

Questions Cloud

Create a balanced scorecard for each company : Create a balanced scorecard for each company - Complete the financial section of the balanced scorecard template, identifying two of the most relevant key
Case study - software requirement specification : Case Study - Software Requirement Specification - Design the security control assessment matrix to identify the risk and risk-reduction techniques to secure
State what basic strategy you will take : Identified risk, state what basic strategy you will take. Justify for each decision. Also, Advise all possible protection mechanism and corresponding place
Perform scanning on the network : Perform scanning on the network to identify the services and ports of the applications. Furthermore, the firewall needs to be configured
CSE4002 Artificial Intelligence Fundamentals Assignment : CSE4002 Artificial Intelligence Fundamentals Assignment Help and Solution, La Trobe University - Assessment Writing Service
What is a consequence scale : What is a consequence scale? List the most commonly used consequence rating terms.
How could singapore airline best compete with rivals : Please help me to explain, discount airline's are competing more aggressively with Singapore airline. How could Singapore airline best compete with these rivals
Four steps in the ethical decision-making process : What are the four steps in the ethical decision-making process? What are some examples of ethical breaches common to business?
Discuss about post-crisis situation : In the Financial Crisis 2008, discuss about post-crisis situation following question below:

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd