Icon representing a recipe

Recipe: 835_Bruteforce_AA's

created by robgee

Profile


Name
835_Bruteforce_AA's
ID
47884
Shared with
Public
Parent
None
Children
Created on
January 22, 2014 at 23:50 PM UTC
Updated on
January 22, 2014 at 23:50 PM UTC
Description

BruteForces 1331 hydrophobic AA combinations for puzzle 835

Best for


Code


--Bruteforce Hydrophobic AA's - code by robgee --For puzzle 835 only. --Tries all 1331 combinations of hydrophobic AminoAcids(AA). --Uses recent best to store best combination. -- takes @10mins to run on 2yr old laptop. -- Table of hydrophobicAA's ================ aaList= { 'g','a','c','v','l','i','m','p','f','y','w' } --========================================== print("hello") print("Bruteforcing hydrophobic AA combinations") print("When counter reaches 11 it's nearly finished") numSegs=structure.GetCount() print("Protein length",numSegs) if numSegs~=309 then print("Error: This works only on puzzle 835") end recentbest.Save() for k=1, #aaList do local i307=aaList[k]; structure.SetAminoAcid(307, i307) print("s307",k,i307) --====================================== for k1=1,#aaList do local i308=aaList[k1]; structure.SetAminoAcid(308, i308) --print("i308",i308) --============================================ for k2=1, #aaList do local i309=aaList[k2]; structure.SetAminoAcid(309, i309) --print(i309,current.GetScore()) end --============================================= end end recentbest.Restore() print("Finished") -- end of recipe

Comments


robgee Lv 1

For puzzle 835 only.
Tries all 11 hydrophobic AminoAcids for all 3 segments, 1331 permutations.
It just does a straight swap, no shake nor wiggle.
Only uses save/restore recent best.
It is a bit brutal.
Takes @10mins on a cpu with 2670 rating on cpubenchmark.