Find Jobs
Hire Freelancers

8 puzzle solver using a*

$10-30 USD

Terminado
Publicado hace más de 8 años

$10-30 USD

Pagado a la entrega
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
ID del proyecto: 9131452

Información sobre el proyecto

5 propuestas
Proyecto remoto
Activo hace 8 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
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 en 1 día
5,0 (1 comentario)
1,0
1,0
5 freelancers están ofertando un promedio de $31 USD por este trabajo
Avatar del usuario
Hi, i can help you on this project. Thank you.
$40 USD en 1 día
5,0 (29 comentarios)
4,8
4,8
Avatar del usuario
A proposal has not yet been provided
$24 USD en 1 día
5,0 (4 comentarios)
3,1
3,1
Avatar del usuario
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 en 1 día
5,0 (4 comentarios)
1,9
1,9
Avatar del usuario
----------------------------------------------Interesting Job! I'll offer best result if you can pay!--------------------
$100 USD en 1 día
5,0 (2 comentarios)
1,7
1,7
Avatar del usuario
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 en 1 día
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de SRI LANKA
Kotagala, Sri Lanka
5,0
2
Forma de pago verificada
Miembro desde oct 9, 2011

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.