# Copyright (c) 2020, RTE (https://www.rte-france.com)
# See AUTHORS.txt
# This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0.
# If a copy of the Mozilla Public License, version 2.0 was not distributed with this file,
# you can obtain one at http://mozilla.org/MPL/2.0/.
# SPDX-License-Identifier: MPL-2.0
# This file is part of L2RPN Baselines, L2RPN Baselines a repository to host baselines for l2rpn competitions.
import copy
from l2rpn_baselines.utils import NNParam
from l2rpn_baselines.DeepQSimple.deepQ_NN import DeepQ_NN
[docs]class DeepQ_NNParam(NNParam):
"""
This defined the specific parameters for the DeepQ network.
Nothing really different compared to the base class
except that :attr:`l2rpn_baselines.utils.NNParam.nn_class` (nn_class) is :class:`deepQ_NN.DeepQ_NN`
.. warning::
This baseline recodes entire the RL training procedure. You can use it if you
want to have a deeper look at Deep Q Learning algorithm and a possible (non
optimized, slow, etc. implementation ).
For a much better implementation, you can reuse the code of "PPO_RLLIB"
or the "PPO_SB3" baseline.
"""
_int_attr = copy.deepcopy(NNParam._int_attr)
_float_attr = copy.deepcopy(NNParam._float_attr)
_str_attr = copy.deepcopy(NNParam._str_attr)
_list_float = copy.deepcopy(NNParam._list_float)
_list_str = copy.deepcopy(NNParam._list_str)
_list_int = copy.deepcopy(NNParam._list_int)
nn_class = DeepQ_NN
def __init__(self,
action_size,
observation_size, # TODO this might not be usefull
sizes,
activs,
list_attr_obs
):
NNParam.__init__(self,
action_size,
observation_size, # TODO this might not be usefull
sizes,
activs,
list_attr_obs
)