Click here to Skip to main content
       

Algorithms

 
GeneralRe: Splitting up multiple readings... PinmemberJochen Arndt9-Oct-12 3:09 
GeneralRe: Splitting up multiple readings... PinmemberglennPattonWork9-Oct-12 4:34 
GeneralRe: Splitting up multiple readings... PinmemberJochen Arndt9-Oct-12 4:45 
GeneralRe: Splitting up multiple readings... PinmemberglennPattonWork9-Oct-12 5:15 
GeneralRe: Splitting up multiple readings... PinmemberJochen Arndt9-Oct-12 5:55 
GeneralRe: Splitting up multiple readings... PinmemberglennPattonWork9-Oct-12 4:45 
GeneralRe: Splitting up multiple readings... PinmemberEddy Vluggen22-Oct-12 6:24 
QuestionPuzzle 8 Solving with bfs [modified] Pinmembermohammadkaab25-Sep-12 22:50 
hi guys . i ask my qustion very fast . i just need to help me . ty for any help.
 
my qustion is that , i have made a bfs solver class that solve the puzzle 8 with bfs algorithm .
what im doing its like this .
 
1 - node class >> contain some info
2- bfs solver class
 
2-1 : Qeue Neede .
2-2 : enqeue the first node (initial state) << its parent .
2-3 : check if its the Goal Or not (if its not go to next )
2-4 : find the empty tile and see if you can exchange any tile with it .
2-5 : any change w'll make a child node . of that parent
2-6 : deqeue the parent node.
2-6 : check if the child node of the parent is in the qeue (if is not then enqeue the child node and put a parent label on it). jump to the (2-3)
 
is that algorithm working well , i have test it and it really work fine , the problem its here that it dosnt work if i played too much with the tile and chaneged them around . it works fine in small problem like {1,2,3,5,4,6,0,7,8} or sth like this .
and it gave me an error stackoverflow in big problems like {8,0,4,2,3,1,6,7,5} i dont know what should i do to prevent this error but i just know that my codes work fine .
 
im writing my code with c#.net . using a node class and bfs solver class.
i can put some parts of my code if you neede to see what im doing .
 
i'll appriciate any help .

modified 26-Sep-12 4:58am.

AnswerRe: Puzzle 8 Solving with bfs PinmemberAlan Balkany26-Sep-12 4:27 
GeneralRe: Puzzle 8 Solving with bfs Pinmembermohammadkaab26-Sep-12 4:38 
GeneralRe: Puzzle 8 Solving with bfs PinmemberAlan Balkany26-Sep-12 4:42 
GeneralRe: Puzzle 8 Solving with bfs Pinmembermohammadkaab26-Sep-12 5:01 
GeneralRe: Puzzle 8 Solving with bfs PinmemberAlan Balkany26-Sep-12 5:09 
GeneralRe: Puzzle 8 Solving with bfs [modified] Pinmembermohammadkaab26-Sep-12 21:36 
QuestionBit Interleaver PinmemberSkippums24-Sep-12 16:07 
QuestionImage processing Pinmemberfabio_antonio23-Sep-12 8:25 
AnswerRe: Image processing PinmemberAlan Balkany24-Sep-12 4:46 
QuestionChecking the network Pinmemberen41115-Sep-12 7:24 
AnswerlinkRe: Checking the network PinmemberYvesDaoust21-Sep-12 0:11 
Questionan optimal elevator-use algorithm PinmemberBillWoodruff13-Sep-12 3:38 
AnswerRe: an optimal elevator-use algorithm PinmemberAlan Balkany13-Sep-12 4:41 
GeneralRe: an optimal elevator-use algorithm PinmemberBillWoodruff19-Sep-12 4:35 
QuestionPlease, poke holes in my cryptographic function... [modified] PinmemberSixOfTheClock13-Sep-12 0:52 
QuestionWhat kind of checksum can this be? [modified] PinmemberGrooverFromHolland9-Sep-12 9:18 
AnswerRe: What kind of checksum can this be? PinmemberAlan N9-Sep-12 11:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 12 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid