From c347c68958db9f0929aaee32d97adc4c6e2acaab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czeka=C5=84ski?= Date: Sat, 23 May 2020 17:23:50 +0200 Subject: [PATCH] Comment classes --- .../SurvivalAttributesDefinitions.py | 7 +++++++ .../projectSpecificClasses/SurvivalDTExample.py | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/src/AI/DecisionTrees/projectSpecificClasses/SurvivalAttributesDefinitions.py b/src/AI/DecisionTrees/projectSpecificClasses/SurvivalAttributesDefinitions.py index 169ec3b..96ccb79 100644 --- a/src/AI/DecisionTrees/projectSpecificClasses/SurvivalAttributesDefinitions.py +++ b/src/AI/DecisionTrees/projectSpecificClasses/SurvivalAttributesDefinitions.py @@ -4,6 +4,13 @@ from src.AI.DecisionTrees.projectSpecificClasses.PlayerStatsValue import PlayerS class SurvivalAttributesDefinitions: + """ + This class contains all attributes definitions which will be used to create decision tree examples + and decision tree learning. + + There are definitions of attributes like hunger, thirst, etc... + """ + attrsDefinitionsCount = 6 hungerAttrDef = AttributeDefinition(0, "Hunger", [PlayerStatsValue.ZERO_TO_QUARTER, diff --git a/src/AI/DecisionTrees/projectSpecificClasses/SurvivalDTExample.py b/src/AI/DecisionTrees/projectSpecificClasses/SurvivalDTExample.py index 8d4264c..e7be748 100644 --- a/src/AI/DecisionTrees/projectSpecificClasses/SurvivalDTExample.py +++ b/src/AI/DecisionTrees/projectSpecificClasses/SurvivalDTExample.py @@ -7,6 +7,10 @@ from src.AI.DecisionTrees.projectSpecificClasses.SurvivalClassification import S class SurvivalDTExample(DecisionTreeExample): + """ + This class will be used to create examples for decision trees with project specific attributes like hunger, + distance from food, etc. + """ hungerVal: PlayerStatsValue thirstVal: PlayerStatsValue staminaVal: PlayerStatsValue