Find Jobs
Hire Freelancers

8 puzzle solver using a*

$10-30 USD

Completed
Posted over 8 years ago

$10-30 USD

Paid on delivery
Problem: Write a program to solve the 8-puzzle problem (and its natural generalizations) using the A* search algorithm. The 8-puzzle is played on a 3-by-3 grid with 8 square blocks labeled 1 through 8 and a blank square. Your goal is to rearrange the blocks so that they are in order. You are permitted to slide blocks horizontally or vertically into the blank square. The following shows a sequence of legal moves from an initial board position (left) to the goal position (right). 1 3 1 3 1 2 3 1 2 3 1 2 3 4 2 5 => 4 2 5 => 4 5 => 4 5 => 4 5 6 7 8 6 7 8 6 7 8 6 7 8 6 7 8 Initial Goal Write a program [login to view URL] that reads the initial board from standard input and prints to standard output a sequence of board positions that solves the puzzle in the fewest number of moves (Hint Use Best First Search). Also print out the total number of moves and the total number of states ever enqueued. The input will consist of the board dimension N followed by the N-by-N initial board position. The input format uses 0 to represent the blank square. As an example, % more [login to view URL] 3 0 1 3 4 2 5 7 8 6 % java Solver < [login to view URL] 1 3 4 2 5 7 8 6 1 3 4 2 5 7 8 6 1 2 3 4 5 7 8 6 1 2 3 4 5 7 8 6 1 2 3 4 5 6 7 8 Number of states enqueued = 10 Minimum number of moves = 4 Note that your program should work for arbitrary N-by-N boards (for any N greater than 1), even if it is too slow to solve some of them in a reasonable amount of time. Not all initial board positions can lead to the goal state. Modify your program to detect and report such situations. % more [login to view URL] 3 1 2 3 4 5 6 8 7 0 % java Solver < [login to view URL] No solution possible Other details are attached
Project ID: 9131452

About the project

5 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi, I'm Abhijit Mondal from Bangladesh and my background is in Computer Science and Engineering at Bangladesh University of Engineering and Technology. I am an expert Java and Android developer and I have 5 years of experience coding with these languages. I have read the job description you provided above. I have already done 8 puzzle with A* algorithm. I just need to deliver it to you.
$30 USD in 1 day
5.0 (1 review)
1.0
1.0
5 freelancers are bidding on average $31 USD for this job
User Avatar
Hi, i can help you on this project. Thank you.
$40 USD in 1 day
5.0 (29 reviews)
4.8
4.8
User Avatar
A proposal has not yet been provided
$24 USD in 1 day
5.0 (4 reviews)
3.1
3.1
User Avatar
Sir I can do it,I know that puzzle,and algorithm solution,I can implement it in C++ Sir I can do it,I know that puzzle,and algorithm solution,I can implement it in C++
$35 USD in 1 day
5.0 (4 reviews)
1.9
1.9
User Avatar
----------------------------------------------Interesting Job! I'll offer best result if you can pay!--------------------
$100 USD in 1 day
5.0 (2 reviews)
1.7
1.7
User Avatar
Hey there! I'm an experienced Java programmer, and if you need some help on this I'd love to help you out. Just let me know!
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of SRI LANKA
Kotagala, Sri Lanka
5.0
2
Payment method verified
Member since Oct 9, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.