I've been taking an AI class, and we had to implement breadth first and depth first searches with the "8 piece puzzle" problem. (8 piece puzzles are the little 3 by 3 grids with 8 tiles in them, so you can move them around). I implemented everything in C#, and it is pretty well documented.
Three classes of interest:
PuzzleState: An object representing a state of a 8 piece puzzle. It generates the child states as well.
PuzzleProcessor: The class that actually performs the searches themselves. Please note the use of the "closed" node lists... these track the states that have already been considered.
PuzzleMain: the actual starting point. It sets everything up and goes.
This is a console application with no flashy graphics or whatever. Although I included a function to make a random starting state, this is undesirable, because solving one of those takes a long time with these searches.
I could go into more detail about the searches themselves, if someone wants. The only real difference is the underlying data structure.
I'm working on a Java implementation of Genetic Algorithms in solving the "travelling salesman problem". Hopefully, it works well and I post it here.