Module: lib/strategies/queen

Identifies itself to drones using QUEEN_PATTERN while watching the opponent's moves for DRONE_PATTERN. If the queen detects a drone, it will always defect. If the opponent is not a drone, the queen uses the tit-for-tat strategy.

Source:

Members

(inner, constant) DRONE_PATTERN :Array

A drone will defect until it is certain of the queen's presence. Thus, if an opponent defects for the length of QUEEN_PATTERN and then cooperates, the queen assumes the opponent is a drone.

Type:
  • Array
Source:

(inner, constant) QUEEN_PATTERN :Array

Type:
  • Array
Default Value:
  • [true,false,false,true]
Source: