8 Replies - 7584 Views - Last Post: 21 June 2011 - 06:08 AM Rate Topic: -----

#1 Ethan_Hailey  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 20-June 11

Solving a 5x5 sliding puzzle.

Posted 20 June 2011 - 03:22 PM

Hello, I have absolutely NO idea how to go about solving one of these puzzles.

I have used Google extensively and have found out a few different algorithms such as A*, and a few others.

What I'm trying to ask is: How would I solve a 5x5 slider puzzle using Java?

If you don't know what a 5x5 slider puzzle is I can explain it.

Note: I'm not asking for the code, I just want to know how I would go about solving one of these puzzles.

Thanks,

Ethan

Is This A Good Question/Topic? 0
  • +

Replies To: Solving a 5x5 sliding puzzle.

#2 maniacalsounds  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 117
  • View blog
  • Posts: 472
  • Joined: 27-June 10

Re: Solving a 5x5 sliding puzzle.

Posted 20 June 2011 - 03:23 PM

I would suggest creating a multi-dimensional array and creating a method to solve it thoroughly. :)
Was This Post Helpful? 0
  • +
  • -

#3 Ethan_Hailey  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 20-June 11

Re: Solving a 5x5 sliding puzzle.

Posted 20 June 2011 - 03:25 PM

View Postmaniacalsounds, on 20 June 2011 - 03:23 PM, said:

I would suggest creating a multi-dimensional array and creating a method to solve it thoroughly. :)


I know that :)

I just have know clue how I would go about making the method to solve it.

This post has been edited by Ethan_Hailey: 20 June 2011 - 03:25 PM

Was This Post Helpful? 0
  • +
  • -

#4 smohd  Icon User is offline

  • Critical Section
  • member icon


Reputation: 1820
  • View blog
  • Posts: 4,627
  • Joined: 14-March 10

Re: Solving a 5x5 sliding puzzle.

Posted 20 June 2011 - 03:51 PM

I dont know this game, but since you have got the algorithms from google, as you said, you can implement them, is`nt it? If you need more help please specify algorithm which you have so we can show you the way(also how the game works ;) )
Was This Post Helpful? 0
  • +
  • -

#5 Ethan_Hailey  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 20-June 11

Re: Solving a 5x5 sliding puzzle.

Posted 20 June 2011 - 04:06 PM

View Postsmohd, on 20 June 2011 - 03:51 PM, said:

I dont know this game, but since you have got the algorithms from google, as you said, you can implement them, is`nt it? If you need more help please specify algorithm which you have so we can show you the way(also how the game works ;) )


Here is a picture of the game: http://www.tilepuzzl...es/outline2.gif

To play it you have to move all of the tiles into their correct positions to form a picture.

There is one empty space to allow you to slide the different tiles around. Note that you will have a picture of the finished puzzle.

EDIT: Apparently the algorithms that would be used are A* and a few others, but I have absolutely NO clue how these algorithms work or would be implemented.

This post has been edited by Ethan_Hailey: 20 June 2011 - 04:07 PM

Was This Post Helpful? 0
  • +
  • -

#6 pbl  Icon User is online

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8346
  • View blog
  • Posts: 31,908
  • Joined: 06-March 08

Re: Solving a 5x5 sliding puzzle.

Posted 20 June 2011 - 06:44 PM

Googled sliding puzzle algorithm

http://www.8puzzle.c..._algorithm.html
Was This Post Helpful? 0
  • +
  • -

#7 Ethan_Hailey  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 20-June 11

Re: Solving a 5x5 sliding puzzle.

Posted 20 June 2011 - 07:03 PM

View Postpbl, on 20 June 2011 - 06:44 PM, said:

Googled sliding puzzle algorithm

http://www.8puzzle.c..._algorithm.html


Yes, I saw this while searching too. I still have absolutely no clue how I would implement this into my code.
Was This Post Helpful? 0
  • +
  • -

#8 pbl  Icon User is online

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8346
  • View blog
  • Posts: 31,908
  • Joined: 06-March 08

Re: Solving a 5x5 sliding puzzle.

Posted 20 June 2011 - 07:09 PM

Googled sliding puzzle algorithm java

http://www.leepoint....lidepuzzle.html
http://www.javaonthe.../technical.html

What else do you want ?

This post has been edited by pbl: 20 June 2011 - 07:14 PM

Was This Post Helpful? 0
  • +
  • -

#9 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10803
  • View blog
  • Posts: 40,269
  • Joined: 27-December 08

Re: Solving a 5x5 sliding puzzle.

Posted 21 June 2011 - 06:08 AM

Can you clarify what you aren't understanding? Do you not understand how to create a method, OOP, the A* algorithm, etc.? What do you need us to better explain? Please be specific.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1