Solved

Search algorithm

Posted on 1998-04-21
6
469 Views
Last Modified: 2008-02-01
1st part.How to implement A* search algorithm in C++ 2nd part how to use this implementation to solve the 8-puzzle problem.
0
Comment
Question by:LOGANSAN
  • 2
  • 2
  • 2
6 Comments
 

Author Comment

by:LOGANSAN
ID: 1162879
The starting state is started by reading in 9 integers in which the first three represent the top row of tiles the second three represent the middle row of tiles and the last three represent the last row.  The blank tile is lablled 0.  The others are labelled 1-8.  Ex. 2 6 0 4 8 3 1 5 7.  Please document so I can understand what was done.
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 200 total points
ID: 1162880
What do you mean by a "* search algorithm"?

What is the 8-puzzle problem?

Please provide more information about your assignment question.

Also don't expect anyone here to do your homework for you .. we wil help you with problems you are having with your code, but will NOT write it for you.

0
 
LVL 11

Expert Comment

by:alexo
ID: 1162881
Roger, I agree about the homework part by why would you lock the question thus preventing LOGANSAN from realizing the error of his ways and deleting the question?  Was there some ulterior motive involved?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 10

Expert Comment

by:RONSLOW
ID: 1162882
nope - no ulterior motive.

If it IS homework, then it'll cost him points to get rid of it (which might discourage him from getting us to do his assignments for him).  And it might also encourage him to do some work first and put up a starting point for his code so we can then help him further.

If it IS NOT homework, then he can reject the answer and we can continue to help with a genuine problem.

I usually post "we won't do your homework for you" messages as answers for that reason.


0
 

Author Comment

by:LOGANSAN
ID: 1162883
I need to see an implementation of the A-star algorithm in C++.
I can't find in books in my area with a example of the A_star algorithm just the theory behind it.  I need this in order to write a program to modify the A-star algorithm and then use it.  However, I am having trouble getting started.
Comment on A-star algorithm:
1 set L ot be a list containing the initial node of the problem
2 let n be node on L for which f(n)=g(n)+h'(n) is minimal. If L is empty fail
3 if n is a goal node, stop and return it and the path from the initial node to n
4 otherwise remove n from L and add to L all of n's children labeling each child with its path from the initial node return to step 2
0
 
LVL 11

Expert Comment

by:alexo
ID: 1162884
I can give you some pointers to get you started:
  http://www-cs-students.stanford.edu/~amitp/Articles/AStar1.html
  http://home.das-netz.de/pat/a-star.htm

(I suggest you reopen the question)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question