<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKRuleSystem/rules",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKRuleSystem(py)rules"
  },
  "title" : "rules"
}
-->

# rules

The list of rules to be executed when evaluating the system.

```
var rules: [GKRule] { get }
```

## Discussion

This array holds all rules under consideration by the system—that is, the union of the [`agenda`](/documentation/GameplayKit/GKRuleSystem/agenda) and [`executed`](/documentation/GameplayKit/GKRuleSystem/executed) lists. The agenda holds the rules to be considered when evaluating the system, listed in order of their [`salience`](/documentation/GameplayKit/GKRule/salience) values (or, for rules with the same salience, the order in which they were added to the system). During evaluation of the rule system, if a rule on the [`agenda`](/documentation/GameplayKit/GKRuleSystem/agenda) list is satisfied (that is, its predicate returns <doc://com.apple.documentation/documentation/Swift/true> and it executes its action) the system moves that rule to the [`executed`](/documentation/GameplayKit/GKRuleSystem/executed) list.

Changing the salience of a rule already in the rule system does not adjust its position in the agenda, but does determine the order of the new agenda when resetting the system.

## See Also

[`-  reset`](/documentation/GameplayKit/GKRuleSystem/reset())

Returns the rule system to its original agenda and clears all facts.

[`agenda`](/documentation/GameplayKit/GKRuleSystem/agenda)

The list of rules to be considered when evaluating the system.

[`-  evaluate`](/documentation/GameplayKit/GKRuleSystem/evaluate())

Evaluates the rule system, executing the list of rules in its agenda.

[`executed`](/documentation/GameplayKit/GKRuleSystem/executed)

The list of rules whose actions have been performed during evaluation of the system.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)