from sources import agent
import matplotlib.pyplot as plt
import cv2


class SimpleBreakoutAgent(agent.Agent):

    def __init__(self, action_space, epsilon=0.1, alpha=0.5, gamma=0.9, lambda_=0.7):
        super(SimpleBreakoutAgent, self).__init__(action_space)

        self.epsilon = epsilon
        self.alpha = alpha
        self.gamma = gamma
        self.lambda_ = lambda_

    def act(self, state):


        height = 84
        width = 84
        dim = (width, height)
        res_img = cv2.resize(state, dim, interpolation=cv2.INTER_LINEAR)

        self.display_one(res_img)

        return self.action_space.sample()

    def reset(self):
        pass

    # Display one image
    def display_one(self, a, title1="Original"):
        plt.imshow(a), plt.title(title1)
        plt.xticks([]), plt.yticks([])
        plt.show()

702d5e6bf382017b829310951ca3b668f9394055
<mask token>


class SimpleBreakoutAgent(agent.Agent):
    <mask token>
    <mask token>
    <mask token>

    def display_one(self, a, title1='Original'):
        plt.imshow(a), plt.title(title1)
        plt.xticks([]), plt.yticks([])
        plt.show()

<mask token>


class SimpleBreakoutAgent(agent.Agent):

    def __init__(self, action_space, epsilon=0.1, alpha=0.5, gamma=0.9,
        lambda_=0.7):
        super(SimpleBreakoutAgent, self).__init__(action_space)
        self.epsilon = epsilon
        self.alpha = alpha
        self.gamma = gamma
        self.lambda_ = lambda_
    <mask token>

    def reset(self):
        pass

    def display_one(self, a, title1='Original'):
        plt.imshow(a), plt.title(title1)
        plt.xticks([]), plt.yticks([])
        plt.show()

<mask token>


class SimpleBreakoutAgent(agent.Agent):

    def __init__(self, action_space, epsilon=0.1, alpha=0.5, gamma=0.9,
        lambda_=0.7):
        super(SimpleBreakoutAgent, self).__init__(action_space)
        self.epsilon = epsilon
        self.alpha = alpha
        self.gamma = gamma
        self.lambda_ = lambda_

    def act(self, state):
        height = 84
        width = 84
        dim = width, height
        res_img = cv2.resize(state, dim, interpolation=cv2.INTER_LINEAR)
        self.display_one(res_img)
        return self.action_space.sample()

    def reset(self):
        pass

    def display_one(self, a, title1='Original'):
        plt.imshow(a), plt.title(title1)
        plt.xticks([]), plt.yticks([])
        plt.show()

from sources import agent
import matplotlib.pyplot as plt
import cv2


class SimpleBreakoutAgent(agent.Agent):

    def __init__(self, action_space, epsilon=0.1, alpha=0.5, gamma=0.9,
        lambda_=0.7):
        super(SimpleBreakoutAgent, self).__init__(action_space)
        self.epsilon = epsilon
        self.alpha = alpha
        self.gamma = gamma
        self.lambda_ = lambda_

    def act(self, state):
        height = 84
        width = 84
        dim = width, height
        res_img = cv2.resize(state, dim, interpolation=cv2.INTER_LINEAR)
        self.display_one(res_img)
        return self.action_space.sample()

    def reset(self):
        pass

    def display_one(self, a, title1='Original'):
        plt.imshow(a), plt.title(title1)
        plt.xticks([]), plt.yticks([])
        plt.show()

from sources import agent
import matplotlib.pyplot as plt
import cv2


class SimpleBreakoutAgent(agent.Agent):

    def __init__(self, action_space, epsilon=0.1, alpha=0.5, gamma=0.9, lambda_=0.7):
        super(SimpleBreakoutAgent, self).__init__(action_space)

        self.epsilon = epsilon
        self.alpha = alpha
        self.gamma = gamma
        self.lambda_ = lambda_

    def act(self, state):


        height = 84
        width = 84
        dim = (width, height)
        res_img = cv2.resize(state, dim, interpolation=cv2.INTER_LINEAR)

        self.display_one(res_img)

        return self.action_space.sample()

    def reset(self):
        pass

    # Display one image
    def display_one(self, a, title1="Original"):
        plt.imshow(a), plt.title(title1)
        plt.xticks([]), plt.yticks([])
        plt.show()
