<gh_stars>1-10
from abc import ABC, abstractmethod, abstractproperty
import tensorflow as tf
import numpy as np
from gym import Space


class Agent(ABC):
    ### Properties ###
    # message: str -- picked up by the training regimen and displayed after each step

    @abstractmethod
    def __init__(self, observation_space:Space, action_space:Space):
        """
        This is where you will define the neural network and setup other objects
        that the agent needs.
        """
        pass

    @abstractmethod
    def load(self,
        sess:tf.Session,
        # saver:tf.train.Saver,
        ):
        pass

    @abstractmethod
    def save(self,
        sess:tf.Session,
        # saver:tf.train.Saver,
        ):
        pass

    @abstractmethod
    def act(self,
        sess:tf.Session,
        state:np.array,
        train:bool,
        ) -> np.array:
        pass
    
    @abstractmethod
    def step(self,
        sess:tf.Session,
        state:np.array,
        action:np.array,
        reward:float,
        next_state:np.array,
        done:bool
        ):
        pass

    @abstractmethod
    def learn(self,
        sess:tf.Session,
        states:np.array,
        actions:np.array,
        rewards:np.array,
        next_states:np.array,
        episode_ends:np.array
        ) -> float:
        pass
from abc import ABC, abstractmethod, abstractproperty
import tensorflow as tf
import numpy as np
from gym import Space


class Agent(ABC):
    ### Properties ###
    # message: str -- picked up by the training regimen and displayed after each step

    @abstractmethod
    def __init__(self, observation_space:Space, action_space:Space):
        """
        This is where you will define the neural network and setup other objects
        that the agent needs.
        """
        pass

    @abstractmethod
    def load(self,
        sess:tf.Session,
        # saver:tf.train.Saver,
        ):
        pass

    @abstractmethod
    def save(self,
        sess:tf.Session,
        # saver:tf.train.Saver,
        ):
        pass

    @abstractmethod
    def act(self,
        sess:tf.Session,
        state:np.array,
        train:bool,
        ) -> np.array:
        pass
    
    @abstractmethod
    def step(self,
        sess:tf.Session,
        state:np.array,
        action:np.array,
        reward:float,
        next_state:np.array,
        done:bool
        ):
        pass

    @abstractmethod
    def learn(self,
        sess:tf.Session,
        states:np.array,
        actions:np.array,
        rewards:np.array,
        next_states:np.array,
        episode_ends:np.array
        ) -> float:
        pass
### Properties ### # message: str -- picked up by the training regimen and displayed after each step This is where you will define the neural network and setup other objects         that the agent needs. # saver:tf.train.Saver, # saver:tf.train.Saver,