# problem with a 8 puzzle variation

Page 1 of 1

## 2 Replies - 2724 Views - Last Post: 10 December 2012 - 09:12 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'https://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=303414&amp;s=50df6a3c7b827fa92fdff145d91c3be3&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 iakovl

• New D.I.C Head

Reputation: 0
• Posts: 2
• Joined: 10-December 12

# problem with a 8 puzzle variation

Posted 10 December 2012 - 04:50 AM

problem with a 8 puzzle variation

this is more of a challenge that was given to me by a friend who study's python to me who is trying to study it... it is a 8 puzzle variation that i can't solve (this isn't homework of sort, just a challenge that i struggle with and need guide and help)

so here it is unlike the normal 8-puzzle the challenge is using letters : a,a,b,c,d,e,f,g, (yes, there are 2 "a") and there are 3 goal variation that the can solve the puzzle, lets say : aab_cdefg , cba_adefg and gfed_cbaa and call them goalA goalB goalC

unlike a normal 1 goal 8puzzle this one must choose each move the goal he goes for goalA or goalB or goalC (in this point im trying to think how to avoid loops, going to A then switching to B then C ect... and also the double letter 'a' is a problem as i see it)

Is This A Good Question/Topic? 0

## Replies To: problem with a 8 puzzle variation

### #2 jon.kiparsky

• Beginner

Reputation: 11095
• Posts: 18,982
• Joined: 19-March 11

## Re: problem with a 8 puzzle variation

Posted 10 December 2012 - 07:44 AM

I'm not sure I see this exactly. This, in particular:

Quote

unlike a normal 1 goal 8puzzle this one must choose each move the goal he goes for goalA or goalB or goalC

Does it matter what goal I choose for a move that doesn't end the game? If I understand your notation correctly, suppose I have _abacdefg - that is, I can slide the a on the second row up to finish the puzzle. In that case, I can see that I have to declare my goal, fine. But if I have a_bacdefg, I'm two moves away. Does it matter if I declare that I'm going for aab_cdefg in that case, and if so, how?

### #3 iakovl

• New D.I.C Head

Reputation: 0
• Posts: 2
• Joined: 10-December 12

## Re: problem with a 8 puzzle variation

Posted 10 December 2012 - 09:12 AM

its an AI problem
there are 3 options for an END for the puzzle, each move it checks which one is the best solution and goes to it