How it works...

We developed our recipe using a pseudo-exploratory algorithm and stored the payoff from taking a certain action. The recipe first tests every action there is, and then keeps making moves using the formula from the UCB1 algorithm. It is good enough to be challenging, and at the same time it is defeatable because the algorithm explores different options—Thus, creating better changes for the player to improve their skills, or just to be lucky.

Get Unity 2018 Artificial Intelligence Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.