Grail (C#)
1.2.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
Public Member Functions | |
DecisionTree (in IVectorizer vectorizer) | |
Constructs a new decision tree object. You have to specify a proper vectorizer object that will be used to calculate values used by considerations (conditions) for the nodes. More... | |
void | Construct (Dataset< ISimulatedGameAction > dataset, int maxDepth=int.MaxValue) |
Runs the decision tree construction algorithm (C45). contains the training data. More... | |
ISimulatedGameAction | GetAction () |
Inherited via SimulatedGameHeuristic. More... | |
void | Print () |
Prints the decision tree in a very diagnostic fashion onto standard output (Console). More... | |
void | SetColumnName (int columnIndex, string name) |
This will make the Print() function output the name instead of Column[columnIndex]. This name does not affect anything else. | |
void | SetColumnNames (IEnumerable< string > consecutiveNames) |
This will make the Print() function output the names instead of Column[columnIndex]. This name does not affect anything else. | |
void | Serialize (IDecisionTreeSerializer< ISimulatedGameAction > serializer) |
Serializes the content of the tree into the passed serializer object. More... | |
bool | IsHeuristicSituation (in ISimulatedGameUnit unit) |
Inherited via SimulatedGameHeuristic. | |
void | Deserialize (IDecisionTreeSerializer< ISimulatedGameAction > serializer) |
Inherited via SimulatedGameHeuristic. | |
Properties | |
IVectorizer | Vectorizer [get, set] |
Gets or sets the IVectorizer object to a tree. It is used during the game to compute conditions for the GetAction() method to work. More... | |
|
inline |
Constructs a new decision tree object. You have to specify a proper vectorizer object that will be used to calculate values used by considerations (conditions) for the nodes.
vectorizer |
|
inline |
Runs the decision tree construction algorithm (C45). contains the training data.
dataset | Object that contains the training data. |
maxDepth | The maximum number of nodes deep in the tree. Unless you are out of memory, it is advised to keep the depth relatively unlimited. |
ISimulatedGameAction Grail.SimulatedGames.DecisionTree.DecisionTree.GetAction | ( | ) |
Inherited via SimulatedGameHeuristic.
Implements Grail.SimulatedGames.ISimulatedGameHeuristic.
void Grail.SimulatedGames.DecisionTree.DecisionTree.Print | ( | ) |
Prints the decision tree in a very diagnostic fashion onto standard output (Console).
|
inline |
Serializes the content of the tree into the passed serializer object.
<param name="serializer"
|
getset |
Gets or sets the IVectorizer object to a tree. It is used during the game to compute conditions for the GetAction() method to work.