Book Image

Hands-On Artificial Intelligence for Search

By : Devangini Patel
Book Image

Hands-On Artificial Intelligence for Search

By: Devangini Patel

Overview of this book

With the emergence of big data and modern technologies, AI has acquired a lot of relevance in many domains. The increase in demand for automation has generated many applications for AI in fields such as robotics, predictive analytics, finance, and more. In this book, you will understand what artificial intelligence is. It explains in detail basic search methods: Depth-First Search (DFS), Breadth-First Search (BFS), and A* Search, which can be used to make intelligent decisions when the initial state, end state, and possible actions are known. Random solutions or greedy solutions can be found for such problems. But these are not optimal in either space or time and efficient approaches in time and space will be explored. We will also understand how to formulate a problem, which involves looking at it and identifying its initial state, goal state, and the actions that are possible in each state. We also need to understand the data structures involved while implementing these search algorithms as they form the basis of search exploration. Finally, we will look into what a heuristic is as this decides the quality of one sub-solution over another and helps you decide which step to take.
Table of Contents (5 chapters)

Do it yourself

In the previous section, we discussed the differences between the DFS and BFS algorithms. In this section, we'll look at an application that you can try to develop yourself. We'll go over the application that you'll try to develop, and the changes that are required for the application.

Your aim will be to develop a university navigation application, as shown in the following diagram:

Figure 20

Suppose that this is the layout of the university, and people can travel along horizontal or vertical lines. In this application, the user has to enter the source and destination places. For this specific case, we'll assume that a new student wants to find his way from the Bus Stop to the AI Lab.

You can refer to the classes that we developed for the LinkedIn connection feature, as follows:

Figure 21

To adapt that code for this application, we need to...