2018-12-21 03:44:34 +09:00
|
|
|
"""Registry of algorithm names for `rllib train --run=<alg_name>`"""
|
|
|
|
|
|
|
|
|
|
|
|
def _import_random_agent():
|
|
|
|
from ray.rllib.contrib.random_agent.random_agent import RandomAgent
|
|
|
|
return RandomAgent
|
|
|
|
|
|
|
|
|
2019-08-06 19:22:06 -04:00
|
|
|
def _import_maddpg():
|
|
|
|
from ray.rllib.contrib import maddpg
|
|
|
|
return maddpg.MADDPGTrainer
|
|
|
|
|
|
|
|
|
2019-12-07 21:08:40 +01:00
|
|
|
def _import_alphazero():
|
|
|
|
from ray.rllib.contrib.alpha_zero.core.alpha_zero_trainer import\
|
|
|
|
AlphaZeroTrainer
|
|
|
|
return AlphaZeroTrainer
|
|
|
|
|
|
|
|
|
2020-03-26 13:41:16 -07:00
|
|
|
def _import_bandit_lints():
|
|
|
|
from ray.rllib.contrib.bandits.agents.lin_ts import LinTSTrainer
|
|
|
|
return LinTSTrainer
|
|
|
|
|
|
|
|
|
|
|
|
def _import_bandit_linucb():
|
|
|
|
from ray.rllib.contrib.bandits.agents.lin_ucb import LinUCBTrainer
|
|
|
|
return LinUCBTrainer
|
|
|
|
|
|
|
|
|
2018-12-21 03:44:34 +09:00
|
|
|
CONTRIBUTED_ALGORITHMS = {
|
|
|
|
"contrib/RandomAgent": _import_random_agent,
|
2019-08-06 19:22:06 -04:00
|
|
|
"contrib/MADDPG": _import_maddpg,
|
2019-12-07 21:08:40 +01:00
|
|
|
"contrib/AlphaZero": _import_alphazero,
|
2020-03-26 13:41:16 -07:00
|
|
|
"contrib/LinTS": _import_bandit_lints,
|
|
|
|
"contrib/LinUCB": _import_bandit_linucb
|
2018-12-21 03:44:34 +09:00
|
|
|
}
|