the frog jumping puzzle consists of 6 frogs,3 of which are green(on the left) and 3 of which are brown (on the right) sitting on either [login to view URL] objective of the puzzle is to switch their sides i.e. all green frogs to go to the right and all brown frogs to go to the left.
legal moves:
1.A frog can only jump to an empty water-lily.
2.A frog can only jump over at most one other frog of different color.
3.A frog can only jump forward(in direction they are facing,i.e. green frogs jump right and brown frogs jump left).
Write program in c++ that sovles the above problem using DEPTH-FIRST [login to view URL] output of the program should clearly indicate the path towards the [login to view URL] output should be given in terms of instructions in english referring to the position of the frog(number the places 1 to 7 from the left to the right) and its [login to view URL] example,starting from the initial state one solution to the puzzle(possible output of your program) is the following:
Jumps as follows:
Green frog on place 3
Brown frog on place 5
Brown frog on place 6
Green frog on place 4
Green frog on place 2
Green frog on place 1
Brown frog on place 3
Brown frog on place 5
Brown frog on place 7
Green frog on place 6
Green frog on place 4
Green frog on place 2
Brown frog on place 3
Brown frog on place 5
Green frog on place 4
Hello. I have chalked out the program, that gives the solution using depth-first search. We can negotiate implementation details if you are interested.
Hello,
I have created a project like this before and would really like to write another. It is an interesting puzzle and one that I know I can deliver on 100%.
I have excellent C++ skills and a real flair for projects such as this. I have a first class BSc(Hons) in Game Programming, using C++.
Hello. I've participated in ACM Olympiads, and have implemented depth-first search hundreds of times. I have a few questions e.g. about input format - but these are just details.