Profile


Name
m_s_ws_x10_wa
ID
103898
Shared with
Public
Parent
None
Children
Created on
April 07, 2022 at 17:35 PM UTC
Updated on
April 07, 2022 at 17:35 PM UTC
Description

after first design

Best for


Code


--m, s, ws, m, s, ws, m, wa recentbest.Save( ) recipe.ReportStatus() function Soft() for i = 1, 10 do print("Loop "..i) print(i..") Mutate 1 iteration") structure.MutateSidechainsAll(1) recentbest.Restore () print("Score: "..current.GetEnergyScore()) print(i..") Shake 1 iteration") structure.ShakeSidechainsAll(1) recentbest.Restore () print("Score: "..current.GetEnergyScore()) print(i..") Wiggle sidechains 1 iteration") structure.WiggleAll(1,false,true) -- ws recentbest.Restore () BestScore=current.GetEnergyScore() print("Score: "..BestScore) recipe.ReportStatus() BestFilter=filter.GetBonusTotal() print("Total Bonus =" ..BestFilter) --Total bonus score of the filters print("#################") save.Quicksave(3) end end function Hard() save.Quickload(3) print("Wiggle sidechains 25 iterations") structure.WiggleAll(25,false,true) -- ws recentbest.Restore () print("Score: "..current.GetEnergyScore()) recentbest.Save( ) -- from here it's disturbing print("Wiggle all 1 iteration") structure.WiggleAll (1) recentbest.Restore () print("Score: "..current.GetEnergyScore()) print("Wiggle all 1 iteration") structure.WiggleAll (1) recentbest.Restore () print("Score: "..current.GetEnergyScore()) print("Wiggle all 1 iteration") structure.WiggleAll (1) recentbest.Restore () SaveBest() print("Wiggle all 25 iteration") structure.WiggleAll (25) recentbest.Restore () print("Restoring recent best") SaveBest() recipe.ReportStatus() print("End of recipe. Thanks for reading ;)") end function SaveBest() CurrentBonus=filter.GetBonusTotal() print("Score: "..current.GetEnergyScore()) if CurrentBonus < BestFilter then save.Quickload(3) end save.Quicksave(3) end function MAIN() for i=4,4 do Soft() save.Quicksave(i) Hard() end end function DumpErr() for i=4,4 do save.Quickload(i) end save.Quickload(3) end xpcall(MAIN, DumpErr)

Comments


Bruno Kestemont Lv 1

Does 10 times the following loop:

Mutate (1), restore best
Shake(1), restore best
Wiggle sidechains(1), restore best

===> I interrupt it when coming back to this client for further hand design.

After the 10 loops, it wiggles all(1) several times, then (25). You can easilly undo this last operation (because it could have broken your design).

Basic code:

recentbest.Save( )
for i = 1, 10 do
structure.MutateSidechainsAll(1)
recentbest.Restore ()
structure.ShakeSidechainsAll(1)
recentbest.Restore ()
structure.WiggleAll(1,false,true) – ws
recentbest.Restore ()
end

structure.WiggleAll(25,false,true) – ws
recentbest.Restore ()
recentbest.Save( )
structure.WiggleAll (1)
recentbest.Restore ()
structure.WiggleAll (1)
recentbest.Restore ()
structure.WiggleAll (1)
recentbest.Restore ()
structure.WiggleAll (25)
recentbest.Restore ()