Final ver.0.1
This commit is contained in:
parent
03d74b5aee
commit
3e69124248
@ -5,7 +5,7 @@ class genetic:
|
|||||||
def __init__(self, chrome):
|
def __init__(self, chrome):
|
||||||
self.chrome = chrome
|
self.chrome = chrome
|
||||||
self.key = 10
|
self.key = 10
|
||||||
self.pop_size = 50
|
self.pop_size = 500
|
||||||
self.gen_max = 20
|
self.gen_max = 20
|
||||||
self.length = len(chrome) - 1
|
self.length = len(chrome) - 1
|
||||||
self.div = self.length // 2
|
self.div = self.length // 2
|
||||||
|
6
main.py
6
main.py
@ -1,8 +1,6 @@
|
|||||||
# from collections import deque
|
# from collections import deque
|
||||||
from queue import PriorityQueue
|
from queue import PriorityQueue
|
||||||
|
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
|
|
||||||
from neural import *
|
from neural import *
|
||||||
from path_algorithms.a_star import a_star
|
from path_algorithms.a_star import a_star
|
||||||
# from path_algorithms.bfs import bfs
|
# from path_algorithms.bfs import bfs
|
||||||
@ -57,8 +55,8 @@ for i in range(15):
|
|||||||
rubbish_list.append(Rubbish(screen, j * 60, i * 60))
|
rubbish_list.append(Rubbish(screen, j * 60, i * 60))
|
||||||
|
|
||||||
path = []
|
path = []
|
||||||
X,y = create_training_data()
|
x, y = create_training_data()
|
||||||
model = learn_neural_network(X,y)
|
model = learn_neural_network(x, y)
|
||||||
|
|
||||||
gen = [(truck.y / 60, truck.x / 60)]
|
gen = [(truck.y / 60, truck.x / 60)]
|
||||||
fl = 0
|
fl = 0
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import math
|
import math
|
||||||
import os
|
import os
|
||||||
import cv2
|
import cv2
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from keras.layers import Conv2D, MaxPooling2D
|
from keras.layers import Conv2D, MaxPooling2D
|
||||||
from keras.layers import Dense, Activation, Flatten
|
from keras.layers import Dense, Activation, Flatten
|
||||||
|
BIN
trash.xlsx
BIN
trash.xlsx
Binary file not shown.
Loading…
Reference in New Issue
Block a user