Fully autonomous maybe a couple more tweaks left
This commit is contained in:
@@ -202,6 +202,10 @@ func Circling():
|
|||||||
print(Individual_Steps)
|
print(Individual_Steps)
|
||||||
Cicling = false
|
Cicling = false
|
||||||
print("Circling is false!!!!")
|
print("Circling is false!!!!")
|
||||||
|
for ints in CircleIntsMax+1:
|
||||||
|
Tree_Array.pop_back()
|
||||||
|
Tree_Array[-1] -= 1
|
||||||
|
print(Tree_Array)
|
||||||
|
|
||||||
if CircleInts != 0:
|
if CircleInts != 0:
|
||||||
print("Go back to circle part :(")
|
print("Go back to circle part :(")
|
||||||
@@ -214,7 +218,7 @@ func HowManyIntsInCircle():
|
|||||||
CircleIntsMax = Intersections.size() - (Intersections.find(Current_Position)+1)
|
CircleIntsMax = Intersections.size() - (Intersections.find(Current_Position)+1)
|
||||||
CircleInts = CircleIntsMax
|
CircleInts = CircleIntsMax
|
||||||
for n in CircleInts:
|
for n in CircleInts:
|
||||||
if Tree_Array[-(n+1)] == 1:
|
if Tree_Array[-(n+1)] == 1:
|
||||||
CircleInts -= 1
|
CircleInts -= 1
|
||||||
print(CircleInts)
|
print(CircleInts)
|
||||||
|
|
||||||
@@ -229,8 +233,10 @@ func FirstCirclePart():
|
|||||||
|
|
||||||
|
|
||||||
print("This is X: ",Skipping_array[0])
|
print("This is X: ",Skipping_array[0])
|
||||||
|
print(Tree_Array)
|
||||||
|
#print("The tree array at last int is: ",Tree_Array[Skipping_array[0]])
|
||||||
|
|
||||||
if Tree_Array[Skipping_array[0]] == 1:
|
if Tree_Array[Tree_Array.size() - 1] == 1: #Tree_Array[Skipping_array[0]] == 1:
|
||||||
print("Skip")
|
print("Skip")
|
||||||
Skip()
|
Skip()
|
||||||
|
|
||||||
@@ -299,6 +305,9 @@ func FinishCircling():
|
|||||||
GoBack(Individual_Steps[0])
|
GoBack(Individual_Steps[0])
|
||||||
Individual_Steps.pop_front()
|
Individual_Steps.pop_front()
|
||||||
print(Individual_Steps)
|
print(Individual_Steps)
|
||||||
|
for ints in CircleIntsMax+1:
|
||||||
|
Tree_Array.pop_back()
|
||||||
|
Tree_Array[-1] -= 1
|
||||||
else:
|
else:
|
||||||
print("Its Off the Root!!!")
|
print("Its Off the Root!!!")
|
||||||
Cicling = false
|
Cicling = false
|
||||||
@@ -308,6 +317,10 @@ func FinishCircling():
|
|||||||
Individual_Steps.pop_front()
|
Individual_Steps.pop_front()
|
||||||
print("Its On the Root!!!")
|
print("Its On the Root!!!")
|
||||||
print(Individual_Steps)
|
print(Individual_Steps)
|
||||||
|
for ints in CircleIntsMax+1:
|
||||||
|
Tree_Array.pop_back()
|
||||||
|
Tree_Array[-1] -= 1
|
||||||
|
print(Tree_Array)
|
||||||
Move_Check10 = move
|
Move_Check10 = move
|
||||||
|
|
||||||
func DeadEndCircles():
|
func DeadEndCircles():
|
||||||
@@ -520,6 +533,7 @@ func AutoSolve():
|
|||||||
var cp = Current_Position
|
var cp = Current_Position
|
||||||
var OptionArrays = [[cp[0],cp[1]+1],[cp[0],cp[1]-1],[cp[0]+1,cp[1]],[cp[0]-1,cp[1]]]
|
var OptionArrays = [[cp[0],cp[1]+1],[cp[0],cp[1]-1],[cp[0]+1,cp[1]],[cp[0]-1,cp[1]]]
|
||||||
|
|
||||||
|
|
||||||
for n in DirectionStrengths.size():
|
for n in DirectionStrengths.size():
|
||||||
var MoveScore = DumpDuplicate.rfind(DirArray[n])
|
var MoveScore = DumpDuplicate.rfind(DirArray[n])
|
||||||
if Colliders[n] == true:
|
if Colliders[n] == true:
|
||||||
@@ -542,10 +556,12 @@ func AutoSolve():
|
|||||||
#print(Set)
|
#print(Set)
|
||||||
if IntOptions[Set].find(DirArray[n]) == -1:
|
if IntOptions[Set].find(DirArray[n]) == -1:
|
||||||
DirectionStrengths[n] -= 1000
|
DirectionStrengths[n] -= 1000
|
||||||
|
|
||||||
for i in OptionArrays:
|
for i in OptionArrays:
|
||||||
if Intersections.find(i) != -1:
|
if Intersections.find(i) != -1:
|
||||||
DirectionStrengths[n] -= 100
|
DirectionStrengths[n] -= 100
|
||||||
|
if Cicling == true:
|
||||||
|
print("ITS CIRCLING DO SOME MODS")
|
||||||
|
print(IntOptions )
|
||||||
AutoBacktrack = false
|
AutoBacktrack = false
|
||||||
var HighestPoints = DirectionStrengths.find(max(DirectionStrengths[0],DirectionStrengths[1],DirectionStrengths[2],DirectionStrengths[3]))
|
var HighestPoints = DirectionStrengths.find(max(DirectionStrengths[0],DirectionStrengths[1],DirectionStrengths[2],DirectionStrengths[3]))
|
||||||
print(DirectionStrengths)
|
print(DirectionStrengths)
|
||||||
|
|||||||
Reference in New Issue
Block a user