eight puzzle: all testcases pass?
Author Message
g2ok Offline
Student


Reputation: 0
Post: #1
eight puzzle: all testcases pass?
Has anyone gotten their eight puzzle to output the exact same results as in the test file?

I get most of them exactly right, but for 3 of the searches I get the same g-val with a different path and more nodes added and expanded.

I've triple checked the successors and heuristic functions and I'm pretty confident my logic is correct.

If anyone has gotten their code to produce correct results in all cases, that would rule out a possible mistake in the test file.

Thanks.
2013-10-19 10:01
Find all posts by this user Quote this message in a reply
g1puljak Offline
Student


Reputation: 0
Post: #2
RE: eight puzzle: all testcases pass?
(2013-10-19 10:01)g2ok Wrote:  Has anyone gotten their eight puzzle to output the exact same results as in the test file?

I get most of them exactly right, but for 3 of the searches I get the same g-val with a different path and more nodes added and expanded.

I've triple checked the successors and heuristic functions and I'm pretty confident my logic is correct.

If anyone has gotten their code to produce correct results in all cases, that would rule out a possible mistake in the test file.

Thanks.

Some of mine have different numbers/path as well. Everything seems to work fine on my end though.

That is, everything other than "Memory Error" when trying to run
Code:
se = SearchEngine('astar', 'none')
eightPuzzle_set_goal([0, 1, 2, 3, 4, 5, 6, 7, 8])
s1 = eightPuzzle("START", 0, [8, 7, 6, 0, 4, 1, 2, 5, 3])
se.search(s1, eightPuzzle_goal_fn, h_misplacedTiles)

Confused
(This post was last modified: 2013-10-19 19:44 by g1puljak.)
2013-10-19 19:15
Find all posts by this user Quote this message in a reply
g0dlewis Offline
Student


Reputation: 0
Post: #3
RE: eight puzzle: all testcases pass?
(2013-10-19 10:01)g2ok Wrote:  Has anyone gotten their eight puzzle to output the exact same results as in the test file?

I get most of them exactly right, but for 3 of the searches I get the same g-val with a different path and more nodes added and expanded.

I've triple checked the successors and heuristic functions and I'm pretty confident my logic is correct.

If anyone has gotten their code to produce correct results in all cases, that would rule out a possible mistake in the test file.

Thanks.

I got the same results as you.
2013-10-19 20:36
Find all posts by this user Quote this message in a reply
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5


Forum Jump:


User(s) browsing this thread: 1 Guest(s)