Class MobileTreasureHider
- java.lang.Object
-
- com.treasure.hunt.strategy.hider.impl.StatisticalHider
-
- com.treasure.hunt.strategy.hider.impl.MobileTreasureHider
-
- All Implemented Interfaces:
HideAndSeekHider<AngleHint>,Hider<AngleHint>
public class MobileTreasureHider extends StatisticalHider implements HideAndSeekHider<AngleHint>
A Strategy using theStatisticalHideras Base Implementation, but being able to move the treasure while the game is running and therefore implementing to theHideAndSeekHiderinterfaceThe strategy uses the
GameFieldto maintain its state
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringmindTreasureRelocationDistance_Preferencestatic java.lang.StringtreasureBeforeHintFirst_Preferencestatic java.lang.StringwalkedPathLengthForTreasureRelocation_Preference-
Fields inherited from class com.treasure.hunt.strategy.hider.impl.StatisticalHider
absoluteAreaCutoff, badHintWeight_Preference, centroidDistanceToTreasure, counterStrategyGeometryCutoff, currentPossibleArea, DistanceFromNormalAngleLineToTreasureWeight_Preference, distanceFromNormalAngleRay, DistanceFromResultingCentroidToTreasureWeight_Preference, gameField, gf, preferredHintSize, relativeAreaCutoff, relativeAreaCutoffWeight_Preference, startingPoint, treasure
-
-
Constructor Summary
Constructors Constructor Description MobileTreasureHider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AngleHintmove(SearchPath searchPath)protected doublerateHint(AngleHintStatistic ahs)Rates the Given Hint with a custom function, saves the result in the AngleHintStatistic - Wrapper and returns the result-
Methods inherited from class com.treasure.hunt.strategy.hider.impl.StatisticalHider
eval, fillDistanceToCentroid, fillDistanceToNormalLine, filterForValidHints, generateHints, getTreasureLocation, init
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.treasure.hunt.strategy.hider.Hider
getTreasureLocation, init
-
-
-
-
Field Detail
-
treasureBeforeHintFirst_Preference
public static final java.lang.String treasureBeforeHintFirst_Preference
- See Also:
- Constant Field Values
-
walkedPathLengthForTreasureRelocation_Preference
public static final java.lang.String walkedPathLengthForTreasureRelocation_Preference
- See Also:
- Constant Field Values
-
mindTreasureRelocationDistance_Preference
public static final java.lang.String mindTreasureRelocationDistance_Preference
- See Also:
- Constant Field Values
-
-
Method Detail
-
move
public AngleHint move(SearchPath searchPath)
- Specified by:
movein interfaceHider<AngleHint>- Overrides:
movein classStatisticalHider- Parameters:
searchPath- theSearchPath, theSearcherdid last- Returns:
- T a (new) hint.
-
rateHint
protected double rateHint(AngleHintStatistic ahs)
Description copied from class:StatisticalHiderRates the Given Hint with a custom function, saves the result in the AngleHintStatistic - Wrapper and returns the result- Specified by:
rateHintin classStatisticalHider- Parameters:
ahs- The AngleHint - Wrapper , in which the result is saved- Returns:
- the rating of the hint
-
-