<reponame>vinbo/SummerCourse2021
# # This is homework.
# # Load your model and submit this to Jidi

import torch
import os

# load critic
from pathlib import Path
import sys
base_dir = Path(__file__).resolve().parent
sys.path.append(str(base_dir))
from critic import Critic


# TODO
class IQL:
    def __init__(self):
        pass


#TODO
def action_from_algo_to_env(joint_action):
    pass


# todo
# Once start to train, u can get saved model. Here we just say it is critic.pth.
critic_net = os.path.dirname(os.path.abspath(__file__)) + '/critic.pth'
agent = IQL()
agent.load(critic_net)


# todo
def my_controller(observation, action_space, is_act_continuous=False):
    obs = observation['obs']
    action = agent.choose_action(obs)
    return action_from_algo_to_env(action)
# # This is homework.
# # Load your model and submit this to Jidi

import torch
import os

# load critic
from pathlib import Path
import sys
base_dir = Path(__file__).resolve().parent
sys.path.append(str(base_dir))
from critic import Critic


# TODO
class IQL:
    def __init__(self):
        pass


#TODO
def action_from_algo_to_env(joint_action):
    pass


# todo
# Once start to train, u can get saved model. Here we just say it is critic.pth.
critic_net = os.path.dirname(os.path.abspath(__file__)) + '/critic.pth'
agent = IQL()
agent.load(critic_net)


# todo
def my_controller(observation, action_space, is_act_continuous=False):
    obs = observation['obs']
    action = agent.choose_action(obs)
    return action_from_algo_to_env(action)
# # This is homework. # # Load your model and submit this to Jidi # load critic # TODO #TODO # todo # Once start to train, u can get saved model. Here we just say it is critic.pth. # todo