News 〉Releases

Helipad 0.5 Improves Support for Matching Models and Allows More Control Panel Customization

The big feature of 0.5 is core support for matching models. A matching model doesn’t step through the agents one by one, but matches them together in a group of some number. This is especially useful for game-theoretic models, where agents are paired together and play a strategy against one another.

A matching model can be built by setting model.order=='match-n', where n is the size of the matched group. Agents will still run their step function if one is specified, but the main model logic will go in a new match function. There are also new hooks to control the matching process more precisely.

The second important improvement is a series of new GUI hooks that allow panels to be inserted at any point in the control panel. See GUITop, GUIAboveItemParams, GUIAboveParams, GUIAbovePlotList, GUIAboveShocks, and GUIBottom.

Third, the plot-selector interface with the textCheck elements has been spun out into a new tkinter control, checkGrid, that can be used to get and set lists of boolean parameters in user code.

All of these features are shown off in a new Axelrod tournament model from the classic Axelrod (1980) paper, included in the sample models. In the Axelrod model, agents are paired off and play 200 rounds of a repeated prisoner’s dilemma against each other in order to compare how well various strategies do against a variety of others. This model also uses GUIAbovePlotList to insert a checkGrid in the control panel that toggles the various available strategies.

The Axelrod tournament model

See below for a full list of API changes.

API Changes in Version 0.5

  • ⚠️ DataChanged data.reporters from a dict of functions to a dict of Item objects in order to organize more reporter metadata. Code calling reporters directly from the Data object, e.g. data.reporters[name](model) should now call them as follows: data.reporters[name].func(model).
  • ⚠️ CESEliminated the third __init__ argument and allowed coefficients to be specified in the first argument.
  • ⚠️ CobbDouglasEliminated the second __init__ argument and allowed exponents to be specified in the first argument.
  • ⚠️ terminatePass the model data as the second argument.
  • ⚠️ orderRun the hook at the beginning of each stage rather than each period, and convert to a modified key function.
  • ⚠️ dataCollectMoved to before data collection rather than after, as it was functionally equivalent to modelPostStep otherwise.
  • addPrimitiveAdded the order argument.
  • Helipadmodel.order can now be set to a list of values corresponding to the number of stages, and also supports matching models.
  • CpanelGUI.checks is now a checkGrid widget rather than a dict.
  • checkGridIntroduced.
  • removeReporterIntroduced.
  • textCheckAdded the desc parameter.
  • matchIntroduced.
  • CpanelAboveShocksIntroduced.
  • CpanelTopIntroduced.
  • CpanelAboveItemParamsIntroduced.
  • CpanelAboveParamsIntroduced.
  • CpanelAbovePlotListIntroduced.
  • CpanelBottomIntroduced.
  • matchAcceptIntroduced.
  • matchSelectIntroduced.