Generalized Heuristic Search Algorithms with Applications to Motion Planning and Multi-Agent Path Finding Problems