ogd.games.LAKELAND.features package
Submodules
ogd.games.LAKELAND.features.ActionsLastXSecondsModel module
ogd.games.LAKELAND.features.DeathCountModel module
ogd.games.LAKELAND.features.DeathPredModel module
ogd.games.LAKELAND.features.DeathThresholdModel module
ogd.games.LAKELAND.features.DiagonalFarmDetectorModel module
ogd.games.LAKELAND.features.FeatSeqPercent module
ogd.games.LAKELAND.features.FeatVelocity module
ogd.games.LAKELAND.features.FeatureModel module
ogd.games.LAKELAND.features.LakelandExtractor module
Lakeland Feature Extractor Note that a separate file unique to the lakeland extractor is necessary to run this script. The file is Lakeland Enumerators.json, and is required for the line: _STR_TO_ENUM = utils.loadJSONFile(“games/LAKELAND/Lakeland Enumerators.json”)
This json file is created from the fielddaylab/lakeland README on github via “produce_lakeland_enumerators.py”. Please run that script with the appropriate inpath and outpath before running this script.
- class ogd.games.LAKELAND.features.LakelandExtractor.LakelandExtractor(params: GeneratorParameters, game_schema: GameSchema, session_id: str)[source]
Bases:
LegacyFeature- feature_max_min(fname_base, val)[source]
feature must have the same fname_base that gets put on the following four features: - {_SESS_PREFIX}max_ - {_SESS_PREFIX}min_ - {_WINDOW_PREFIX}max_ - {_WINDOW_PREFIX}min_
- feature_time_since_start(feature_base)[source]
Sets a session time since start feature. Will not write over a feature that has already been set. :param feature_base: name of feature without sess or window prefix :param cur_client_time: client time at which the event happened
- reformat_history_array(array, timestamp)[source]
This function should be done in the reformatting step. History arrays contain timestamps relative to another timestamp that is when the array is sent through the logger. This function returns an array with absolute datetimes. :param self: self :param array: array to be processed. These arrays are either a list of times relative to client time or a list of subarrays with the last item as the time before timestamp. :param timestamp: time that each element is relative to (Javascript Date.now(), milliseconds since beginning 1970 UTC) :return: A 2D array where each subarray’s final element is the absolute client time.
- ogd.games.LAKELAND.features.LakelandExtractor.avg(l)[source]
Returns average of a list. Allows elements to be datetime time intervals. :param l: list :return: Average (L1 distance between elements)
ogd.games.LAKELAND.features.LinearModel module
ogd.games.LAKELAND.features.LogisticModel module
ogd.games.LAKELAND.features.MapSummaryModel module
ogd.games.LAKELAND.features.Model module
- class ogd.games.LAKELAND.features.Model.Model(input_type: ModelInputType, levels: List[int] = [])[source]
Bases:
ABC
ogd.games.LAKELAND.features.MoneyAccumulationModel module
ogd.games.LAKELAND.features.NthEventModel module
ogd.games.LAKELAND.features.PlayingTimeModel module
ogd.games.LAKELAND.features.PopulationModel module
ogd.games.LAKELAND.features.RecentPurchasesModel module
ogd.games.LAKELAND.features.SequenceModel module
ogd.games.LAKELAND.features.SimpleFarmAbandonmentModel module
ogd.games.LAKELAND.features.SingleFeatureModel module
ogd.games.LAKELAND.features.TimeSinceEventTypes module
ogd.games.LAKELAND.features.TimeSinceLastSaleModel module
ogd.games.LAKELAND.features.TownCompositionFeatureModel module
ogd.games.LAKELAND.features.TownCompositionModel module
ogd.games.LAKELAND.features.TutorialProgressionModel module
Module contents
Initializer for Lakeland features