15.12.2012 Views

Bayesian Programming and Learning for Multi-Player Video Games ...

Bayesian Programming and Learning for Multi-Player Video Games ...

Bayesian Programming and Learning for Multi-Player Video Games ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Indeed, when evaluating two models π1 <strong>and</strong> π2, doing the ratio of evidences <strong>for</strong> the two<br />

modeling assumption helps us choose:<br />

P(π1|δ) P(π1)P(δ|π1)<br />

=<br />

P(π2|δ) P(π2|δ)P(δ|π2)<br />

If our model is complicated, its expressiveness is higher, <strong>and</strong> so it can model more complex<br />

causes of/explanations <strong>for</strong> the dataset. However, the probability mass will be spread thiner on<br />

the space of possible datasets than <strong>for</strong> a simpler model. For instance, in the task of regression,<br />

if π1 can only encode linear regression (y = Ax + b) <strong>and</strong> π2 can also encore quadratic regression<br />

(y = Ax + Bx 2 + c), all the predictions <strong>for</strong> π1 are concentrated on linear (affine) functions, while<br />

<strong>for</strong> π2 the probability mass of predictions is spread on more possible functions. If we only have<br />

data δ of linear functions, the evidence <strong>for</strong> π1, P(π1|δ) will be higher. If δ contains some quadratic<br />

functions, the evidence ratio will shift towards π2 as the second model has better predictions:<br />

the shift to π2 happens when the additional model complexity of π2 <strong>and</strong> the prediction errors of<br />

π1 balance each other.<br />

3.3 Modeling of a <strong>Bayesian</strong> MMORPG player<br />

3.3.1 Task<br />

We will now present a model of a MMORPG* player with the <strong>Bayesian</strong> programming framework<br />

[Synnaeve <strong>and</strong> Bessière, 2010]. A role-playing game (RPG) consist in the incarnation by the<br />

human player of an avatar with specific skills, items, numbers of health points (HP) <strong>and</strong> stamina<br />

or mana (magic energy) points (we already presented this gameplay in section 2.6). We want to<br />

program a robotic player which we can substitute to a human player in a battle scenario. More<br />

specifically here, we modeled the “druid” class, which is complex because it can cast spells to<br />

deal damages or other negative effects as well as to heal allies or enhance their capacities (“buff”<br />

them). The model described here deals only with a sub-task of a global AI <strong>for</strong> autonomous<br />

NPC.<br />

The problem that we try to solve is: how do we choose which skill to use, <strong>and</strong> on which target,<br />

in a PvE* battle? The possible targets are all our allies <strong>and</strong> foes. There are also several skills<br />

that we can use. We will elaborate a model taking all our perceptions into account <strong>and</strong><br />

giving back a distribution over possible target <strong>and</strong> skills. We can then pick the most<br />

probable combination that is yet possible to achieve (enough energy/mana, no cooldown/reload<br />

time) or simply sample in this distribution.<br />

An example of a task that we have to solve is depicted in Figure 3.2, which shows two<br />

different setups (states) of the same scenario: red characters are foes, green ones are allies, we<br />

control the blue one. The “Lich” is inflicting damages to the “MT” (main tank), the “Add” is<br />

hitting the “Tank”. In setup A, only the “Tank” is near death, while in setup B both the “Tank”<br />

<strong>and</strong> the “Add” are almost dead. A first approach to reason about these kind of situations would<br />

be to use the combination of simple rules <strong>and</strong> try to give them some priority.<br />

• if an ally has less than X (threshold) HP then use a “heal” on him.<br />

(3.4)<br />

• if the enemy receiving most damage has resistances (possibly in a list), lower them if<br />

possible.<br />

47

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!