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)
|
||||
var arr1 = [['apple', 'orange', 'banana', 'pear', 'fish', 'pancake', 'taco', 'pizza'],['banana', 'pizza', 'fish', 'apple'],['taco', 'fish', 'apple', 'pizza']]
|
||||
var arr2 = AllSetsToGoal
|
||||
CommonsSort(arr2)
|
||||
CommonsSort(arr1)
|
||||
|
||||
func _process(delta):
|
||||
FoundGoal()
|
||||
@@ -185,8 +185,6 @@ func AllObjectsFound():
|
||||
|
||||
#print(InstancesDict)
|
||||
MakeDescision(0)
|
||||
MakeDescision(1)
|
||||
MakeDescision(2)
|
||||
Move_Check1 = move
|
||||
|
||||
func MakeDescision(marker):
|
||||
@@ -195,6 +193,7 @@ func MakeDescision(marker):
|
||||
for n in AllSetsToGoal:
|
||||
if Keys.find(AllSetsToGoal.find(n)) != -1 or RouteCounter == 0:
|
||||
Arrays.push_back(n[marker])
|
||||
print()
|
||||
|
||||
BestFirst = SmallInstances(Arrays)
|
||||
var Theindex = BestFirst.values().find(BestFirst.values().max())
|
||||
@@ -203,12 +202,37 @@ func MakeDescision(marker):
|
||||
for n in AllSetsToGoal:
|
||||
if n.find(BestFirst.keys()[Theindex]) != -1:
|
||||
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)
|
||||
var Temp = AllSetsToGoal
|
||||
CommonsSort(Temp)
|
||||
var 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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user