O'Reilly logo

Hello, Android, 4th Edition by Ed Burnette

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introduction to AI

AI plays a role in almost any kind of game you might want to write, and some non-game programs as well. For example, AI techniques are used to build smart apps that anticipate the user’s actions and learn based on heuristics and past behavior. Because users tend to project their own abilities into that of the program, it doesn’t take much to achieve the appearance of intelligence.

How AIs Work

Over the years, computer scientists have developed a number of ways to teach computers how to play games. One of the simplest is the minimax algorithm, named because it alternately tries to minimize or maximize the score depending on whose turn it is.

Gameplay is broken down into a sequence of plys, or half-turns. When the human moves, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required