gambit-users
[Top][All Lists]
Advanced

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

[Gambit-users] a simple question


From: John Mathis John Mathis
Subject: [Gambit-users] a simple question
Date: Sat, 07 Sep 2002 17:28:18 -0700

Just to make life difficult for myself, I'm attempting to do exercise 3.6 of 
_Games_of_Strategy_ using GCL.  I've sucessfully built an extended form game 
that displays ok with the following commands.

e:=NewEfg[];
A:=NewPlayer[e,"A"];
B:=NewPlayer[e,"B"];
C:=NewPlayer[e,"C"];
D:=NewPlayer[e,"D"];
votea:=NewInfoset[A,{"For","Against"}];
voteb:=NewInfoset[B,{"For","Against"}];
votec:=NewInfoset[C,{"For","Against"}];
voted:=NewInfoset[D,{"For","Against"}];
AddMove[votea,RootNode[e]];
AddMove[voteb,TerminalNodes[e]];
AddMove[votec,TerminalNodes[e]];
AddMove[voted,TerminalNodes[e]];

This was not too difficult, but I want to assign payoffs by evaluating the 
actions that led to each terminal node.  The idea is that the players are 
voting on whether or not to reinstate the death penalty.  Reinstatement 
requires a bill to pass with a strict majority.  There are four possible 
outcomes for any particular player:
1. bill passes, player voted for it (pf)
2. bill passes, player voted against it (pa)
3. bill fails, player voted for it (ff)
4. bill fails, player voted agains it (fa)

A's preferences, from most to least desireable, are respectively: pf,ff,pa,fa.
B's and C's preferences are: ff,fa,pf,pa.
D's preferences are: fa,pa,ff,fa.

The numerical values for A's payoffs could be determined like this:
if the number of "for" votes is less than three
    and A's vote is for, payoff = 3
    and A's vote is against, payoff =1
or if the number of "for" votes is not less than three
    and A's vote is for, payoff = 4
    and A's vote is against, payoff = 2

Numerical values for the other payoffs could be determined by the same method, 
but with different payoffs assigned.

Now, how can I set payoff values for each of the players, at each of the 
terminal nodes, with GCL, using the method described above?

Hope this question isn't to basic for the list - I've read the online 
documentation quite a bit, but the solution remains opaque.

Thanks in advance for your suggestions,
John Mathis



___________________________________________________
TERRA ROCK - La primera comunidad latina de Rock
http://www.terra.com/ocio/musica/terrarock



reply via email to

[Prev in Thread] Current Thread [Next in Thread]