Necessary search algorithm are taken from aima books.