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.

7.5 Build tree prediction<br />

The work described in the next two sections can be classified as probabilistic plan recognition.<br />

Strictly speaking, we present model-based machine learning used <strong>for</strong> prediction of plans, while<br />

our model is not limited to prediction. We per<strong>for</strong>med two levels of plan recognition, both are<br />

learned from the replays: tech tree prediction (unsupervised, it does not need openings labeling,<br />

this section) <strong>and</strong> opening prediction (semi-supervised or supervised depending on the labeling<br />

method, next section).<br />

7.5.1 <strong>Bayesian</strong> model<br />

Variables<br />

• BuildTree: BT ∈ {∅, {building1}, {building2}, {building1 ∧ building2}, . . . }: all the possible<br />

building trees <strong>for</strong> the given race. For instance {pylon, gate} <strong>and</strong> {pylon, gate, core}<br />

are two different BuildT rees.<br />

• Observations: O i∈�1...N� ∈ {0, 1}, Ok is 1/true if we have seen (observed) the kth building<br />

(it can have been destroyed, it will stay “seen”). Otherwise, it is 0/false.<br />

• λ ∈ {0, 1}: coherence variable (restraining BuildT ree to possible values with regard to<br />

O1:N)<br />

• Time: T ∈ �1 . . . P �, time in the game (1 second resolution).<br />

At first, we generated all the possible (according to the game rules) build trees* (BT values)<br />

of StarCraft, <strong>and</strong> there are between ≈ 500 <strong>and</strong> 1600 depending on the race without even<br />

counting buildings duplicates! We observed that a lot of possible build trees are too absurd to<br />

be per<strong>for</strong>med in a competitive match <strong>and</strong> were never seen during the learning. So, we restricted<br />

BT to have its value in all the build trees encountered in our replays dataset <strong>and</strong> we added<br />

multiple instances of the basic unit producing buildings (gateway, barracks), expansions <strong>and</strong><br />

supply buildings (depot, pylon, “overlord” as a building), as shown in Table 7.2. This way, there<br />

are 810 build trees <strong>for</strong> Terran, 346 <strong>for</strong> Protoss <strong>and</strong> 261 <strong>for</strong> Zerg (learned from ≈ 3000 games <strong>for</strong><br />

each race, see Table 7.1). In a new game, if we encounter a build tree that we never saw, we<br />

are in a unknown state. Anyway we would not have seen enough data (any at all) during the<br />

learning to conclude anything. We could look at the proximity of the build tree to other known<br />

build trees, see section 7.5.2 <strong>and</strong> the Discussion (7.5.3).<br />

Decomposition<br />

The joint distribution of our model is the following:<br />

P(T, BT, O1 . . . ON, λ) = P(T |BT )P(BT )P(λ|BT, O1:N)<br />

This can also be see as a plate diagram in Figure 7.7.<br />

129<br />

N�<br />

P(Oi) (7.1)<br />

i=1

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

Saved successfully!

Ooh no, something went wrong!