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:
parent
c347c68958
commit
1f99669d29
@ -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
|
@ -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
|
@ -0,0 +1,8 @@
|
|||||||
|
from src.AI.DecisionTrees.projectSpecificClasses.DistFromObject import DistFromObject
|
||||||
|
|
||||||
|
|
||||||
|
class DTSurvivalEntity:
|
||||||
|
DistFromObjectFromPlayer: DistFromObject
|
||||||
|
|
||||||
|
def __init__(self, distanceFromPlayer: DistFromObject):
|
||||||
|
self.distanceFromPlayer = distanceFromPlayer
|
@ -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
|
12
src/AI/DecisionTrees/projectSpecificClasses/DTPlayerStats.py
Normal file
12
src/AI/DecisionTrees/projectSpecificClasses/DTPlayerStats.py
Normal 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
|
Loading…
Reference in New Issue
Block a user