8 puzzle game a.i.
hi guys,
i'm trying to solve eight puzzle game in java, i have got the code for a-star algorithm and node class and state class from an internet website. then i've created my own eightpuzzle class and eightpuzzle state.
eightpuzzle class extends astar class and it tries to solve the puzzle by passing intial and goal array to eight puzzle state class.
In the eight puzzle state class which extends state class , i got 4 methods called equals(),successor(),estimate(),toString().
i done the equals method but i dont know if i done it correctly. i need to do the successor method and estimate method.
Can anyone please help in completing successor method and estimate method. i dont know what goes in the successor method and estimate method. i guess in the estimate method Manhattan distance is calculated.
anyone needs code please ask...
thanks in advance.
(After much editing to make my post less offensive...)
Also, your post is kind of incoherent. Also, I have no Idea why you're using A* for this, it really isn't very useful here. Also, it sounds like you have no idea what you're talking about, and are asking us to do a homework problem for you. Also, the complete lack of proper capitalization (except one sentence) is kind of a putoff.
(Just a first impression)
Also, your post is kind of incoherent. Also, I have no Idea why you're using A* for this, it really isn't very useful here. Also, it sounds like you have no idea what you're talking about, and are asking us to do a homework problem for you. Also, the complete lack of proper capitalization (except one sentence) is kind of a putoff.
(Just a first impression)
Signature go here.
Using A* makes perfect sense for this case. He seems to have found a base class that implements the A* algorithm, where you have to provide those 4 methods to apply it a specific situation.
Anyway, I'm not going to do his homework for him either.
Anyway, I'm not going to do his homework for him either.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement