Saturday, August 29, 2015

Behavorial math : Chapter 1

The fist chapter serves to set the stage and talk about the task that we undertake as Game AI Programmers. The author references Sid Meier by quoting his definition of what a game is  "A Game" (according to Sid) "Is a series of interesting choices". 
The author then goes on to analyze a few well known games and the choices that players must take while playing them.

He points out how, the choices in "Rock Paper Scissors" are essentially random and lacking any long term statistical data about ones opponent, moot.
An analysis of Tic tac toe reveals that the number of choices in the game, though larger than in RPS, do not lend a lot of extra depth to the game. The choices at the start are whittled down to just three (Corner , middle of side) and they remain in that vicinity decreasing sharply towards the end of the game. It is found that the real choice made by a lucid agent while playing Tic Tac Toe amounts simply  to "Do I want to (eventually) win this game ?"
The last two games that are analyzed are Blackjack and Poker. The author points out the fact that the set of available choices in Blackjack is not extremely large and neither is this the case in Poker.
However, blackjack is a game that is played in an environment of randomness. The opponent is the random order in which cards come up. Sure, one can do statistical analyses of blackjack play patterns and then calculate the odds of any particular hand (Which has obviously been done) but that still doesn't guarantee you a win on any particular hand. So, even though the choices aren't abundant, the games inherent randomness makes them interesting nonetheless.
Poker is much the same, but with one very important distinction, other players playing with you also make their own "Interesting choices" and the fact that there are other free agents playing the game agents that make their own choices, makes poker much less predictable than blackjack.
The author suggests that our Ai agents need to be much closer to the poker opponent side of things, rather than the random opponent of RPS or the extremely rigid opponent of Tic Tac Toe.

The second part of the chapter deals with the question of "How to translate behavior into numbers?"
The author asserts, with the help of the example of the drawing of a pig , that artists in the industry have it much easier than AI programmers. He suggests that artists have a ton of reference material to look at. A game AI programmer however, has no reference for how "things" (people , pigs horses or aliens) behave.
The author suggests that our job, as AI programmers, is to take rough models of behavior and then translate the same into mathematical models so that computers can understand and execute upon the same.