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
Class RGSolution

    java.lang.Object
      edu.princeton.repeatedgames.rgsolve.RGSolution

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  RGSolution.RGSolutionUserRule

    public class RGSolution

extends java.lang.Object
implements java.io.Serializable

This data structure represents rgsolve's solution to a game (including detailed information on the algorithm's steps).

See Also:
  Serialized Form

Nested Class Summary
`static class` | `RGSolution.RGSolutionUserRule` A special case of `RGSolution`, for games where the user entered Java-code payoff rules into the rgsolve GUI
`static class` | `RGSolution.TEXT_OUTPUT_TYPE` enum for formatting of V* as text table

Field Summary
`AlgoParameters.ALGO_TYPE` | `algo_type` algorithm used, `AS` or `APS`
`int[]` | `BR1` Best response actions for player 1
`int[]` | `BR2` Best response actions for player 2
`boolean` | `converged` did the algorithm converge to the tolerance set in `params`?
`double` | `error` max sup-distance between corresponding vertices of last two iterates
`static java.lang.String` | `extension` File extension for serialization: .rgsoln
`boolean` | `fromInnerApproximation` whether or not this solution was generated via an inner approximation
`Game` | `game` the game associated with this solution
`long` | `genPtsCount` the number of potential extreme points generated over course of algoritm
`java.util.ArrayList<RGIter>` | `iterList` A list of `RGIter` objects, each of which stores information on the algorithm's steps within an iteration
`int` | `iters` the number of iterations
`boolean` | `keptActions` did we store information on action-wise IC-intersections?
`AlgoParameters` | `params` The parameters used in constructing this sol'n
`Point` | `punishment_star` The equilibrium threat point, (or threat point where algo stopped)
`private static long` | `serialVersionUID` Serialization ID
`long` | `time_ms` the time (in ms) to convergence
`GameExtremePoint[]` | `V_star` The equilibrium payoff set V* (or final payoff set before algorithm terminated.
`Point[]` | `W0` the initial feasible set containing V* used at start of algorithm

Constructor Summary
`RGSolution(AlgoParameters.ALGO_TYPE algo_type, Point[] W0, GameExtremePoint[] V_star, Point punishment_star, Game game, int[] BR1, int[] BR2, int iters, long time_ms, boolean converged, double error, java.util.ArrayList<RGIter> iterList, int genPtsCount, boolean keptActions, boolean fromInnerApproximation, AlgoParameters params)` Default constructor for initializing fields of data structure

Method Summary
`java.lang.String` | `getSolutionAsText(RGSolution.TEXT_OUTPUT_TYPE type, int digits)`

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

### extension

    public static final java.lang.String extension

  File extension for serialization: .rgsoln

  See Also:
    Constant Field Values

### params

    public AlgoParameters params

  The parameters used in constructing this sol'n

### algo_type

    public AlgoParameters.ALGO_TYPE algo_type

  algorithm used, `AS` or `APS`

### game

    public Game game

  the game associated with this solution

### W0

    public Point[] W0

  the initial feasible set containing V* used at start of algorithm

### V_star

    public GameExtremePoint[] V_star

  The equilibrium payoff set V* (or final payoff set before algorithm terminated.

### punishment_star

    public Point punishment_star

  The equilibrium threat point, (or threat point where algo stopped)

### iterList

    public java.util.ArrayList<RGIter> iterList

  A list of `RGIter` objects, each of which stores information on the algorithm's steps within an iteration

### BR1

    public int[] BR1

  Best response actions for player 1

### BR2

    public int[] BR2

  Best response actions for player 2

### iters

    public int iters

  the number of iterations

### time_ms

    public long time_ms

  the time (in ms) to convergence

### converged

    public boolean converged

  did the algorithm converge to the tolerance set in `params`?

### error

    public double error

  max sup-distance between corresponding vertices of last two iterates

### genPtsCount

    public long genPtsCount

  the number of potential extreme points generated over course of algoritm

### keptActions

    public boolean keptActions

  did we store information on action-wise IC-intersections?

### fromInnerApproximation

    public boolean fromInnerApproximation

  whether or not this solution was generated via an inner approximation

Constructor Detail

### RGSolution

    public RGSolution(AlgoParameters.ALGO_TYPE algo_type,
                      Point[] W0,
                      GameExtremePoint[] V_star,
                      Point punishment_star,
                      Game game,
                      int[] BR1,
                      int[] BR2,
                      int iters,
                      long time_ms,
                      boolean converged,
                      double error,
                      java.util.ArrayList<RGIter> iterList,
                      int genPtsCount,
                      boolean keptActions,
                      boolean fromInnerApproximation,
                      AlgoParameters params)

  Default constructor for initializing fields of data structure

  Parameters:
    `algo_type` -
    `W0` -
    `V_star` -
    `punishment_star` -
    `game` -
    `BR1` -
    `BR2` -
    `iters` -
    `time_ms` -
    `converged` -
    `error` -
    `iterList` -
    `genPtsCount` -
    `keptActions` -
    `fromInnerApproximation` -
    `params` -

Method Detail

### getSolutionAsText

    public java.lang.String getSolutionAsText(RGSolution.TEXT_OUTPUT_TYPE type,
                                              int digits)

  Parameters:
    `type` - how the text-table should be formatted
    `digits` - the number of output digits
  Returns:
    A textual representation of the solution V* as a table

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