Tree search works way better, still not perfect