Question: I'm making an online tile based game and I have just finished scripting the piece of code that takes the coordinates of where you are standing and builds the surroundings (tiles) around you (the game is made using a table with many cells that hold the tiles).

I need some help creating a bit of AJAX that can refresh my table every now and then (lets sat every 2 seconds for the sake of this question). I have no experience with AJAX and there would be no point learning it all (even though id like too) as I will only be using it for this small part of my game, plus I do not have time.

This is how my game is set up:

*php*
Some php that gets info on the character.\*
*php*

*html*
Some html that displays the data in a graphical form.
*html*

So what I need is some AJAX that refreshes the php then the html every 2 seconds.

Answer: 
You look at all the nodes adjacent to your start node. Then you look at all the nodes adjacent to those (not returning to nodes you've already looked at). Repeat until satisfying node found or no more nodes.

For the kind of problem you indicate, you use the process described above to build a set of paths, terminating any that arrive at the desired destination node, and when your graph is exhausted, the set of paths that so terminated is your solution set.
Think of it as websites with links to other sites on them. Let A be our root node or our starting website.

```

A is the starting page    (Layer 1)
A links to AA, AB, AC     (Layer 2)
AA links to AAA, AAB, AAC (Layer 3)
AB links to ABA, ABB, ABC (Layer 3)
AC links to ACA, ACB, ACC (Layer 3)

```

This is only three layers deep. You search one layer at a time. So in this case you would start at layer A. If that does not match you go to the next layer, AA, AB and AC. If none of those websites is the one you are searching for then you follow the links and go to the next layer. In other words, you look at one layer at a time.

A depth first search (its complement) you would go from A to AA to AAA. In other words you would go DEEP before going WIDE.