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:
window_height = 600

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'

NN = defs_.RecurrentNeuralNetwork(12, 2, 12)
start_point = defs_.Point(100, 100)
robot = defs_.Robot(start_point, 30, 1, 12, 80, 10, 1, NN)
robot.create_adjust_sensors()

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

layout = 'box'

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

run = True
while run:

    for event in pygame.event.get():