import tensorflow as tf
import prettytensor as pt
import gym
import numpy as np
import csv
import os
import random

from collections import deque
from agents import ddpg, spaces, replay_buffer

envName = 'Pendulum-v0'
solvedThreshold = -195.0 # over 100 consecutive trials
env = gym.make(envName)

print("[DDPG-Agent-Tester] Observation space type: " + str(type(env.observation_space)))
print("[DDPG-Agent-Tester] Action space type: " + str(type(env.action_space)))

inputShape = [ None, spaces.get_input_size(env.observation_space) ]
outputSize = spaces.get_continuous_output_size(env.action_space)
outputShape = [None, outputSize]

print("[DDPG-Agent-Tester] Observation space shape: " + str(inputShape))
print("[DDPG-Agent-Tester] Output shape: " + str(outputShape))

render_frequency = 0 # set to 0 to disable rendering