-
Notifications
You must be signed in to change notification settings - Fork 6
/
config.py
48 lines (34 loc) · 878 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"""
Author: Toshinori Kitamura
Affiliation: NAIST & OSX
"""
import enum
from typing import ClassVar, Type
import chex
from shinrl import EnvConfig
class OBS_MODE(enum.IntEnum):
tuple = enum.auto()
image = enum.auto()
class ACT_MODE(enum.IntEnum):
discrete = enum.auto()
continuous = enum.auto()
@chex.dataclass
class MountainCarConfig(EnvConfig):
"""Config for MountainCar.
Args:
"""
OBS_MODE: ClassVar[Type[OBS_MODE]] = OBS_MODE
ACT_MODE: ClassVar[Type[ACT_MODE]] = ACT_MODE
obs_mode: OBS_MODE = OBS_MODE.tuple
act_mode: ACT_MODE = ACT_MODE.discrete
force_mag: float = 0.002
goal_pos: float = 0.5
pos_max: float = 0.6
pos_min: float = -1.2
pos_res: int = 32
vel_max: float = 0.07
vel_min: float = -0.07
vel_res: int = 32
dA: int = 3
discount: float = 0.99
horizon: int = 200