init(attribute:)
Creates a decision tree starting with the specified initial attribute to test.
Declaration
init(attribute: any NSObjectProtocol)Parameters
- attribute:
The first attribute to test (or question to answer) when evaluating the tree.
Return Value
A new decision tree.
Discussion
The decision tree returned by this initializer is incomplete. To build a manually defined tree, use the rootNode property to access the node corresponding to the initial attribute, and use GKDecisionNode methods on that object to create branches leading to child nodes that represent additional attributes to test or final actions.