|
| Action (double epsilon, Strategy strategy, long timeLimit, int numberOfLevels) |
|
| Action (double epsilon, Strategy strategy, long timeLimit, int numberOfLevels, long seed) |
|
int | nextLevel (Map< Integer, Double > probabilities, long timeLeft) |
|
long | getTimeLimit () |
|
void | setTimeLimit (long timeLimit) |
|
|
double | epsilonInit |
|
Strategy | strategy |
|
Random | random |
|
long | timeLimit |
|
int | numberOfLevels |
|
int | currentLevel |
|
int | numberOfTimesPlayedTheMost = -1 |
|
int | numberOfTimesPlayedMinimum = 1000 |
|
boolean | allLostLevelsPlayedTwice = false |
|
int | lastLostLevel = -1 |
|
|
static final Logger | log = LogManager.getLogger(Action.class) |
|
Class for selecting a Level using a specific Strategy and the probability distribution calculated by Decision
◆ Action() [1/2]
de.uniba.sme.bambirds.level_selection.Action.Action |
( |
double |
epsilon, |
|
|
Strategy |
strategy, |
|
|
long |
timeLimit, |
|
|
int |
numberOfLevels |
|
) |
| |
Create a new Action Object
- Parameters
-
epsilon | initial value for epsilon algorithms |
strategy | Type of strategy used to select next level |
timeLimit | Maximum time in the Competition |
numberOfLevels | The number of Levels the agent is playing |
◆ Action() [2/2]
de.uniba.sme.bambirds.level_selection.Action.Action |
( |
double |
epsilon, |
|
|
Strategy |
strategy, |
|
|
long |
timeLimit, |
|
|
int |
numberOfLevels, |
|
|
long |
seed |
|
) |
| |
Create a new Action Object
- Parameters
-
epsilon | initial value for epsilon algorithms |
strategy | Type of strategy used to select next level |
timeLimit | Maximum time in the Competition |
numberOfLevels | The number of Levels the agent is playing |
seed | The seed for the random number generator |
◆ epsilonAdaptiveSelection()
int de.uniba.sme.bambirds.level_selection.Action.epsilonAdaptiveSelection |
( |
Map< Integer, Double > |
probabilities, |
|
|
long |
timeLeft |
|
) |
| |
|
private |
Select the level with the highest probability depending on how much time is left and how good the score and win predictions are.
Otherwise randomSelection
- Parameters
-
probabilities | for each possible level |
timeLeft | remaining time |
- Returns
- the next level to play
◆ epsilonGreedySelection()
int de.uniba.sme.bambirds.level_selection.Action.epsilonGreedySelection |
( |
Map< Integer, Double > |
probabilities | ) |
|
|
private |
Select the level with the highest probability with probability 1 - epsilon.
Otherwise randomSelection
- Parameters
-
probabilities | for each possible level |
- Returns
- the next level to play
◆ greedySelection()
int de.uniba.sme.bambirds.level_selection.Action.greedySelection |
( |
Map< Integer, Double > |
probabilities | ) |
|
|
private |
Select the level with the highest probability
- Parameters
-
probabilities | for each possible level |
- Returns
- the next level to play
◆ nextLevel()
int de.uniba.sme.bambirds.level_selection.Action.nextLevel |
( |
Map< Integer, Double > |
probabilities, |
|
|
long |
timeLeft |
|
) |
| |
Calculate the next Level to be played depending on the strategy.
- Parameters
-
probabilities | for each possible level |
timeLeft | remaining time |
- Returns
- the next level to play
◆ oldSelection()
int de.uniba.sme.bambirds.level_selection.Action.oldSelection |
( |
| ) |
|
|
private |
The old Level Selection, where first all not won levels will be attempted 3 times. Then if less than 15 percent have been lost, the Level with the highest possible improvement based on the maximum possible points will be selected
- Returns
- the next level to play
◆ randomSelection()
int de.uniba.sme.bambirds.level_selection.Action.randomSelection |
( |
Map< Integer, Double > |
probabilities | ) |
|
|
private |
Randomly select a level depending on its probability
- Parameters
-
probabilities | for each possible level |
- Returns
- the next level to play
The documentation for this class was generated from the following file: