Joel Uckelman on Tue, 3 Aug 2010 06:02:53 -0700 (MST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[game-lang] notes on GDL II


I've read the GDL II paper now; I'll sumarize the language additions over
GDL here:

There are two new keywords: random and sees.

* random is a special player who is defined to select its moves at random,
uniformly, from among its set of legal moves.

* sees(X,Y) is a predicate used to indicate that player X sees Y.

That's pretty much all of the important content for us.


Comments:

* You can simulate rolling a d6 by giving the random player a choice
between moves 1,...,6. This is not nearly so nice once the random event
you want has a combinatorial structure. If you're rolling 2d6 and only
care about the sum, then you have 11 distinct outcomes, but they happen
in a binomial distribution, they're not equiprobable. So if you want to
have the random player roll 2d6, it looks like your choices are either

(a) to give it a set of moves which contains multiple copies of each
outcome, in the right proportions so that when you randomize uniformly
over it, you get a binomial distribution over the real outcomes, or

(b) roll each die individually

I think (a) is going to be rather complex to do properly, and gets more
difficult the more dice you add. (b) kind of bugs me, because I'd like
to be able to specify something like

  roll(2d6)

and have that do the obvious thing. 

* The example on p. 3 has the random player acting in the capacity of
the dealer in a 1-card poker game. What they do there is interesting.
They define the cards:

  card(7)
  ...
  card(ace)

Then, the dealing:

  legal(random,deal(C,D)) <=
    true(dealingRound) & card(C) & card(D) & distinct(C,D)

  sees(jane,yourCard(C)) <= does(random,deal(C,D))
  sees(dick,yourCard(D)) <= does(random,deal(C,D))

So, the actions which the dealer has are never stated explicitly---any
distinct pair of cards is a legal deal.

This makes me think that the way to handle dice rolling in GDL II is:

  d6(1)
  ...
  d6(6)

  legal(random,roll(X,Y)) <= true(letsRoll) & d6(X) & d6(Y) 

Which is not actually so bad---in fact, it's pretty straightforward.

It took me a while to get my head around thinking of dice rolls as
moves taken by a player. I'm not sure why I had such a problem with
this---it's pretty standard to have nature as a player in game theory
when you want random events. Maybe the thing which threw me is that
the selection of outcomes isn't represented in the rules this way,
only the legality of outcomes. E.g., the above implies 

  !legal(random,roll(7,1))

because !d6(7)---informally, you can't roll a 7 on a d6.

* I don't have much to say about the seen(X,Y) predicate. It's a
standard epistemic modal operator. It works the way I'd expect.

* My overall impression after reading the GDL II paper is a lot more
favorable than after reading the original GDL stuff. It might just
be because the example in this paper is much better than the one in
the original one; hard to tell why, exactly.

-- 
J.
_______________________________________________
game-lang mailing list
game-lang@xxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/game-lang