Book Image

Hands-On Artificial Intelligence with Java for Beginners

By : Nisheeth Joshi
Book Image

Hands-On Artificial Intelligence with Java for Beginners

By: Nisheeth Joshi

Overview of this book

Artificial intelligence (AI) is increasingly in demand as well as relevant in the modern world, where everything is driven by technology and data. AI can be used for automating systems or processes to carry out complex tasks and functions in order to achieve optimal performance and productivity. Hands-On Artificial Intelligence with Java for Beginners begins by introducing you to AI concepts and algorithms. You will learn about various Java-based libraries and frameworks that can be used in implementing AI to build smart applications. In addition to this, the book teaches you how to implement easy to complex AI tasks, such as genetic programming, heuristic searches, reinforcement learning, neural networks, and segmentation, all with a practical approach. By the end of this book, you will not only have a solid grasp of AI concepts, but you'll also be able to build your own smart applications for multiple domains.
Table of Contents (14 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Index

Understanding the notion of heuristics


Let's look at heuristics; later on, we'll look at an example.

Heuristics are an approach to problem solving, learning, and discovery. We apply heuristics when we are not sure of what the goal should be; we can apply certain estimates, and these estimates can help us to optimize our search process. If finding an optimal solution is impossible or impractical, heuristic methods can be used to speed up the process of finding a satisfactory solution.

So, let's look at an example of using heuristics.

Suppose that we have a puzzle with eight tiles, arranged as shown in the Initial State cube, and we want to arrange them as they are in the Goal State cube:

To take 1 from its Initial State to its Goal State, we have to move 1 from the first tile to the last tile in the first row.

We also have to move at least two edges (that is, 2 and 3), so that we can get 1 to its Goal State location.

There can be two values: an overestimate and an underestimate. The overestimate...