Solved

Search algorithm

Posted on 1998-04-21
6
472 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

624 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