# Path: deluca/core.py
# class Env(Obj):
# 
#   @abstractmethod
#   def init(self):
#     """Return an initialized state"""
# 
#   @abstractmethod
#   def __call__(self, state, action, *args, **kwargs):
#     """Return an updated state"""
# 
# Path: deluca/core.py
# def field(default=None, jaxed=True, **kwargs):
#   if "default_factory" not in kwargs:
#     kwargs["default"] = default
#   kwargs["pytree_node"] = jaxed
#   return flax.struct.field(**kwargs)


from deluca.core import Env
from deluca.core import field
import jax
import jax.numpy as jnp
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""@author: Olivier Sigaud A merge between two sources:
* Adaptation of the MountainCar Environment from the "FAReinforcement" library
* of Jose Antonio Martin H.

(version 1.0), adapted by  'Tom Schaul, tom@idsia.ch' and then modified by
Arnaud de Broissia * the OpenAI/gym MountainCar environment itself from
http://incompleteideas.net/sutton/MountainCar/MountainCar1.cp permalink:
https://perma.cc/6Z2N-PFWC
"""

# pylint:disable=g-long-lambda



class MountainCar(Env):
  """MountainCar."""
  key: jnp.ndarray = field(jaxed=False)

# Path: deluca/core.py
# class Env(Obj):
# 
#   @abstractmethod
#   def init(self):
#     """Return an initialized state"""
# 
#   @abstractmethod
#   def __call__(self, state, action, *args, **kwargs):
#     """Return an updated state"""
# 
# Path: deluca/core.py
# def field(default=None, jaxed=True, **kwargs):
#   if "default_factory" not in kwargs:
#     kwargs["default"] = default
#   kwargs["pytree_node"] = jaxed
#   return flax.struct.field(**kwargs)


# Path: deluca/envs/classic/_mountain_car.py
from deluca.core import Env
from deluca.core import field
import jax
import jax.numpy as jnp

#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""@author: Olivier Sigaud A merge between two sources:
* Adaptation of the MountainCar Environment from the "FAReinforcement" library
* of Jose Antonio Martin H.

(version 1.0), adapted by  'Tom Schaul, tom@idsia.ch' and then modified by
Arnaud de Broissia * the OpenAI/gym MountainCar environment itself from
http://incompleteideas.net/sutton/MountainCar/MountainCar1.cp permalink:
https://perma.cc/6Z2N-PFWC
"""

# pylint:disable=g-long-lambda



class MountainCar(Env):
  """MountainCar."""
  key: jnp.ndarray = field(jaxed=False)

  goal_velocity: float = field(0.0, jaxed=False)