I figured out the random Dictionary error. PLEASE FIX THE FORMATTING FOR THE ALL SETS TO GOAL ARRAY. After that we are pretty much set. Use the Key array that I convieniently set up that I forgot to use. :( Not alot of progress but I made a blank set for tmr
This commit is contained in:
@@ -111,7 +111,7 @@ func _input(event):
|
|||||||
print(Current_Position)
|
print(Current_Position)
|
||||||
var arr1 = [['apple', 'orange', 'banana', 'pear', 'fish', 'pancake', 'taco', 'pizza'],['banana', 'pizza', 'fish', 'apple'],['taco', 'fish', 'apple', 'pizza']]
|
var arr1 = [['apple', 'orange', 'banana', 'pear', 'fish', 'pancake', 'taco', 'pizza'],['banana', 'pizza', 'fish', 'apple'],['taco', 'fish', 'apple', 'pizza']]
|
||||||
var arr2 = AllSetsToGoal
|
var arr2 = AllSetsToGoal
|
||||||
CommonsSort(arr2)
|
CommonsSort(arr1)
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
FoundGoal()
|
FoundGoal()
|
||||||
@@ -185,8 +185,6 @@ func AllObjectsFound():
|
|||||||
|
|
||||||
#print(InstancesDict)
|
#print(InstancesDict)
|
||||||
MakeDescision(0)
|
MakeDescision(0)
|
||||||
MakeDescision(1)
|
|
||||||
MakeDescision(2)
|
|
||||||
Move_Check1 = move
|
Move_Check1 = move
|
||||||
|
|
||||||
func MakeDescision(marker):
|
func MakeDescision(marker):
|
||||||
@@ -195,6 +193,7 @@ func MakeDescision(marker):
|
|||||||
for n in AllSetsToGoal:
|
for n in AllSetsToGoal:
|
||||||
if Keys.find(AllSetsToGoal.find(n)) != -1 or RouteCounter == 0:
|
if Keys.find(AllSetsToGoal.find(n)) != -1 or RouteCounter == 0:
|
||||||
Arrays.push_back(n[marker])
|
Arrays.push_back(n[marker])
|
||||||
|
print()
|
||||||
|
|
||||||
BestFirst = SmallInstances(Arrays)
|
BestFirst = SmallInstances(Arrays)
|
||||||
var Theindex = BestFirst.values().find(BestFirst.values().max())
|
var Theindex = BestFirst.values().find(BestFirst.values().max())
|
||||||
@@ -203,12 +202,37 @@ func MakeDescision(marker):
|
|||||||
for n in AllSetsToGoal:
|
for n in AllSetsToGoal:
|
||||||
if n.find(BestFirst.keys()[Theindex]) != -1:
|
if n.find(BestFirst.keys()[Theindex]) != -1:
|
||||||
Keys.push_back(AllSetsToGoal.find(n))
|
Keys.push_back(AllSetsToGoal.find(n))
|
||||||
print(Keys)
|
|
||||||
print("My decision is: ",Decision)
|
|
||||||
RGoBack(Decision)
|
|
||||||
|
#if RouteCounter == 0 or #If what im modifiying is in AllsetsToGo[Keys]
|
||||||
|
print(CommonsSort(AllSetsToGoal))
|
||||||
print(AllSetsToGoal)
|
print(AllSetsToGoal)
|
||||||
var Temp = AllSetsToGoal
|
var Temp = []
|
||||||
CommonsSort(Temp)
|
for n in AllSetsToGoal.size():
|
||||||
|
Temp.append_array(AllSetsToGoal[n])
|
||||||
|
print(Temp)
|
||||||
|
print(CommonsSort)
|
||||||
|
|
||||||
|
|
||||||
|
#var Temp = []
|
||||||
|
#CommonsSort(Temp)
|
||||||
|
#if InstancesDict.get(Decision) <= 1:
|
||||||
|
# print("THIS DECISION IS UNIQUE")
|
||||||
|
# print(CommonsSort(AllSetsToGoal))
|
||||||
|
# for n in AllSetsToGoal.size():
|
||||||
|
# Temp.append_array(AllSetsToGoal[n])
|
||||||
|
# print(Temp)
|
||||||
|
# CommonsSort(AllSetsToGoal)
|
||||||
|
# CommonsSort(Temp)
|
||||||
|
#else:
|
||||||
|
# print("THIS ISNT COMMON ")
|
||||||
|
# CommonsSort(AllSetsToGoal)
|
||||||
|
|
||||||
|
RGoBack(Decision)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RouteCounter += 1
|
RouteCounter += 1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user