Fully autonomous maybe a couple more tweaks left

This commit is contained in:
2024-10-10 08:08:52 -04:00
parent 8c977a3e58
commit 1722272b79

View File

@@ -202,6 +202,10 @@ func Circling():
print(Individual_Steps)
Cicling = false
print("Circling is false!!!!")
for ints in CircleIntsMax+1:
Tree_Array.pop_back()
Tree_Array[-1] -= 1
print(Tree_Array)
if CircleInts != 0:
print("Go back to circle part :(")
@@ -214,7 +218,7 @@ func HowManyIntsInCircle():
CircleIntsMax = Intersections.size() - (Intersections.find(Current_Position)+1)
CircleInts = CircleIntsMax
for n in CircleInts:
if Tree_Array[-(n+1)] == 1:
if Tree_Array[-(n+1)] == 1:
CircleInts -= 1
print(CircleInts)
@@ -229,8 +233,10 @@ func FirstCirclePart():
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")
Skip()
@@ -299,6 +305,9 @@ func FinishCircling():
GoBack(Individual_Steps[0])
Individual_Steps.pop_front()
print(Individual_Steps)
for ints in CircleIntsMax+1:
Tree_Array.pop_back()
Tree_Array[-1] -= 1
else:
print("Its Off the Root!!!")
Cicling = false
@@ -308,6 +317,10 @@ func FinishCircling():
Individual_Steps.pop_front()
print("Its On the Root!!!")
print(Individual_Steps)
for ints in CircleIntsMax+1:
Tree_Array.pop_back()
Tree_Array[-1] -= 1
print(Tree_Array)
Move_Check10 = move
func DeadEndCircles():
@@ -520,6 +533,7 @@ func AutoSolve():
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]]]
for n in DirectionStrengths.size():
var MoveScore = DumpDuplicate.rfind(DirArray[n])
if Colliders[n] == true:
@@ -542,10 +556,12 @@ func AutoSolve():
#print(Set)
if IntOptions[Set].find(DirArray[n]) == -1:
DirectionStrengths[n] -= 1000
for i in OptionArrays:
if Intersections.find(i) != -1:
DirectionStrengths[n] -= 100
if Cicling == true:
print("ITS CIRCLING DO SOME MODS")
print(IntOptions )
AutoBacktrack = false
var HighestPoints = DirectionStrengths.find(max(DirectionStrengths[0],DirectionStrengths[1],DirectionStrengths[2],DirectionStrengths[3]))
print(DirectionStrengths)