maxX = window_width
maxY = window_height

defs_.pygame.init()
clock = pygame.time.Clock()
win = pygame.display.set_mode((window_width, window_height))
defs_.pygame.display.set_caption("BumbleBeeN'TheHood")
FPS = 30

#file_json = 'Generations_data.json'
file_json = 'Generations_data_double_trapezoid_1.json'


hidden_neurons = 24
NN = defs_.RecurrentNeuralNetwork(12, 2, 12)
start_point = defs_.Point(100, 100)
robot = defs_.Robot(start_point, 25, 1, 12, 50, 10, 1, hidden_neurons)
robot.create_adjust_sensors()

#Reading the data from json, 90th generation Best fitness
chromosome = defs_.read_weights_from_json(file_json, 23, 1)
robot.NN.update_weights(chromosome)


layout = 'double box'

walls = defs_.Layout(layout)
dust = defs_.Dust(150, maxX, maxY, 8, win)

run = True
while run:
import Definitions as defs_
from Definitions import pygame, Point, Wall, Robot, redrawGameWindow

window_width = 800
window_height = 600

pygame.init()
win = pygame.display.set_mode((window_width, window_height))
pygame.display.set_caption("BumbleBeeN'TheHood")
clock = pygame.time.Clock()
FPS = 120

start_point = defs_.Point(100, 100)
robot = Robot(start_point, 30, 1, 12, 80, 0, 1)
robot.create_adjust_sensors()

wall_right = Wall(Point(750, 50), Point(750, 550))
wall_left = Wall(Point(50, 50), Point(50, 550))
wall_top = Wall(Point(50, 50), Point(750, 50))
wall_bottom = Wall(Point(50, 550), Point(750, 550))

walls = [wall_right, wall_left, wall_top, wall_bottom]

run = True
while run:

    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()

    keys = pygame.key.get_pressed()