#include <tree.h>
Collaboration diagram for TreeNode:

Public Member Functions | |
| TreeNode (Board data) | |
| Standard constructor. | |
| TreeNode (Board data, TreeNode *parent) | |
| Standard constructor to build children nodes. | |
| virtual | ~TreeNode () |
| Standard destructor. | |
| Board | getData () |
| Return state of node. | |
| void | setData (Board data) |
| Sets stata data of node. | |
| void | addChild (Board data) |
| Creates child with data initialization. | |
| void | setBrother (TreeNode *bro) |
| Sets brother node. | |
| TreeNode * | getBrother () |
| Gets brother pointer. | |
| TreeNode * | getParent () |
| Gets parent pointer. | |
| TreeNode * | getChild () |
| Gets children pointer. | |
| void | createChilds (int count, Board *data) |
| Creates node childrens with intialization. | |
| void | createChilds (vector< Board > data) |
| Creates node childrens with intialization. | |
| TreeNode * | expand (int no) |
| This expands the node for player number no. | |
| TreeNode * | expand (int no, vector< int > &moveAt) |
| This expands the node for player number no. | |
| float | minimaxABMin (float a, float b, int no, int level) |
| The minimax search method for minimal level. | |
| float | minimaxABMax (float a, float b, int no, int level) |
| The minimax search method for maximal level. | |
| float | depthSearch (int level, int stopLevel, int no, int moveAt) |
| The depth search method. | |
Protected Attributes | |
| Board | data |
| State of game. | |
| TreeNode * | parent |
| Pointer to parent node. | |
| TreeNode * | brother |
| Pointer to brother node. | |
| TreeNode * | child |
| Pointer to first child node. | |
| float | alpha |
| The aplha value of node. | |
| float | beta |
| The beta value of node. | |
This class encapsulate information of game state and other information to able to navigate through tree.
|
|
Standard constructor. This constructor is used to create root node. It also intialize the state of node.
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Standard constructor to build children nodes. This constructor is used to create children node. It also intialize the state of node.
Here is the call graph for this function: ![]() |
|
|
Standard destructor. This dealocates root node, all brothers and childrens. |
|
|
Creates child with data initialization. This adds children node fot this node.
Here is the call graph for this function: ![]() |
|
|
Creates node childrens with intialization.
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Creates node childrens with intialization.
Here is the call graph for this function: ![]() |
|
||||||||||||||||||||
|
The depth search method.
Here is the call graph for this function: ![]() |
|
||||||||||||
|
This expands the node for player number no.
Here is the call graph for this function: ![]() |
|
|
This expands the node for player number no.
Here is the call graph for this function: ![]() |
|
|
Gets brother pointer.
|
|
|
Gets children pointer.
|
|
|
Return state of node.
|
|
|
Gets parent pointer.
|
|
||||||||||||||||||||
|
The minimax search method for maximal level.
Here is the call graph for this function: ![]() |
|
||||||||||||||||||||
|
The minimax search method for minimal level.
Here is the call graph for this function: ![]() |
|
|
Sets brother node.
Here is the call graph for this function: ![]() |
|
|
Sets stata data of node.
Here is the call graph for this function: ![]() |
1.3.7