Add classes which will represent environment and will be usable in decision trees

Classes to represent player statistics, food objects etc...
This commit is contained in:
Michał Czekański 2020-05-23 21:42:10 +02:00
parent c347c68958
commit 1f99669d29
5 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,9 @@
from src.AI.DecisionTrees.projectSpecificClasses.DTEntities.DTSurvivalEntity import DTSurvivalEntity
from src.AI.DecisionTrees.projectSpecificClasses.DistFromObject import DistFromObject
from src.AI.DecisionTrees.projectSpecificClasses.SurvivalClassification import SurvivalClassification
class DTFood(DTSurvivalEntity):
def __init__(self, distanceFromPlayer: DistFromObject):
super().__init__(distanceFromPlayer)
self.classification = SurvivalClassification.FOOD

View File

@ -0,0 +1,9 @@
from src.AI.DecisionTrees.projectSpecificClasses.DTEntities.DTSurvivalEntity import DTSurvivalEntity
from src.AI.DecisionTrees.projectSpecificClasses.DistFromObject import DistFromObject
from src.AI.DecisionTrees.projectSpecificClasses.SurvivalClassification import SurvivalClassification
class DTRestPlace(DTSurvivalEntity):
def __init__(self, distanceFromPlayer: DistFromObject):
super().__init__(distanceFromPlayer)
self.classification = SurvivalClassification.REST

View File

@ -0,0 +1,8 @@
from src.AI.DecisionTrees.projectSpecificClasses.DistFromObject import DistFromObject
class DTSurvivalEntity:
DistFromObjectFromPlayer: DistFromObject
def __init__(self, distanceFromPlayer: DistFromObject):
self.distanceFromPlayer = distanceFromPlayer

View File

@ -0,0 +1,9 @@
from src.AI.DecisionTrees.projectSpecificClasses.DTEntities.DTSurvivalEntity import DTSurvivalEntity
from src.AI.DecisionTrees.projectSpecificClasses.DistFromObject import DistFromObject
from src.AI.DecisionTrees.projectSpecificClasses.SurvivalClassification import SurvivalClassification
class DTWater(DTSurvivalEntity):
def __init__(self, distanceFromPlayer: DistFromObject):
super().__init__(distanceFromPlayer)
self.classification = SurvivalClassification.WATER

View File

@ -0,0 +1,12 @@
from src.AI.DecisionTrees.projectSpecificClasses.PlayerStatsValue import PlayerStatsValue
class DTPlayerStats:
hungerAmount: PlayerStatsValue
thirstAmount: PlayerStatsValue
staminaAmount: PlayerStatsValue
def __init__(self, hungerAmount: PlayerStatsValue, thirstAmount: PlayerStatsValue, staminaAmount: PlayerStatsValue):
self.staminaAmount = staminaAmount
self.thirstAmount = thirstAmount
self.hungerAmount = hungerAmount