mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-09-04 20:23:54 +00:00
27 lines
649 B
Python
27 lines
649 B
Python
|
|
from enum import Enum
|
||
|
|
|
||
|
|
|
||
|
|
class GoalSelectionStrategy(Enum):
|
||
|
|
"""
|
||
|
|
The strategies for selecting new goals when
|
||
|
|
creating artificial transitions.
|
||
|
|
"""
|
||
|
|
|
||
|
|
# Select a goal that was achieved
|
||
|
|
# after the current step, in the same episode
|
||
|
|
FUTURE = 0
|
||
|
|
# Select the goal that was achieved
|
||
|
|
# at the end of the episode
|
||
|
|
FINAL = 1
|
||
|
|
# Select a goal that was achieved in the episode
|
||
|
|
EPISODE = 2
|
||
|
|
|
||
|
|
|
||
|
|
# For convenience
|
||
|
|
# that way, we can use string to select a strategy
|
||
|
|
KEY_TO_GOAL_STRATEGY = {
|
||
|
|
"future": GoalSelectionStrategy.FUTURE,
|
||
|
|
"final": GoalSelectionStrategy.FINAL,
|
||
|
|
"episode": GoalSelectionStrategy.EPISODE,
|
||
|
|
}
|