Generate game nodes using depth first search