Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.princeton.repeatedgames.rgsolve.games.specialgames
Class GrabTheDollar

    java.lang.Object
      edu.princeton.repeatedgames.rgsolve.games.Game
          edu.princeton.repeatedgames.rgsolve.games.specialgames.GrabTheDollar

All Implemented Interfaces:
  java.io.Serializable

    public class GrabTheDollar

extends Game
implements java.io.Serializable

This stage game is itself a dynamic game. In it, there is a `prize` that players can both reach for. Actions `ai`, corresponds to the time that player `i` reaches for the prize. The first one to reach for the prize (say `i`) gets `stageDiscount^ai * prize`. If they reach at the same time, they break the prize and both incur a loss `-stageDiscount^ai * penalty`. If you don't grab the prize, you get zero.````

See Also:
  Serialized Form

Field Summary
`(package private) double` | `penalty` penalty
`(package private) double` | `prize` prize
`private static long` | `serialVersionUID` Serialization ID
`(package private) double` | `stageDiscount` Stage discount rate

Fields inherited from class edu.princeton.repeatedgames.rgsolve.games.Game
`description, extension`

Constructor Summary
`GrabTheDollar(int m1, double delta, double stageDiscount, double prize, double penalty)`

Method Summary
`double` | `payoff1(int a1, int a2)` payoff to player 1
`double` | `payoff2(int a1, int a2)` payoff to player 2

Methods inherited from class edu.princeton.repeatedgames.rgsolve.games.Game
`actionUsable, copyUsableActions, delta, m, m1, m2, payoff, payoff, setActionUsable, setDescription, setDiscount, usableActionsDefined`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### serialVersionUID

    private static final long serialVersionUID

  Serialization ID

  See Also:
    Constant Field Values

### stageDiscount

    double stageDiscount

  Stage discount rate

### prize

    double prize

  prize

### penalty

    double penalty

  penalty

Constructor Detail

### GrabTheDollar

    public GrabTheDollar(int m1,
                         double delta,
                         double stageDiscount,
                         double prize,
                         double penalty)

Parameters:
  `m1` -
  `delta` -
  `stageDiscount` -
  `prize` -
  `penalty` -

Method Detail

### payoff1

    public double payoff1(int a1,
                          int a2)

  Description copied from class: `Game`
  payoff to player 1

  Specified by:
    `payoff1` in class `Game`
  Parameters:
    `a1` - player 1 action
    `a2` - player 2 action
  Returns:
    the payoff to player 1

### payoff2

    public double payoff2(int a1,
                          int a2)

  Description copied from class: `Game`
  payoff to player 2

  Specified by:
    `payoff2` in class `Game`
  Parameters:
    `a1` - player 1 action
    `a2` - player 2 action
  Returns:
    the payoff to player 2

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD