---
title: rootNode
framework: gameplaykit
role: symbol
role_heading: Instance Property
path: gameplaykit/gkdecisiontree/rootnode
---

# rootNode

The decision node at the root of the decision tree, representing the first attribute to test.

## Declaration

```swift
var rootNode: GKDecisionNode? { get }
```

## Discussion

Discussion To build a manually defined tree, use GKDecisionNode methods on that object to create branches leading to child nodes that represent additional attributes to test or final actions.

## See Also

### Creating a Manually Defined Decision Tree

- [init(attribute:)](gameplaykit/gkdecisiontree/init(attribute:).md)
