Author | Alphazone |
Submission date | 2018-07-11 21:17:43.572490 |
Rating | 4047 |
Matches played | 299 |
Win rate | 39.8 |
Use rpsrunner.py to play unranked matches on your computer.
if input == "":
import random
import uuid
import pickle
if not 'vms' in globals():
global vms
vms = [
b'(dp0\nVdp\np1\nL0L\nsVd\np2\n(lp3\nL0L\naL1L\naL2L\naL-1L\naL1L\naL2L\naL1L\naL2L\naL2L\naL1L\nasVp\np4\n(lp5\n(lp6\nF0.007598132173168996\naF0.1639299629361271\naF0.18527009316812468\naF0.27124167479267625\naF0.26268294857235425\naF0.10927718835754877\naa(lp7\nF0.003075065518322311\naF0.30505406054092477\naF0.01596884412355095\naF0.04085833817765401\naF0.5047117019163497\naF0.13033198972319818\naa(lp8\nF0.30111720914803003\naF0.04723609470336113\naF0.1134391745039342\naF0.24571891487173034\naF0.055472292704482354\naF0.23701631406846196\naa(lp9\nF0.03630599385983669\naF0.2543142769581015\naF0.2324497602102061\naF0.21637991377602733\naF0.025316663204015127\naF0.2352333919918132\naa(lp10\nF0.06440674892109399\naF0.031135582360041807\naF0.2119681076467893\naF0.2702239159525304\naF0.17513512494050792\naF0.24713052017903656\naa(lp11\nF0.011488344563784302\naF0.5075824555396347\naF0.0417106819706731\naF0.1359656308508472\naF0.24528933817737317\naF0.057963548897687484\naa(lp12\nF0.06556372555963957\naF0.06874694686566098\naF0.135881990528177\naF0.23201707267445323\naF0.2722172873211561\naF0.22557297705091298\naa(lp13\nF0.08551131161856083\naF0.22405688039942528\naF0.23730967343307147\naF0.19837159956632328\naF0.053504026379383215\naF0.20124650860323598\naa(lp14\nF0.22241634326293355\naF0.22582389819528423\naF0.1255574872780689\naF0.1968182556613776\naF0.2099529336205877\naF0.019431081981748127\naa(lp15\nF0.05202089447145317\naF0.14808933134589972\naF0.059043385076799196\naF0.16662478025246005\naF0.31646052053083984\naF0.2577610883225482\naasVpc\np16\nL2L\nsVfitness\np17\nL4753721L\nsVid\np18\nccopy_reg\n_reconstructor\np19\n(cuuid\nUUID\np20\nc__builtin__\nobject\np21\nNtp22\nRp23\n(dp24\nVint\np25\nL223890869963842238022541326021257699113L\nsbsVrounds\np26\nL1298700L\nsVscore\np27\nL-58L\nsVmove\np28\nVS\np29\ns.'
,
b'(dp0\nVdp\np1\nL3L\nsVd\np2\n(lp3\nL3L\naL0L\naL1L\naL3L\naL1L\naL-1L\naL-1L\naL1L\naL-1L\naL0L\nasVp\np4\n(lp5\n(lp6\nF0.19617490316293865\naF0.2366199442234759\naF0.2532581179501841\naF0.198620462486161\naF0.01996492214232455\naF0.09536165003491577\naa(lp7\nF0.04888796038268774\naF0.2289189260718326\naF0.14830373490452303\naF0.222905101925952\naF0.07371174350734297\naF0.2772725332076618\naa(lp8\nF0.0826263190458501\naF0.3604270959031146\naF0.03195113079734168\naF0.21482129781405676\naF0.22004630774274328\naF0.09012784869689366\naa(lp9\nF0.20310276111315442\naF0.003149461163495431\naF0.13272588668756963\naF0.06008021769718473\naF0.5096923654089376\naF0.09124930792965816\naa(lp10\nF0.18333273566917935\naF0.14722893193480355\naF0.2605012257936071\naF0.024626374014586793\naF0.27490040769580304\naF0.10941032489202025\naa(lp11\nF0.07310138207435579\naF0.37065101763599645\naF0.32766895495421133\naF0.07193784852298352\naF0.015092643545800337\naF0.1415481532666525\naa(lp12\nF0.12806379649161775\naF0.050728095260197746\naF0.24563793492472513\naF0.1739781071605908\naF0.1628896111616768\naF0.23870245500119167\naa(lp13\nF0.1403789142338942\naF0.1633184016799229\naF0.21527279257285314\naF0.2952456434051669\naF0.10423923431881532\naF0.0815450137893475\naa(lp14\nF0.2631504955100622\naF0.03451568947426313\naF0.1588291326266173\naF0.15960713786740385\naF0.21821972156568983\naF0.16567782295596375\naa(lp15\nF0.12133981398307088\naF0.0077532695600361435\naF0.21851273862990717\naF0.11172919374283836\naF0.21831357053528624\naF0.32235141354886115\naasVpc\np16\nL8L\nsVfitness\np17\nL1735217L\nsVid\np18\nccopy_reg\n_reconstructor\np19\n(cuuid\nUUID\np20\nc__builtin__\nobject\np21\nNtp22\nRp23\n(dp24\nVint\np25\nL304857295070134895355687004601375515449L\nsbsVrounds\np26\nL1348650L\nsVscore\np27\nL-51L\nsVmove\np28\nVS\np29\ns.'
,
b'(dp0\nVdp\np1\nL0L\nsVd\np2\n(lp3\nL2L\naL0L\naL0L\naL1L\naL2L\naL1L\naL1L\naL-1L\naL-2L\naL1L\nasVp\np4\n(lp5\n(lp6\nF0.012130907278251517\naF0.23142487773556802\naF0.1010509038096468\naF0.14620307561049375\naF0.2032450965801463\naF0.3059451389858936\naa(lp7\nF0.03176700695959705\naF0.5353646444943054\naF0.06248413011226338\naF0.035603000370143224\naF0.3306922277239887\naF0.004088990339702206\naa(lp8\nF0.21502132338108762\naF0.18280577660075806\naF0.06800424675425068\naF0.19304188097831085\naF0.20732922416946734\naF0.13379754811612557\naa(lp9\nF0.17441334481369467\naF0.2910273164940096\naF0.2430257139793874\naF0.023193083387182917\naF0.14713547500514518\naF0.1212050663205802\naa(lp10\nF0.0029270362624564256\naF0.3223631820884723\naF0.10646672385066992\naF0.35793960654693624\naF0.15610395054666784\naF0.05419950070479726\naa(lp11\nF0.04179565530302289\naF0.1666592594009282\naF0.20053566201376988\naF0.1315466331603736\naF0.21122339883906308\naF0.24823939128284234\naa(lp12\nF0.07159187252022749\naF0.010603008998666421\naF0.40871992664511764\naF0.04158095686040824\naF0.1693736599121663\naF0.298130575063414\naa(lp13\nF0.23201275180028694\naF0.14459740531832566\naF0.20751399105864435\naF0.040561688746788935\naF0.18698618163598313\naF0.18832798143997098\naa(lp14\nF0.04368683167235766\naF0.26006151986635506\naF0.36338818465142486\naF0.19778773914872214\naF0.02201056188840157\naF0.11306516277273858\naa(lp15\nF0.18885997308732672\naF0.2656348567489679\naF0.11937287135717653\naF0.1965479674991768\naF0.08322237169682324\naF0.14636195961052864\naasVpc\np16\nL2L\nsVfitness\np17\nL1600537L\nsVid\np18\nccopy_reg\n_reconstructor\np19\n(cuuid\nUUID\np20\nc__builtin__\nobject\np21\nNtp22\nRp23\n(dp24\nVint\np25\nL176039263214461933105144291896638865376L\nsbsVrounds\np26\nL1048950L\nsVscore\np27\nL-47L\nsVmove\np28\nVR\np29\ns.'
,
b'(dp0\nVdp\np1\nL4L\nsVmove\np2\nVS\np3\nsVrounds\np4\nL549450L\nsVd\np5\n(lp6\nL0L\naL-2L\naL-1L\naL0L\naL0L\naL-1L\naL2L\naL2L\naL2L\naL-1L\nasVpc\np7\nL10L\nsVfitness\np8\nL1187770L\nsVid\np9\nccopy_reg\n_reconstructor\np10\n(cuuid\nUUID\np11\nc__builtin__\nobject\np12\nNtp13\nRp14\n(dp15\nVint\np16\nL273780847138666838126181053281978118178L\nsbsVscore\np17\nL-55L\nsVp\np18\n(lp19\n(lp20\nF0.03869056923844952\naF0.26939272515747154\naF0.2515686409503106\naF0.13095856734829348\naF0.1749540299534373\naF0.1344354673520376\naa(lp21\nF0.10882171287892947\naF0.36613867148865054\naF0.24536571633333343\naF0.10964833158234315\naF0.025982532712518457\naF0.14404303500422502\naa(lp22\nF0.06676434992141318\naF0.2427432347104801\naF0.1919485487811557\naF0.04572022552414592\naF0.15130771501279888\naF0.3015159260500062\naa(lp23\nF0.0451663497379812\naF0.26910403435037555\naF0.06782918633788007\naF0.3522864501261744\naF0.09053861515397944\naF0.1750753642936094\naa(lp24\nF0.23886275878515367\naF0.13415662678207332\naF0.02115703667197528\naF0.2827915995372257\naF0.1907782656370308\naF0.13225371258654123\naa(lp25\nF0.30216135324564664\naF0.14533193647342169\naF0.0018921638096669115\naF0.057922638028205554\naF0.03480110631329469\naF0.4578908021297646\naa(lp26\nF0.023500719560586657\naF0.06161010749927367\naF0.15129254196204925\naF0.3347448534516016\naF0.06159060415918295\naF0.3672611733673058\naa(lp27\nF0.022750209613934237\naF0.29270487199338874\naF0.19254557940961592\naF0.19922754715026897\naF0.1512542595672198\naF0.14151753226557232\naa(lp28\nF0.06842407009170226\naF0.04082910743448308\naF0.21886579346404736\naF0.07653272159453742\naF0.4126462508520861\naF0.18270205656314373\naa(lp29\nF0.11651791891426751\naF0.180965648020212\naF0.21285552043036612\naF0.2112059670738635\naF0.14395176248656105\naF0.13450318307472992\naas.'
,
b'(dp0\nVdp\np1\nL8L\nsVmove\np2\nVS\np3\nsVrounds\np4\nL1148850L\nsVd\np5\n(lp6\nL1L\naL3L\naL0L\naL1L\naL0L\naL1L\naL1L\naL0L\naL0L\naL1L\nasVpc\np7\nL1L\nsVfitness\np8\nL1096829L\nsVid\np9\nccopy_reg\n_reconstructor\np10\n(cuuid\nUUID\np11\nc__builtin__\nobject\np12\nNtp13\nRp14\n(dp15\nVint\np16\nL39383446232007637981094120139571570894L\nsbsVscore\np17\nL-60L\nsVp\np18\n(lp19\n(lp20\nF0.09630334530075073\naF0.03026767524191327\naF0.24577790782629505\naF0.12502127002971414\naF0.25598984250922596\naF0.24663995909210087\naa(lp21\nF0.021219458058991676\naF0.33744591689634185\naF0.17411779955602405\naF0.11437275710192146\naF0.18082831998166288\naF0.17201574840505798\naa(lp22\nF0.03682117973515359\naF0.1520040982057627\naF0.143934009239385\naF0.16679751498654002\naF0.3173455234166919\naF0.18309767441646677\naa(lp23\nF0.10595768806584982\naF0.28506918194853054\naF0.17021545047992556\naF0.010770740358102458\naF0.27892318648090797\naF0.14906375266668362\naa(lp24\nF0.16845241508719955\naF0.265812782724296\naF0.18000294544621087\naF0.0636726359908927\naF0.19374146722321386\naF0.128317753528187\naa(lp25\nF0.3188635767364403\naF0.28702861951032277\naF0.0469411231009799\naF0.052944125766426604\naF0.028313343271484288\naF0.26590921161434616\naa(lp26\nF0.12086239253321843\naF0.25892922663140905\naF0.13596378092538933\naF0.03613068556360455\naF0.16575991113439648\naF0.28235400321198206\naa(lp27\nF0.24733144998103776\naF0.15632309145250117\naF0.24298634834331215\naF0.06283733549566053\naF0.1894915819665524\naF0.10103019276093607\naa(lp28\nF0.02748713435687001\naF0.08005793243531398\naF0.3568172702930372\naF0.24190349718499835\naF0.012291888652140546\naF0.28144227707763986\naa(lp29\nF0.09814987418949223\naF0.1370345899702368\naF0.16036649963178262\naF0.2126134079415972\naF0.18930962702842238\naF0.2025260012384687\naas.'
,
b'(dp0\nVdp\np1\nL3L\nsVmove\np2\nVR\np3\nsVrounds\np4\nL949050L\nsVd\np5\n(lp6\nL3L\naL-2L\naL1L\naL2L\naL1L\naL1L\naL0L\naL0L\naL2L\naL2L\nasVpc\np7\nL3L\nsVfitness\np8\nL928292L\nsVid\np9\nccopy_reg\n_reconstructor\np10\n(cuuid\nUUID\np11\nc__builtin__\nobject\np12\nNtp13\nRp14\n(dp15\nVint\np16\nL294602363265160792169829870140328390255L\nsbsVscore\np17\nL-40L\nsVp\np18\n(lp19\n(lp20\nF0.004984413760752561\naF0.0020135210356818163\naF0.2475363556164671\naF0.25540601375530336\naF0.2568269072796238\naF0.23323278855217128\naa(lp21\nF0.008825675146700141\naF0.25534428835119005\naF0.15706269718929164\naF0.23587367026710582\naF0.2040391464379937\naF0.1388545226077186\naa(lp22\nF0.23435166511776573\naF0.09140396956035247\naF0.10907103664070145\naF0.11995339242980751\naF0.37931662269217264\naF0.06590331355920015\naa(lp23\nF0.025249977748761875\naF0.01909441952994604\naF0.25145713112055423\naF0.2584393969303601\naF0.13001666781625712\naF0.31574240685412064\naa(lp24\nF0.2706457396851579\naF0.08962356546696341\naF0.009676011571155581\naF0.06939069176078679\naF0.006539523172550972\naF0.5541244683433854\naa(lp25\nF0.10613401394970534\naF0.2461968701003405\naF0.060029729269484\naF0.301476950066721\naF0.01903352192611722\naF0.26712891468763195\naa(lp26\nF0.04234064543035912\naF0.4144417145685591\naF0.19421857642386073\naF0.13692093329158925\naF0.18888510384339605\naF0.02319302644223574\naa(lp27\nF0.007144079274163096\naF0.2893193643014916\naF0.2280098415013005\naF0.11590052708170294\naF0.146220040342436\naF0.21340614749890596\naa(lp28\nF0.2411102086785195\naF0.1703000849116169\naF0.12149831682120106\naF0.06899820156995623\naF0.19045985907027288\naF0.20763332894843337\naa(lp29\nF0.33200797969071577\naF0.2210396215773272\naF0.20247006349114557\naF0.15300125695491903\naF0.04729504590922754\naF0.044186032376664956\naas.'
,
b'(dp0\nVdp\np1\nL9L\nsVd\np2\n(lp3\nL-4L\naL2L\naL-2L\naL-6L\naL3L\naL-5L\naL-2L\naL0L\naL0L\naL1L\nasVp\np4\n(lp5\n(lp6\nF0.0033393251209420938\naF0.3872969444179862\naF0.27553442136796785\naF0.03699676305940165\naF0.253764829279435\naF0.04306771675426734\naa(lp7\nF0.17821984438363056\naF0.22698275738345394\naF0.07155320587340044\naF0.00843337673805936\naF0.24783539041540703\naF0.2669754252060486\naa(lp8\nF0.01754683535083453\naF0.2616532043767285\naF0.1040944349789506\naF0.21970422337263987\naF0.1284448550680211\naF0.2685564468528255\naa(lp9\nF0.15904808672939597\naF0.3188493010181759\naF0.11583786062320633\naF0.08914192342398183\naF0.2686985040215932\naF0.0484243241836468\naa(lp10\nF0.011660075907398874\naF0.06705256467457936\naF0.009460444778467718\naF0.2815052040564585\naF0.2678560604813212\naF0.36246565010177434\naa(lp11\nF0.06338906866413394\naF0.453598881471393\naF0.0840714945246917\naF0.23358863881721637\naF0.0934001195450847\naF0.07195179697748022\naa(lp12\nF0.07668887926276387\naF0.467860908450534\naF0.12131720569892288\naF0.016400571210321704\naF0.3060021278242278\naF0.011730307553229844\naa(lp13\nF0.06731865066689925\naF0.1965229146092647\naF0.21663094895125576\naF0.13255194530530215\naF0.28542547968382165\naF0.10155006078345646\naa(lp14\nF0.11598221193038023\naF0.10165877719001498\naF0.3694744274115724\naF0.11423671524892182\naF0.17425294082699935\naF0.12439492739211114\naa(lp15\nF0.2959276048294205\naF0.21048396488836213\naF0.22664895508917726\naF0.003002776944948783\naF0.12478779726418868\naF0.13914890098390273\naasVpc\np16\nL5L\nsVfitness\np17\nL921541L\nsVid\np18\nccopy_reg\n_reconstructor\np19\n(cuuid\nUUID\np20\nc__builtin__\nobject\np21\nNtp22\nRp23\n(dp24\nVint\np25\nL330239415319918963223463965196486506158L\nsbsVrounds\np26\nL1748250L\nsVscore\np27\nL-36L\nsVmove\np28\nVP\np29\ns.'
,
b'(dp0\nVdp\np1\nL0L\nsVd\np2\n(lp3\nL1L\naL0L\naL2L\naL0L\naL1L\naL1L\naL-1L\naL1L\naL-1L\naL2L\nasVp\np4\n(lp5\n(lp6\nF0.1438717109557583\naF0.007207183568957411\naF0.22101161148871262\naF0.2084838990310899\naF0.24670263642395077\naF0.17272295853153097\naa(lp7\nF0.05179615870036282\naF0.4244399642603593\naF0.11768337040288337\naF0.10321982124558905\naF0.24226238095064273\naF0.06059830444016298\naa(lp8\nF0.2493403755209552\naF0.11587341736123553\naF0.03763092204061284\naF0.1752907010425758\naF0.23657447742990081\naF0.18529010660471976\naa(lp9\nF0.030885602476090967\naF0.009989151489450912\naF0.3242795250669156\naF0.28044317757062964\naF0.026691253521560574\naF0.3277112898753523\naa(lp10\nF0.025443091238446194\naF0.33702626967519356\naF0.0675164278787266\naF0.3685896002134526\naF0.03864817109819923\naF0.16277643989598192\naa(lp11\nF0.18675603524714138\naF0.011130617855247611\naF0.16694655412738874\naF0.18837712711849822\naF0.24656155701535834\naF0.20022810863636573\naa(lp12\nF0.027836846099972837\naF0.4252785389273156\naF0.08241095398049786\naF0.23710595104225118\naF0.192091482632141\naF0.03527622731782133\naa(lp13\nF0.09833544781059274\naF0.2590301647375543\naF0.1909500618364014\naF0.09453570991725896\naF0.1765500465694998\naF0.1805985691286928\naa(lp14\nF0.3104442134832067\naF0.12902489029386024\naF0.03862065684491088\naF0.053624399186330995\naF0.3034413734735854\naF0.16484446671810574\naa(lp15\nF0.12187746105857702\naF0.31985548060020275\naF0.30038244317889706\naF0.03139897745734666\naF0.12149308985717111\naF0.10499254784780526\naasVpc\np16\nL1L\nsVfitness\np17\nL728764L\nsVid\np18\nccopy_reg\n_reconstructor\np19\n(cuuid\nUUID\np20\nc__builtin__\nobject\np21\nNtp22\nRp23\n(dp24\nVint\np25\nL285495547666413783766632682476277350050L\nsbsVrounds\np26\nL1248750L\nsVscore\np27\nL-26L\nsVmove\np28\nVP\np29\ns.'
,
b'(dp0\nVdp\np1\nL9L\nsVd\np2\n(lp3\nL0L\naL0L\naL-2L\naL0L\naL1L\naL-2L\naL0L\naL0L\naL0L\naL-1L\nasVp\np4\n(lp5\n(lp6\nF0.0177937047599661\naF0.2512108379533254\naF0.3076474520393564\naF0.18352318874330875\naF0.19720066524353191\naF0.04262415126051138\naa(lp7\nF0.03840149243479269\naF0.1842934158030709\naF0.3741657392085447\naF0.13535405733756578\naF0.2523470327410752\naF0.015438262474950845\naa(lp8\nF0.05714344359609315\naF0.05215132334741599\naF0.026492019126045974\naF0.15580904330065073\naF0.393549969958766\naF0.31485420067102804\naa(lp9\nF0.04760967214851322\naF0.3114840378854092\naF0.09349125248660874\naF0.18286481233380375\naF0.041277513243312414\naF0.3232727119023527\naa(lp10\nF0.09274870124278337\naF0.2515593667292361\naF0.3368022490274929\naF0.0384052854574113\naF0.23695013704064607\naF0.04353426050243025\naa(lp11\nF0.11989062275365626\naF0.019434858819243856\naF0.23768489985455163\naF0.1650734430477189\naF0.436580963695484\naF0.021335211829345214\naa(lp12\nF0.12259857166153042\naF0.24784805637160628\naF0.2562942530994626\naF0.0954212579762519\naF0.0945755240179488\naF0.18326233687320023\naa(lp13\nF0.21480304514565118\naF0.14707315811680913\naF0.2645545222664652\naF0.1097537150746313\naF0.0404245470684139\naF0.22339101232802927\naa(lp14\nF0.15506354958274096\naF0.27465181342878464\naF0.23820313958561806\naF0.07880953288840968\naF0.09749726532777936\naF0.15577469918666736\naa(lp15\nF0.13246780365593688\naF0.20132606816011117\naF0.29685122699028266\naF0.27667429830228696\naF0.0531423715721144\naF0.039538231319267876\naasVpc\np16\nL6L\nsVfitness\np17\nL617382L\nsVid\np18\nccopy_reg\n_reconstructor\np19\n(cuuid\nUUID\np20\nc__builtin__\nobject\np21\nNtp22\nRp23\n(dp24\nVint\np25\nL152722361756914050038240039083252418285L\nsbsVrounds\np26\nL299700L\nsVscore\np27\nL-15L\nsVmove\np28\nVR\np29\ns.'
,
b'(dp0\nVdp\np1\nL3L\nsVmove\np2\nVP\np3\nsVrounds\np4\nL399600L\nsVd\np5\n(lp6\nL-1L\naL0L\naL0L\naL-2L\naL-1L\naL3L\naL0L\naL1L\naL0L\naL0L\nasVpc\np7\nL10L\nsVfitness\np8\nL573134L\nsVid\np9\nccopy_reg\n_reconstructor\np10\n(cuuid\nUUID\np11\nc__builtin__\nobject\np12\nNtp13\nRp14\n(dp15\nVint\np16\nL163098905803660299072166374878384164051L\nsbsVscore\np17\nL-101L\nsVp\np18\n(lp19\n(lp20\nF0.07746606635181358\naF0.02042425631829862\naF0.13908044297574124\naF0.34615716142794944\naF0.28989515692374435\naF0.12697691600245292\naa(lp21\nF0.01422388135970141\naF0.17328327496019386\naF0.20757305203384013\naF0.2321758480434326\naF0.15194068601129354\naF0.22080325759153843\naa(lp22\nF0.03663128948598575\naF0.25587619013996726\naF0.13242086132491945\naF0.09308973263278071\naF0.23156246380397524\naF0.2504194626123718\naa(lp23\nF0.02244516787819729\naF0.17273129966635353\naF0.11502570542480713\naF0.0789614851959019\naF0.29454371325533657\naF0.3162926285794036\naa(lp24\nF0.015877650580235558\naF0.45943112128612573\naF0.02522333410530838\naF0.08442343696243708\naF0.16263748620663093\naF0.2524069708592624\naa(lp25\nF0.35507317079904954\naF0.09781195859212495\naF0.07815257608838838\naF0.1367028729037123\naF0.3073077655414571\naF0.024951656075267586\naa(lp26\nF0.1709464652088848\naF0.36804703453440685\naF0.06190627741450887\naF0.15389592158265814\naF0.005397937895839218\naF0.23980636336370215\naa(lp27\nF0.28914458847450536\naF0.3311180929572336\naF0.19833991909997542\naF0.06939618994141834\naF0.08766080611527684\naF0.02434040341159046\naa(lp28\nF0.15426118023336446\naF0.0757701902023995\naF0.033436194002524434\naF0.31606299490278533\naF0.2737009450777523\naF0.14676849558117397\naa(lp29\nF0.17780714302742243\naF0.3036795352208839\naF0.07308522448203013\naF0.11146333324100298\naF0.2203454480625032\naF0.1136193159661574\naas.'
]
vms = map(lambda code: pickle.loads(code), vms)
nvm = 10
nops = 6
naddr = 10
if not 'vms' in globals() and not 'vms' in locals():
def make():
pspace = [[random.random() for _ in range(nops)] for _ in range(naddr)]
for cell in pspace:
s = sum(cell)
for i in range(nops):
cell[i] /= s
return {
"p": pspace,
"pc": 0,
"dp": 0,
"score": 0,
"fitness": 0,
"rounds": 0,
"move": "S",
"id": uuid.uuid4(),
}
vms = [make() for _ in range(nvm)]
for vm in vms:
vm["score"] = 0
vm["d"] = [0 for _ in range(naddr)]
def randselect(P):
r = random.random()
for i in range(len(P)):
p = P[i]
if r < p:
return i
r -= p
return len(P) - 1
def encode(x):
if x == "S":
return 0
elif x == "P":
return 1
return 2
def decode(x):
x = x % 3
if x == 0:
return "S"
elif x == 1:
return "P"
else:
return "R"
def payoff(mymove, opponents):
if mymove == "R":
if opponents == "R":
return 0
elif opponents == "P":
return -1
else: #S
return 1
elif mymove == "P":
if opponents == "R":
return 1
elif opponents == "P":
return 0
else: #S
return -1
elif mymove == "S":
if opponents == "R":
return -1
elif opponents == "P":
return 1
else: #S
return 0
def step(vm):
def halt():
return vm["move"]
pspace = vm["p"]
pc = vm["pc"]
if pc >= len(pspace):
return halt()
dp = vm["dp"]
dspace = vm["d"]
data = dspace[dp]
opcode = randselect(pspace[pc])
vm["pc"] += 1
if opcode == 0:
dspace[dp] += 1
elif opcode == 1:
dspace[dp] -= 1
elif opcode == 2:
vm["dp"] = min(dp + 1, len(pspace) - 1)
elif opcode == 3:
vm["dp"] = max(dp - 1, 0)
elif opcode == 4:
return decode(data)
elif opcode == 5:
dspace[dp] = encode(input)
return None
def run():
for vm in vms:
if input != "":
vm["score"] += payoff(vm["move"], input)
vm["fitness"] += vm["score"]
vm["rounds"] += 1
vm["pc"] = 0
res = None
while res is None:
res = step(vm)
vm["move"] = res
return max(vms, key = lambda x: x["score"])["move"]
output = run()