-
Notifications
You must be signed in to change notification settings - Fork 1
/
compressed.js
1 lines (1 loc) · 43.3 KB
/
compressed.js
1
var model={w_0:[[2.11863208,-1.35255492,-.177094832,-.359009832,1.10439074,1.30268919,-.918388367,1.17490184,.370280385,.0645564049,-.897441328,1.64868104,3.00778842,.555538297,2.83189893,.670088887,.933064163,.923916161,.876556635,1.39673328,3.22937655,-1.16906619,-.127058417,2.56525111,-1.0252713,.0434682071,-1.15913916,-.813597977,-2.73811245,.702845335,6.60246038,-.0473001339,.301981598,4.12850094,1.33042336,.271374077,-.119324818,-.880010724,3.3936317,.242814675,-.37618053,-.405950576,-.947246611,1.73491347,.0915154591,-.899599373,-.123787433,.00303984899,-.444770604,.882792354,1.09097159,2.21286774,-1.40717506,-1.64766729,-.383191973,1.96980882,4.36641693,-.626918852,4.45021391,2.48476672,3.48759937,-1.02242506,-5.15090752,3.53270173],[-.902332246,-1.07997978,-1.99012387,-1.0862112,-1.07291067,.0973276496,-2.26675606,-.510693848,-.487895012,1.03545797,-1.71142578,1.61496711,-5.73705673,1.24246502,-1.36675179,2.78194475,5.66804695,-.762214482,1.27957165,-.224624395,2.62815547,-3.0442977,-.91696316,1.35828006,-1.37810111,.0683122575,2.9740777,-1.75132096,-.765951335,-2.35097265,1.66345191,-1.80758977,-.183404595,.775869489,-.78039676,-2.19485211,-3.73576665,1.00274646,1.223943,-2.4377718,-2.4595418,-2.88296843,-1.35815668,1.56005406,-2.1812284,-7.54616213,-1.74086714,-1.86152148,-.433824509,.775605917,2.96151805,-.157465532,-1.160043,-1.9255811,-1.15162826,-2.72517037,1.19848144,-2.05318642,1.01402557,.589615822,1.34519744,-1.668751,3.22674108,1.41113126],[.6711362,-1.3445245,-1.11503041,-2.46165657,.418239713,1.87712502,-1.64331102,-.245295331,2.31909466,-.493716091,-.723940372,1.91752064,.798514426,-6.6521821,-1.0677985,2.13792825,3.31122613,1.76084018,-.300217628,-1.87200832,1.86971807,-1.09241402,-1.78492618,1.45226562,-2.61602712,-.166885152,.0505047999,-.609686971,-4.43934298,-.653931856,1.91387904,-1.89947271,.212024868,1.74172759,-1.08292186,-5.76404715,2.15926719,2.04439402,2.62014556,.285553932,-.793324947,-1.543998,-1.08278763,1.03542709,-.990191877,-1.12281728,-2.72229433,-.31712532,2.02343249,.686161757,.710817337,3.21182847,-.94375366,-1.80042267,-1.1292367,-.689849436,-2.60974097,-1.06315386,1.87231946,.245371521,2.92684054,-1.30464613,1.478966,2.07848811],[1.57956231,-1.54210293,-2.16382384,-1.99778497,-4.0731802,1.10768831,-2.19828916,2.20302248,2.93961596,-.941592038,-4.12250376,-1.15497196,-3.05836535,-1.35965431,-2.41904068,.726421177,1.49704182,.480150998,-.257243931,-1.32124126,1.85708177,-2.8873105,-1.38697004,1.45158112,-2.4596467,-.559873641,-.133563638,-2.60395026,.648178697,-3.10011268,1.45966721,-3.04986858,-.478064805,1.29296446,-1.76382887,-4.66066122,1.50673723,-3.61462426,-.118666224,.53896457,-2.33366871,-6.44211054,-2.13555264,-.482922316,-1.68167961,-1.59646738,-1.85806262,.109815113,-2.10383487,-.113998748,.745414674,.625561595,-.632953048,.202613622,-2.46775341,-.546895802,-2.17080998,-1.74002409,.400394887,-2.55653358,.624512255,-1.97487426,-.824526608,.568207026],[.814682126,-.272562087,.249300122,.812603831,6.28039169,4.87799597,-1.25896227,.873211324,.360619396,-.951230705,-.405351847,.0710293576,.871245205,5.76553059,2.58917761,1.68907857,-.708267272,-.523450911,1.6430527,1.62037313,6.5653615,-1.33334029,.430945188,5.89921665,.416067183,.215165883,-.441743374,-.465336472,1.32744527,1.05889177,3.73838687,1.00553858,.627530694,1.93347764,1.29354203,-1.06122911,-4.9977169,-3.37514043,3.21707082,3.62366462,.140952647,1.2863965,-.401784003,3.59484816,1.3376292,.725442469,.00797030702,.585041165,5.71952248,2.22824502,1.4332937,.777600825,-1.33811939,-.865175545,.0176541526,-.0978692248,-.397381991,-.278482914,.281739593,2.88227391,4.7411809,-.983458102,4.29696274,-.496517718],[.465972066,-1.32487965,-.925266266,-.752171993,-.0328941271,1.34468555,-1.80750656,.229688868,.174099103,-.192367882,-1.83686531,-1.72245193,-.316163719,-.126807347,-1.05369914,2.17337513,.57382226,-.189474657,.522446513,-.627069175,2.57930017,-3.17325997,-.369321376,1.8640089,-.986414313,-1.7567997,2.60226083,-2.42771316,-.707917511,-2.40156865,3.47185707,-.485126615,-.403288871,.632907987,.651245654,-3.32397532,-1.09556437,-.496429324,1.42026222,-1.39725769,-.810518384,.088916719,-1.54802811,1.09448183,-.977694154,-1.25964415,-1.06205916,-3.32835031,-.597524047,.148607507,3.74295616,-.637889445,-2.81409168,1.07354712,-2.84436417,-.218820393,2.76713681,-1.07537627,1.44532871,.198585853,2.07208323,-1.5069102,.840957761,1.3956219],[1.65507495,-1.46019709,-.872503698,-.777661085,.689579248,1.37233305,-1.20852685,.648070633,.525804341,-.0266081207,-2.9340384,1.3255477,-.787424088,-1.23973083,1.01305866,2.25063872,3.16416788,-.670552671,-.925421655,-1.5996424,2.24750733,-1.5814271,-1.92742491,1.49206245,-1.66809857,-.573402107,2.49718261,-1.23267996,-2.81388903,-.512300849,1.74426186,-1.69032669,.307282716,1.25905085,-.563544095,-5.75808668,-2.21034098,1.70531988,2.43492126,.439878553,.593004942,-.945712864,-1.16963017,1.19179606,-.750948608,.660529673,-.67251581,.0690338761,1.2913152,.119656779,.963106871,.0516147278,-2.5687139,.210688993,-1.52213562,-1.08651602,.475934446,-.919782937,1.15426457,.509387851,2.08336544,-1.82236838,.597450674,2.62437892],[.400823623,-1.4286772,-1.22901297,-.614699423,-.1819392,1.08254647,-.291030526,-1.7015022,-.0352245234,.0609372519,-5.15283537,-1.00477862,-1.32625246,.281059444,-.633332253,1.4928236,.944573462,.402335525,-.831808865,-.926535547,1.88505292,-2.50331807,-.998144388,1.57824719,-2.05746579,-.158016995,-1.20589924,-2.29755378,-.0914336145,-.169581771,1.23565745,-1.45677245,.276396126,1.5073905,-1.55321848,-5.12560892,.942321062,.180836573,1.61413288,-.420369774,-1.90082276,-4.72746277,-2.08008385,-.590910971,-.421653211,.482387602,-1.6122303,-.399706542,-1.12286139,.114595182,.389319748,.203240484,-1.44021451,.921373606,-2.09506345,.977227032,-.97914654,-1.11768723,.560025215,-1.90277267,1.28194225,-2.18248653,-.807455599,.082148172],[.163751349,-1.89398015,-.232916787,.155315101,4.18531704,1.9902606,-1.16638899,3.36474395,.253504097,-1.4310329,1.19478953,-.552332222,1.82545817,.308228582,2.63184404,1.52655852,.0863916427,-.650428712,.201577216,-2.50529099,3.29566765,-1.01701581,-.554235697,2.87852597,-.995437622,-.282983601,.0675148517,-1.14009428,-1.47106171,.175099358,3.69230938,.733195901,1.50502336,1.78995621,2.79669261,-1.20657575,.61533165,-.747739851,2.20551562,-1.19430017,-.164010003,-.965076387,-1.51855958,2.18791175,.342756003,1.71433437,-.268467844,-.364368707,-1.0270499,.960821033,1.67659676,.3181054,-1.0594095,-1.2227298,1.47918737,.90718925,-1.89473498,-.906027138,1.20836937,4.56933832,2.6347146,-1.25793231,-1.03424239,.795450985],[-2.67367339,-1.39823651,.0603840761,-2.35803843,2.35399652,1.36504924,-1.8938756,-.412309289,.105444402,-.421836138,-.631745279,-2.73748827,.37070331,.865589619,1.55611277,1.06837034,2.90929461,-.20301111,.465482861,-.636236429,2.34851885,-1.63706219,-1.81686795,1.46906435,-2.17854977,.158311561,2.42707682,-.202980846,-.420161545,-.231765464,1.77239811,-.100375026,1.47286844,1.11288786,-.696351707,-6.24434757,1.98789275,1.50367355,-1.82201493,-.943144798,-.541478515,-.867230237,-1.40249741,1.87599897,-.148844883,.204555556,-.496560216,-.441437691,.635359943,-.436229885,2.95402455,.593911767,-.405694783,-.167993665,-.3628878,-.759132147,2.66969252,-.756578743,.539793134,3.08608222,1.52339947,-.83537668,.644579172,1.72840834],[-.88951081,-1.50092995,-1.31964719,-1.63985336,.97691685,2.31821513,-2.90046668,-2.33524489,.269988954,.231637388,-2.40287423,-1.89512455,1.39550185,-.156284109,1.66171348,.141485691,.549201608,.0604578406,-1.36028826,.549611866,.617597878,-2.76427317,-.53019923,.754433334,-1.95962715,1.82290339,2.1806643,-.598743379,-.0715990588,-4.46713638,.719971895,-2.03774953,.582378864,.489776045,-.0200411268,-8.69495296,1.78047907,1.97120392,-.0246995986,-.70920831,-3.15183735,-3.08695936,-1.6448282,.252430767,-.940837324,.829883516,-1.3242718,1.19005656,.494876087,-.352855891,.130890578,-.216277257,-.705837488,2.03006244,.527466595,.374021828,-.124514066,-1.63108587,1.70020533,-.390864134,1.35670948,-1.62573516,-1.37912309,.490814894],[.359686017,-2.03253865,-1.10053992,-.951692522,.171705768,.146823436,-4.39807796,-6.28117418,.217780694,-2.60032654,-.91558075,-2.54223561,.920846462,2.46679711,.73433578,.238197193,.820308745,.123342209,1.7860626,-2.79769325,1.84624851,-1.71021783,-1.62060297,1.12655687,-1.27718425,.641855896,-.0118671944,-1.36989999,1.16935456,-1.47850657,1.50822425,-1.39462447,2.7038548,.80573523,-2.23451591,-2.22822165,.607324481,-.837328434,.213195786,.0591563731,-.738920987,-3.16196752,-1.82147467,.827809572,-.232642904,-.0556267127,-1.04890251,.818396449,-1.76708484,1.72917962,.85644871,.160390332,-4.08873034,1.79512668,-1.60393631,.00677603483,.847475529,-1.66255748,1.08811092,-.420948476,.601928294,-.516299367,-.586838663,.807249963],[-.774269283,-1.06378376,.151710644,.875409961,5.30800009,2.98966503,-2.57818985,.0548386201,1.78091204,2.84176135,-.712722898,-.519452274,1.26709521,-.963408947,5.41755009,.65896672,.43401438,.481167614,1.00543785,1.51347303,2.78791189,-2.22474146,.109415732,2.34258151,.0141471261,.868875325,.119621076,-.880617082,-1.01237094,.470449984,2.0167861,.119392499,1.34782076,.937746942,.287391961,1.32061338,1.32918584,-.587450504,.992776394,-1.51575696,-2.44959569,-1.00179958,-1.1094569,3.9917264,.46428901,3.5094049,-.202423692,.922517598,.512232482,.268275052,-1.65058661,.879148245,-.408067584,2.1078763,.105487883,1.46190453,-1.13691413,-.890255272,1.32904434,-.878694713,2.08989549,-1.52647734,1.89929378,-1.51120853],[.749619722,-1.52311254,-.0473506972,-.00813355204,2.90081263,1.20538545,-1.0404799,.966587722,1.21227968,-2.53002644,-1.65239441,-2.16592002,1.28390586,1.97525394,1.91753209,1.91089213,-.291070879,1.47416031,1.25260472,.138014108,1.9535594,-.911827266,-1.05813003,1.93594003,-1.54292428,.29777047,1.04697084,-.571218312,1.16978276,.340850413,1.8567692,.0554188751,1.81369162,1.00744236,.54175967,-4.91479397,3.37682939,2.33286357,.438325197,-6.58896399,3.2480855,.133012339,-.859559417,2.17291451,.691069305,2.29768968,-.290445179,2.95615578,-.729319811,1.52632654,4.01174545,.86624831,-1.35656214,1.48190558,-1.15519261,-.482695937,.0622252412,-.887820899,.808543384,3.37131023,1.24942172,-.950046778,-1.10786152,1.35587919],[-1.58663237,-1.71786714,-.433963269,.172158614,1.29860103,1.45388567,1.64967763,.306845307,.116503708,.974028349,-4.07064724,1.30575955,.00233884295,-1.60328782,1.0769726,.395834684,.336721718,.517567456,-1.77275634,-2.0957129,1.43672156,-2.21667218,-1.48439407,1.79407954,-1.95594907,-.909306586,2.72109318,-2.76082206,2.67878699,.292628199,1.68470979,-2.3665123,1.74053705,.947878838,-.238793999,-4.82014084,1.20593393,3.21272039,-.97429812,-.531836569,.805847287,-1.120579,-1.14236224,.306602776,-.177932397,.746697485,-.901792884,.0958419666,1.15330708,-5.07004786,-.0098240152,.943018973,-3.06377959,2.70246863,-3.67771578,-.712818623,-.97390002,-1.14047813,.934218347,-2.93277693,.815211236,-2.34938669,-.703883529,-.703946531],[.354756415,-2.63287759,-.442693323,-.435592592,-1.85756671,.358293861,-1.87419951,-.520137846,-.0532714836,-2.21774673,-1.46281362,-1.27596056,-.167601347,.944107771,.405887574,.544486403,.193997964,.579614222,1.59243548,-.639745951,1.67946029,-1.92603326,-4.24360704,1.12662852,-.0546109639,-1.84815502,-.446269453,-1.53034699,2.5579946,.354937464,1.69250762,-.319367051,1.56709874,.892066717,-3.11664677,-1.56098342,-.202608824,-.909596443,.300621152,-1.25550103,-1.7858659,-2.29666948,-1.66794431,.759560645,-5.05095196,-.338436514,-.480966568,-.562492788,.717500985,-.0134196905,.336584806,.0212829411,.269188166,1.13237703,.65382278,-2.40949416,-.229315385,-.820267856,2.00581288,-6.23947477,1.20047045,-4.65869665,-1.21238863,.0601036474],[5.27252769,-1.65599394,.529392898,.876569688,2.71206665,1.66065574,-1.99455047,-1.26485133,.817333639,-.491967708,-.257069021,-1.15855563,.0863959119,3.06171441,1.23388326,.621276319,1.29417324,3.73293495,.132574007,4.78020239,.827784777,-1.70670867,9.08967781,1.92216361,-1.33992314,.275775254,-1.54246092,-1.5106858,.136973336,1.51270938,1.934708,.852605999,2.98833513,.680610836,3.66051197,.276337177,2.22123027,2.20430565,1.30512571,-2.41228127,-4.27094507,1.00133753,-1.03612685,1.56372976,-.925541759,1.46425474,-.364887446,2.54842615,1.34252131,.851679385,6.0952754,.36574313,1.90654767,1.34718227,1.99644709,-1.60966182,-.468651175,-1.0876832,.0246335007,-2.41249943,1.67539239,-.54564786,-1.13048863,.735349178],[1.48411715,-1.46727514,-1.97445452,-2.71002579,2.53886247,1.29458082,-2.48721242,.0251464806,.485094577,-3.14312124,2.73502684,2.41353273,-.133771703,-1.73363066,.910882533,1.24638593,1.51959085,2.51783776,-1.11790144,.114388622,1.51008904,-2.76048541,.0653134584,2.19528556,-1.41602051,1.2808212,-2.06046844,-2.84194827,.842476368,.619206429,2.0191083,.129769802,2.71671295,.879472971,.798039138,-3.16287422,2.76495886,2.86316872,1.16601872,-1.20430577,-1.03989673,-3.14947796,-.711926341,.775379181,-.508250475,2.67781115,-3.12656951,1.09175956,.0808723271,-.211572438,.489723384,.740125,1.63653481,4.06461906,1.67723596,.874943018,.847521007,-2.01029706,.201674595,6.02360773,1.20562959,.954529703,1.0826056,1.58827806],[.145571157,-.953852236,-.519309282,-1.13917232,1.0749644,.585932612,-7.01900148,-1.54360843,-.447393358,.767900586,-.636895835,.678137779,.412896365,.6758219,.17303203,.157790065,.695389152,-.742350757,-.140279546,-5.02135754,1.26390028,-1.07611132,-1.5154233,.905357718,-1.12465,2.66119599,-.0683990344,1.42985332,4.29157543,-1.83634424,2.37673283,-2.33895922,2.27892065,.406003863,.345387965,-1.39619613,-1.52132118,3.5684278,1.75600743,-.377257794,-1.54030514,-2.63158488,-1.59891963,.661826909,.409316421,1.53195536,-1.38511264,.52685231,.902409017,-.892663717,-.157935768,.318749905,-1.98833191,3.73921013,1.2357465,.848465502,1.56354654,-1.7941488,.514201105,.960758924,1.59894836,.0350545831,.622637689,.812634945],[.49410826,-.990325391,-1.08041608,-.288790941,.569442272,-.0978195593,-1.48902953,-2.00890899,.0294478163,-4.2650919,-2.58354783,-.799713135,.482782096,1.25778186,.823397875,.0957863703,.201698869,.16847828,.321772069,-5.42063427,1.17825234,-1.5577873,-.766629398,.973435521,-.646073043,1.10044575,.683726549,-1.09104323,2.38623714,-6.48287153,1.75562477,-3.98713923,-.268808573,.272942245,.113703415,-.253318667,-1.48268235,-1.60231483,.960066855,.0268069021,-2.26767349,-5.29738235,-1.72920978,.62380296,.551965058,-1.55613828,-1.59877264,2.01510024,.61113584,1.64698958,-.0158574414,.143490925,-3.38279295,1.28588057,-.500926852,-1.22747433,-.453075767,-2.80503702,.89639616,-1.42447603,.862411737,-1.17374945,-2.55942941,.236401871],[.853748918,-1.1134541,.120576054,-.41966182,1.91188848,1.94919789,-1.53182387,.0309715942,1.61878657,.543718338,-.965374708,.429481238,-.0128824012,1.88268626,7.01189184,.900093913,.861521184,.804695904,-2.00091267,-.292204618,.749275029,-2.06806755,-2.04630589,1.54957879,-1.58654058,.254113078,-1.28038323,-.329504281,1.65549314,.0742534772,2.40559125,-.949513853,2.83384395,2.40650487,-.0723626539,1.51219726,1.44947565,-.394980937,.974445999,.0843750313,-.357427597,-1.38939953,-1.20672023,2.12648988,-.0880796835,1.73126876,-.787944317,-.379352778,2.57240057,.77011925,1.03887641,.118271746,-1.15460074,4.26092625,.234426185,-2.53106642,.735112846,-1.48241735,1.14627039,1.12315667,2.94731951,-.772083521,-.644042373,1.25495338],[.988643646,-.239767209,.757968068,.0901360139,1.38149083,1.74425256,-2.89831209,-.101170525,-.529726982,8.99186897,-2.92918658,-.253876269,.927257359,2.20016766,1.6602,3.00008225,.944546103,-.437454671,-.169979051,-1.92394543,.678582966,-.531841993,-3.73519969,2.06146598,-.997575939,.155786842,-.636447906,.711596191,.638501942,-2.78919625,2.82416511,-2.19380808,2.68830347,1.69870639,-.851426542,-1.72904861,.679852068,-.844759226,.524757266,-.905149221,1.71876585,-1.83251238,-1.11793268,.441881448,.544885099,3.22884727,.231829271,-1.79796457,.258607209,2.52486873,1.23636234,.659440696,-5.11292887,3.91301751,-2.15255189,2.75221324,.536297977,-.513456821,.789996743,2.09432197,1.51407003,-2.34506559,-.0271094795,1.06052744],[-.305828631,-1.33169353,.644571364,1.15826845,1.81528044,.303001046,-.147983208,-2.00406766,-.32241413,-.810150623,-1.09458423,-.318235219,1.31463492,2.06098628,.648571134,.457227528,.816500604,-1.10155725,.733936489,-3.03628063,.951696992,-2.13873172,-2.60392141,.745417118,-3.9051218,-3.38811016,-.123856083,-3.59839177,2.75457621,-3.25442648,1.78497314,-1.43928933,2.62551093,1.02482796,-3.25179052,-.577146828,.149684697,-.432338744,.935224593,.388041407,-1.31327331,-1.36531603,-1.22802615,.332823157,-.566950917,1.40093625,-1.01655412,-1.32629144,.620055437,.374555171,-.249326527,.576545775,-.290742934,2.64033127,.977648377,1.14521646,.408887357,-1.73279107,.423820376,-2.60917068,1.28543591,-.624551594,.00978293456,1.0394913],[.31898585,-1.927477,.269870698,-.992277503,1.69419491,-.0680066869,-3.69102359,1.1241225,-.247499317,-4.12727928,-2.29834986,-.153804615,.405237198,1.3618809,.0267290138,.17268008,.0708533376,-.46118632,.265024006,-2.89940953,1.09125888,-1.10658014,-.653641045,.209066242,-.854475439,-4.46353626,.787653804,-6.09532785,2.84271026,1.95860219,1.10530269,-1.11764932,2.71595359,1.04154408,-4.12488937,1.04777563,.669707,1.71961498,.248104751,-1.55306673,-2.86982059,-3.17415595,-1.56450903,.206978917,1.95158231,1.16175342,-.51058799,-.83005029,.341384262,.474636197,-.218307361,.870223999,-8.1439743,3.7906847,1.34258819,.698428035,.097858116,-1.43653202,.213132471,-3.74002576,.533884406,-1.51507068,.326875836,.643695116],[.0162409618,-.811583817,.235480934,-.883110821,2.19983149,2.14681578,.307535022,-.204243407,-.0711316168,-1.41490269,-1.97554493,.744346738,1.36025965,1.19100904,1.35869074,.71550858,.683211088,-1.41016877,.474332809,-3.27407002,.794411957,-2.41865873,-.616012931,.809669435,-.632320106,.328796238,-.134856924,-1.37654865,.23506552,-.855875731,1.13031447,-1.18375826,5.68854904,1.81443119,2.12651682,.225138828,-.0321815573,-.164935857,1.10585701,-.363962144,-1.43508291,-2.23371291,-1.37758851,1.24867773,1.08098149,1.93183303,-.770826936,-.71894294,2.44891167,3.44334316,1.53951204,.308670521,-.984545469,1.72764516,1.01495111,.607821405,.048609823,-1.68926084,3.13706541,1.92704904,1.65561235,-.200749353,-.190845296,.985924184],[.605177402,-2.35106874,-1.98504198,-.657887101,1.64719915,.669277728,-1.93420827,-.185281917,1.37371325,-5.2461319,-4.4842515,-.351635009,.976993263,1.16342616,1.09310579,.746691406,.963678956,-.276098639,1.94476306,-6.5271039,.856483519,-.189383313,-.136842623,.560965478,-2.70282412,3.34007668,.789519787,-1.94906044,1.94337988,.554187298,1.15081131,-3.84403801,2.20284152,.826575398,-.798843503,-.916005969,-.455609471,.10649161,1.31993008,.465939939,-1.13864493,-.996132076,-1.27655828,.746890128,-4.63087606,-.0484335832,-.910136819,-.52001965,1.3659035,1.12189519,.0823158398,.640480399,.712113321,4.01563215,-3.18987203,1.00925875,.832299054,-1.55440164,1.15990174,.51376915,1.57621562,-1.48699176,.106339924,.462656647],[.248420298,-4.33112526,.973211825,-4.87641668,1.18590832,1.03883803,-1.13549185,2.53286123,.5680511,-1.94440758,-1.57388675,.627694964,.725074947,1.09443307,1.23761404,.710425556,.660635233,-.0616838187,1.66743588,-3.27479458,.7441715,-.590471148,-.245597869,.974420547,-2.87088466,-.706007063,.434554815,2.6544838,1.56401455,.404636204,.948393285,-2.08640409,2.08497429,.371228576,6.96025848,1.33303428,.411844969,-.128249228,.537690759,-.295339406,1.19407415,-2.44082999,-1.44446635,.950288951,-4.06440973,1.61458325,-1.49436963,2.33852625,.581773221,.797913671,.572878301,.0877181143,1.46553266,3.99942088,-.361896932,1.25671756,1.13514209,-5.35774279,1.13710105,.57336688,.857263148,-1.59828186,-.49206239,.829911768],[.527185202,-2.93382788,.568552971,-1.77211499,.888563454,.608560205,-2.03529263,-4.67561769,.580875039,-3.18438053,-4.82502794,-.319447756,1.03978515,.95030117,.325809449,1.02848148,.823537469,.331662476,.954802752,.761251748,.787756264,-5.83904028,-2.44628644,.550019264,-1.93337667,.446923226,.287457854,-3.44616795,4.15413284,-5.75236607,1.18016231,-.191111833,4.71575022,.671103895,-.257308066,-.245930016,.080218181,.59638983,1.09103048,.223223552,-1.54451966,-3.46867251,-4.06961489,.542086422,.330222487,.643967211,-6.91831017,-1.36778164,.360772938,-.385664165,.388640255,.687227249,-2.99302864,3.3211782,-3.10768962,.564183891,1.27070117,-6.31639338,.967313349,.278767556,.945826769,-4.90122509,.162383169,.712738693],[1.62061834,-.696688771,.640382946,-2.20688295,3.15465879,2.58288312,1.71727228,-.396590501,-.544323385,1.85227466,-1.84235823,.173885629,1.2047739,.308759421,-.0369817615,1.66713619,.89378947,-.949040413,1.34893203,4.09783363,.48924759,.969326258,-.790234447,1.00714517,-1.058792,7.42868233,.591356099,.261829793,-.113146536,.449323922,2.10156894,-.678360283,4.13506699,2.62594891,.239725739,-1.15652347,.426597148,1.0769645,1.47758627,-.0672408715,-3.26402998,-1.82934618,-.484702706,2.53122735,.32886374,.247380346,-.461758703,.410858124,.94071281,3.02997589,1.71877766,1.23795557,-1.06037199,5.35314369,.048684828,.641884387,.855157793,-1.23917484,3.31828427,-.0291843023,2.17935634,-.75119853,1.35792339,3.01258159],[.215786651,-1.07131231,-5.2900362,-5.28020334,1.17615759,.359827965,1.29442739,.826494217,1.26449585,.636184216,-.0963419378,-.600387692,.417417079,.916844547,.465431422,.643947244,.844275773,-.46469301,3.37613988,-1.96358299,.890272379,-.0875580832,-2.18208838,.401172906,-3.76086164,.780496061,.13266699,-4.76173019,.593588352,-.0304524023,1.31779146,-2.29671025,2.96683908,1.30056655,-5.20511484,-.173241302,-.558400214,.163573787,1.29996943,.0311198775,2.90974307,-2.97910929,-2.40384722,.874408603,-.368557125,.186197475,-.88898927,-.542512059,1.84637034,.728969336,.599366426,.775651276,-1.80026364,3.15010571,-4.59840107,.244440317,1.12062562,-1.67676663,2.5160079,.310692012,1.83573186,-.183709711,.0186030213,.375365049],[.248590872,-1.13379693,-4.72113943,-.68955189,1.22097743,.561702251,.0407824107,2.29531431,-.873381138,-.815952301,-.819393754,.0584425889,.997540593,1.89181292,.909049749,1.65648949,1.40777159,.00887300912,1.72894883,.985333979,.782807529,.0547095872,.191731825,1.02935588,-4.92301702,-5.53814888,.237143934,2.93171072,.159802869,-5.66032314,.606500208,-6.24322033,3.83183956,.685534656,-3.21979022,1.12570512,-.341387689,-.719009817,.398200691,.0929143652,-2.25225711,.125537172,-1.1711247,.460139155,.116877891,-.0516498499,-1.19771194,3.57510352,1.62885547,1.7222507,.630734026,1.63596165,2.25252151,2.94014907,-.453359753,.609752357,1.09515858,-1.80593884,.599969864,1.26516223,.472431749,-5.00063467,-.0581049509,1.12851465],[.0748886317,-4.82120132,-4.98977852,.909777522,.401758462,.435014307,-6.91568518,.826442242,.031667538,.685973287,-1.22967696,-.134991139,.525972784,1.42974603,.500563622,.483184397,.245588243,.314251006,2.08315587,2.04708695,.790538013,-7.2101326,-2.98578644,.395481139,-3.37262607,-.92572999,.496476382,-3.79755068,1.87804222,.900289476,1.01587951,.136768594,2.66155887,.705942154,.283171564,-.529379547,.211523876,-.0410307199,.724991918,.480202883,-2.08357525,.129619554,-5.29915047,.718705893,-4.07416821,.197308362,-1.01980734,.0212552901,-.145681843,.0238194168,-.168804958,.426245511,-4.6788516,1.70432639,-3.86611104,1.46881413,.594297409,-2.41698146,.355892479,-.676650405,.721762121,-2.3379221,-.263079911,.326407045]],bias_0:[2.7362251,1.2862941,-.7536435,-.5515849,4.923208,1.8292509,.9951462,-1.1213273,2.736306,-2.7459955,.46105188,.81213605,2.0777447,4.6297383,3.410812,2.3683712,3.0813515,2.1102564,5.8987737,-.48599648,3.3673613,.72470665,-.7616337,2.870627,1.1243157,-3.0179734,2.9416127,-2.4359381,7.944644,-1.9703323,2.3727849,.4083204,-6.3681326,1.452572,-1.9715117,-1.6169593,4.299437,3.558092,1.7415189,3.083579,-2.6340106,1.0878862,1.1911873,3.4273415,-1.8835444,5.0695944,.632097,4.989716,3.4495487,4.298831,2.5150392,1.4411699,-.15596077,-7.046976,-2.5107417,3.4360733,3.9304101,1.7914771,2.3691857,-2.4356246,2.2369542,.56531084,2.3347921,1.9865918],w_1:[[0,0,0,0,0,-.00014225737,.0681675896,0,0,0,0,0,0,0,0,0,0,0,0,0,.23243995,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.268044114,0,0,0,0,0,0,0,0,0,0,0,0,0,-.322530776,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,-.00014246942,.0837154463,0,0,.00014225737,0,0,0,0,0,0,0,0,0,0,-.35499844,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.194760799,0,0,0,0,0,0,0,0,0,0,0,0,0,-.292865634,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.0854615346,0,0,0,0,0,0,0,0,0,0,0,-.00014225737,0,.468713045,0,0,0,0,0,0,.000142249017,0,0,0,0],[0,0,0,0,0,0,-.267691225,0,0,0,0,0,0,0,0,0,0,0,0,0,.25290668,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.194887206,0,0,0,0,0,0,0,0,0,0,0,0,0,-.191693366,0,0,0,0,.000142249017,0,0,0,0,0,0],[0,0,0,0,0,0,.16723673,0,0,0,0,0,0,0,0,0,0,0,0,0,-.209495708,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.03121523,0,0,0,0,0,0,0,0,0,0,0,0,0,.217954621,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.0459254161,0,0,0,0,0,0,0,0,0,0,0,0,0,-.165089965,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,-.00014225737,0,0,.237423033,0,0,0,0,0,0,0,.000142249017,0,0,0,0,0,-.318878829,0,0,0,0,.00014225737,0,0,0,0,0,0],[0,0,0,0,0,0,-.0219423659,0,0,0,0,0,0,0,0,0,0,0,0,0,.145843416,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.00338404719,0,0,0,0,0,0,0,0,0,0,0,0,0,.239902571,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.247163817,0,0,0,0,.00014225737,0,0,0,0,0,0,0,0,.553039074,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.23607488,0,0,0,0,0,0,0,0,0,0,0,0,0,.315596223,0,0,.00014225737,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.201940179,0,0,0,0,.00014225737,0,0,0,0,0,0,0,0,.208599105,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.266621768,0,0,0,0,0,0,0,0,0,0,0,0,0,.356704682,0,0,0,0,0,0,0,-.00014225737,0,0,0],[0,0,0,0,0,0,.0540608242,0,0,0,0,0,0,0,0,0,0,0,0,0,.1504976,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.349848032,0,0,0,0,0,0,0,0,0,0,0,0,0,.487097442,0,0,0,0,0,0,0,0,0,.00014225737,0],[0,0,0,0,0,0,.213287905,0,0,0,0,0,0,0,0,0,0,0,0,0,-.200366274,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.442444503,0,0,0,0,0,0,0,0,0,0,0,0,0,.569518983,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.335630238,0,0,0,0,0,0,0,0,0,0,0,0,0,-.322472751,0,0,0,0,0,0,0,0,0,0,0],[.00014225737,0,0,0,0,0,.136094436,0,0,0,0,0,0,0,0,0,0,0,0,0,-.163569629,0,0,-.00014225737,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.361936033,0,0,0,0,0,0,0,0,0,0,0,0,0,.454263836,0,0,0,0,0,0,0,0,0,.00014225737,0],[0,0,0,0,0,0,.380673021,0,0,0,0,0,0,0,0,0,0,0,0,0,-.389299035,0,0,0,0,0,0,.00014225737,0,0,0,0],[0,0,0,0,0,0,.0957229957,0,0,0,0,0,0,0,0,0,0,0,0,0,-.340200037,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.0438716486,0,0,0,0,0,0,0,0,0,0,0,0,0,.305215508,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.158725575,0,0,-.00014225737,0,0,0,.00014225737,0,-.00014225737,0,0,0,0,-.268167734,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.417673141,0,0,0,0,0,0,0,0,0,0,0,0,0,.845315337,0,0,0,0,0,0,-.000142249017,0,0,0,0],[0,0,0,0,0,0,.24028568,0,0,0,0,0,0,0,0,0,0,0,0,0,-.284225434,0,0,0,.000142249017,0,0,-.000142249017,.000142249017,0,.00014225737,0],[0,0,0,0,0,0,-.55241704,0,0,0,0,0,0,0,0,0,0,0,0,0,.424156785,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.185542047,0,0,0,0,0,0,0,0,0,0,0,0,0,-.256373793,0,0,0,.000142249017,0,0,0,0,0,0,0],[0,0,0,0,0,0,.271337748,0,0,0,0,0,0,0,0,0,0,0,0,0,-.514804602,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.251229256,0,0,0,0,0,0,0,0,0,0,0,0,0,.142611295,0,0,0,0,.000142249017,0,0,0,0,0,0],[0,0,0,0,-.00014225737,0,.102162592,0,0,.00014225737,0,0,0,0,0,0,0,0,0,0,-.287954599,0,0,0,0,-.00014225737,0,0,0,0,.00014225737,0],[0,0,0,0,0,0,-.223616198,0,0,0,0,0,0,0,0,0,0,0,0,0,.35000965,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.030630365,0,0,0,0,0,0,0,0,0,0,0,0,0,.389267921,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.044950109,0,0,0,0,0,0,0,0,0,0,0,0,0,.36480242,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.231680587,0,0,0,0,0,0,0,0,0,0,0,0,0,.251115113,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.231877655,0,0,0,0,0,0,0,0,0,0,0,0,0,.397365183,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.102648027,0,0,0,0,0,0,0,0,0,0,0,0,0,-.180275097,.00014225737,0,0,0,-.000142249017,0,0,0,0,0,0],[0,0,0,0,0,0,.191171378,0,0,0,0,0,0,0,0,0,0,0,0,0,-.287787348,0,0,0,0,-.00014225737,0,-.00014225737,0,0,0,0],[0,0,0,0,0,0,.286963731,0,0,0,0,.00014225737,0,.000142249017,0,0,0,0,0,0,-.321584225,-.00014225737,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.177513286,0,0,0,0,0,0,0,0,0,0,0,.00014225737,0,.311721593,0,0,0,0,0,0,.000142249017,0,0,0,0],[0,0,0,0,0,.00014225737,.0830583051,0,0,0,0,0,0,0,0,0,0,0,0,0,-.209118262,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.0603608228,0,0,0,0,0,0,0,0,0,0,0,0,0,.465304345,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.386466771,0,0,0,0,0,0,0,0,0,0,0,0,0,-.26357308,0,0,.00014225737,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.297983885,0,0,0,0,.00014225737,0,0,0,0,0,0,0,0,.266854674,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.117510647,0,0,0,0,0,0,0,0,0,0,0,0,0,.3970339,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.0971584171,0,0,0,0,0,0,0,0,0,0,0,0,0,.373610824,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.245664567,0,0,0,0,0,0,0,0,0,0,0,0,0,.270662814,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.091466777,0,0,0,0,0,0,0,0,0,0,0,0,0,.0956000984,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.154812783,0,0,-.00014225737,0,-.000142249017,0,-.00014225737,.00014225737,0,0,0,0,0,-.24964945,0,0,.00014225737,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.354784966,0,0,0,0,0,0,0,0,0,0,0,0,0,-.401697427,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.0856146142,0,0,.00014246942,0,0,0,0,0,.00014225737,0,0,0,0,-.236870438,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,.00014225737,0,0,.119470805,0,0,0,0,0,0,0,0,0,0,0,0,0,.323808312,-.000142249017,0,0,0,0,0,0,0,0,-.00014225737,0],[0,0,0,0,0,.00014246942,-.0549960695,0,0,0,0,0,0,0,0,0,0,0,0,0,.27561003,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.460453302,0,0,0,0,0,0,0,0,0,0,0,0,0,-.458469987,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.237685293,0,0,0,0,0,0,0,0,0,0,0,0,0,.25874725,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,.00937416684,0,0,0,0,0,0,0,0,0,0,0,0,0,-.315369546,0,0,0,0,-.00014225737,0,0,0,0,0,0],[0,0,0,0,0,0,-.380684763,0,0,0,0,0,0,0,0,0,0,0,0,0,.378064334,0,0,0,0,0,0,0,0,0,-.00014225737,0],[0,0,0,0,0,-.00014225737,.325386673,0,0,0,0,0,0,0,0,0,0,0,0,0,-.368566632,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,-.0217250213,0,0,0,0,0,0,0,0,0,0,.00014225737,0,0,.314177901,0,0,0,0,0,0,0,0,0,-.00014225737,0],[0,0,0,0,0,0,-.263786703,0,0,0,0,0,0,0,0,0,0,0,0,0,.114127964,0,0,0,0,0,0,0,0,0,0,0]],bias_1:[-.07059679,-.0435495,-.0730798,-.06972155,-.13439432,-.06206856,5.3648143,-.07670188,-.09684435,-.08453214,-.02779934,-.11862426,-.03338488,-.14601775,-.08993295,-.11502436,-.06297923,-.11426816,-.08693239,-.06319664,4.90844,-.09625979,-.11250531,-.08883727,-.18373017,-.08382718,-.05892475,-.16284621,-.08443347,-.12973996,-.08620868,-.06991415],w_2:[[-.00014224902,0,0,0,.00014225737,0,0,0,0,0,0,0,0,.00014225737,0,0],[-.00014224902,0,-.00014225737,0,0,0,0,0,0,0,0,.00014225737,0,-.00014225737,0,0],[.00014225737,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[.00014225737,0,0,0,0,0,0,0,0,0,0,0,-.00014225737,.00014225737,0,0],[.00014225737,-.00014225737,0,0,0,0,0,.00014225737,0,0,0,.00014225737,0,-.00014225737,0,0],[.00014224902,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,-.58756274,0,-.55185914,0,0,-.32885203,-.35124916,0,0,0,0,-.61524469,0],[-.00014225737,0,0,0,.00014225737,0,0,0,0,0,0,0,0,0,0,0],[-.00014225737,0,.00014225737,0,0,0,.00014225737,0,0,0,0,0,-.00014225737,-.00014224902,0,0],[-.00014225737,.00014224902,0,0,0,0,0,-.00014225737,0,0,-.00014225737,0,0,0,0,0],[0,0,0,0,.00014225737,0,0,0,0,0,0,0,0,0,0,0],[0,0,.00014225737,0,0,0,0,0,0,0,0,0,0,.00014225737,0,0],[-.00014225737,0,0,0,.00014225737,0,0,0,0,-.00014225737,0,0,0,0,0,0],[.00014224902,0,0,0,0,0,0,0,0,0,0,0,0,.00014224902,0,0],[.00014224902,0,0,0,0,0,0,0,0,0,0,0,0,.00014225737,0,0],[0,-.00014224902,0,0,0,0,.00014225737,0,0,0,0,0,0,.00014225737,0,0],[.00014224902,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,.00014225737,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,.00014225737,0,0,0,0,0,.00014225737,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,.84150052,0,.74238122,0,0,.32785806,.3400858,0,0,0,0,.95221031,0],[0,-.00014225737,0,0,0,0,0,.00014225737,0,0,0,0,0,0,0,0],[0,.00014225737,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,.00014224902,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,-.00014225737,0,0],[0,-.00014225737,0,-.00014225737,0,-.00014224902,0,.00014225737,-.00014224902,-.00014225737,0,0,0,0,.00014225737,0],[.00014225737,.00014224902,0,0,-.00014225737,0,0,0,0,0,0,0,0,0,0,0],[-.00014225737,.00014225737,0,0,0,0,0,0,0,0,0,.00014225737,0,.00014225737,0,0],[.00014224902,.00014225737,0,.00014224902,0,.00014225737,0,0,0,0,0,-.00014224902,0,-.00014225737,.00014225737,0],[.00014225737,.00014224902,0,0,.00014225737,0,0,0,0,0,0,0,0,0,0,0],[0,.00014224902,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,.00014224902,0,0,0,0,.00014225737,0,0,0,0,0,0,0,0,.00014225737]],bias_2:[-.043597601,-.018397808,-.010511332,3.3616495,-.02031976,3.1876404,-.039740413,-.034947127,2.5541112,2.5717435,-.017374033,-.058012728,-.0012067759,-.066589743,3.6815517,-.015764201],w_3:[[0,0,0,0,0,-.00014224902,0,0],[0,-.00014225737,0,.00014225737,0,0,-.00014225737,0],[0,0,0,0,0,0,0,0],[0,0,.54029959,0,0,0,.89244783,0],[0,0,0,0,0,0,.00014224902,0],[0,0,.4699842,0,0,0,.79587036,0],[0,0,0,0,0,0,0,0],[0,0,0,.00014225737,0,0,0,0],[0,0,.15723802,0,0,0,.36439747,0],[0,0,.1704271,0,0,0,.38222069,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,-.00014225737],[0,0,0,0,0,0,0,0],[0,0,0,0,0,-.00014225737,0,0],[0,0,.62003511,0,0,0,1.0026002,0],[0,-.00014225737,0,-.00014225737,0,0,0,0]],bias_3:[-.01261838,-.02798093,-30387e-8,-.04437298,-.01588212,-.01571437,-319e-6,-.0314219],w_4:[[0],[0],[.81688249],[0],[0],[0],[1.394274],[0]],bias_4:[-184.3432]},agent=tf.sequential();agent.add(tf.layers.dense({units:64,useBias:!0,activation:"relu",inputShape:[32]})),agent.add(tf.layers.dense({units:32,useBias:!0,activation:"relu"})),agent.add(tf.layers.dense({units:16,useBias:!0,activation:"relu"})),agent.add(tf.layers.dense({units:8,useBias:!0,activation:"relu"})),agent.add(tf.layers.dense({units:1,useBias:!0})),agent.compile({loss:"meanSquaredError",optimizer:"sgd"}),agent.layers[0].setWeights([tf.tensor2d(model.w_0,[32,64]),tf.tensor1d(model.bias_0)]),agent.layers[1].setWeights([tf.tensor2d(model.w_1,[64,32]),tf.tensor1d(model.bias_1)]),agent.layers[2].setWeights([tf.tensor2d(model.w_2,[32,16]),tf.tensor1d(model.bias_2)]),agent.layers[3].setWeights([tf.tensor2d(model.w_3,[16,8]),tf.tensor1d(model.bias_3)]),agent.layers[4].setWeights([tf.tensor2d(model.w_4,[8,1]),tf.tensor1d(model.bias_4)]);var board=[[0,1,0,1,0,1,0,1],[1,0,1,0,1,0,1,0],[0,1,0,1,0,1,0,1],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[-1,0,-1,0,-1,0,-1,0],[0,-1,0,-1,0,-1,0,-1],[-1,0,-1,0,-1,0,-1,0]],c=document.getElementById("checkers"),ctx=c.getContext("2d");ctx.lineWidth=5;var length=720,square=length/8,player=Math.random()>.5,toMove={row:0,col:0};function to_input(o){var e=[o[0][1],o[0][3],o[0][5],o[0][7],o[1][0],o[1][2],o[1][4],o[1][6],o[2][1],o[2][3],o[2][5],o[2][7],o[3][0],o[3][2],o[3][4],o[3][6],o[4][1],o[4][3],o[4][5],o[4][7],o[5][0],o[5][2],o[5][4],o[5][6],o[6][1],o[6][3],o[6][5],o[6][7],o[7][0],o[7][2],o[7][4],o[7][6]];return tf.tensor2d([e],[1,32])}function clear_board(){ctx.clearRect(0,0,length,length),ctx.fillStyle="white";for(var o=0;o<8;++o)if(row=o*square,o%2==0)for(var e=0;e<7;e+=2)col=e*square,ctx.fillRect(col,row,square,square);else for(e=1;e<8;e+=2)col=e*square,ctx.fillRect(col,row,square,square)}function draw_board(o){clear_board();for(var e=0;e<8;++e)if(y=e*square+square/2,e%2==0)for(var r=1;r<8;r+=2)x=r*square+square/2,0!=o[e][r]&&(ctx.beginPath(),ctx.arc(x,y,square/2-4,0,2*Math.PI),o[e][r]>0?3==o[e][r]?(ctx.fillStyle="red",ctx.fill()):(ctx.strokeStyle="red",ctx.stroke()):-3==o[e][r]?(ctx.fillStyle="yellow",ctx.fill()):(ctx.strokeStyle="yellow",ctx.stroke()));else for(r=0;r<7;r+=2)x=r*square+square/2,0!=o[e][r]&&(ctx.beginPath(),ctx.arc(x,y,square/2-4,0,2*Math.PI),o[e][r]>0?3==o[e][r]?(ctx.fillStyle="red",ctx.fill()):(ctx.strokeStyle="red",ctx.stroke()):-3==o[e][r]?(ctx.fillStyle="yellow",ctx.fill()):(ctx.strokeStyle="yellow",ctx.stroke()))}function paint_blue(o){requestAnimationFrame(function(){ctx.fillStyle="blue",ctx.fillRect(o.col*square,o.row*square,square,square)})}function userInterface(o){if(player){for(var e=c.getBoundingClientRect(),r=o.clientX-e.left,t=o.clientY-e.top,a={row:Math.floor(t/square),col:Math.floor(r/square)},l=!1,n=!1,i=0;i<8;++i)for(var s=0;s<8;++s)if(has_capture({row:i,col:s})){n=!0;break}switch(board[a.row][a.col]<0&&draw_board(board),board[a.row][a.col]){case-3:a.row<7&&a.col>0&&0==board[a.row+1][a.col-1]?n||paint_blue({row:a.row+1,col:a.col-1}):a.row<6&&a.col>1&&board[a.row+1][a.col-1]>0&&0==board[a.row+2][a.col-2]&&paint_blue({row:a.row+2,col:a.col-2}),a.row<7&&a.col<7&&0==board[a.row+1][a.col+1]?n||paint_blue({row:a.row+1,col:a.col+1}):a.row<6&&a.col<6&&board[a.row+1][a.col+1]>0&&0==board[a.row+2][a.col+2]&&paint_blue({row:a.row+2,col:a.col+2});case-1:a.row>0&&a.col>0&&0==board[a.row-1][a.col-1]?n||paint_blue({row:a.row-1,col:a.col-1}):a.row>1&&a.col>1&&board[a.row-1][a.col-1]>0&&0==board[a.row-2][a.col-2]&&paint_blue({row:a.row-2,col:a.col-2}),a.row>0&&a.col<7&&0==board[a.row-1][a.col+1]?n||paint_blue({row:a.row-1,col:a.col+1}):a.row>1&&a.col<6&&board[a.row-1][a.col+1]>0&&0==board[a.row-2][a.col+2]&&paint_blue({row:a.row-2,col:a.col+2}),(!n||n&&has_capture(a))&&(toMove=a);break;case 0:if(0==toMove.row&&0==toMove.col)break;-3==board[toMove.row][toMove.col]&&a.row>toMove.row?a.row==toMove.row+2?a.col==toMove.col+2&&board[toMove.row+1][toMove.col+1]>0?(board[toMove.row+1][toMove.col+1]=0,board[a.row][a.col]=board[toMove.row][toMove.col],board[toMove.row][toMove.col]=0,l=!0):a.col==toMove.col-2&&board[toMove.row+1][toMove.col-1]>0&&(board[toMove.row+1][toMove.col-1]=0,board[a.row][a.col]=board[toMove.row][toMove.col],board[toMove.row][toMove.col]=0,l=!0):n||a.row!=toMove.row+1||a.col!=toMove.col+1&&a.col!=toMove.col-1||(board[a.row][a.col]=board[toMove.row][toMove.col],board[toMove.row][toMove.col]=0):a.row<toMove.row&&(a.row==toMove.row-2?a.col==toMove.col+2&&board[toMove.row-1][toMove.col+1]>0?(board[toMove.row-1][toMove.col+1]=0,board[a.row][a.col]=board[toMove.row][toMove.col],board[toMove.row][toMove.col]=0,l=!0):a.col==toMove.col-2&&board[toMove.row-1][toMove.col-1]>0&&(board[toMove.row-1][toMove.col-1]=0,board[a.row][a.col]=board[toMove.row][toMove.col],board[toMove.row][toMove.col]=0,l=!0):n||a.row!=toMove.row-1||a.col!=toMove.col+1&&a.col!=toMove.col-1||(board[a.row][a.col]=board[toMove.row][toMove.col],board[toMove.row][toMove.col]=0)),0==a.row&&-1==board[a.row][a.col]&&(board[a.row][a.col]=-3,requestAnimationFrame(function(){draw_board(board)}),player=!1,toMove={row:0,col:0},computer_move()),0==board[toMove.row][toMove.col]&&(requestAnimationFrame(function(){draw_board(board)}),l&&!has_capture(a)||!l?(player=!1,toMove={row:0,col:0},computer_move()):toMove=a)}}}function has_capture(o){var e=!1;switch(board[o.row][o.col]){case-3:o.row<6&&o.col>1&&board[o.row+1][o.col-1]>0&&0==board[o.row+2][o.col-2]&&(paint_blue({row:o.row+2,col:o.col-2}),e=!0),o.row<6&&o.col<6&&board[o.row+1][o.col+1]>0&&0==board[o.row+2][o.col+2]&&(paint_blue({row:o.row+2,col:o.col+2}),e=!0);case-1:o.row>1&&o.col>1&&board[o.row-1][o.col-1]>0&&0==board[o.row-2][o.col-2]&&(paint_blue({row:o.row-2,col:o.col-2}),e=!0),o.row>1&&o.col<6&&board[o.row-1][o.col+1]>0&&0==board[o.row-2][o.col+2]&&(paint_blue({row:o.row-2,col:o.col+2}),e=!0)}return e}function computer_move(){try{var o=generate_next(board);if(ai_pcs(board)<6)for(var e=capturable(o[0]),r=1;r<o.length;++r){var t=capturable(o[r]);if(t<e)e=t,r=0;else{if(t==e)continue;o.splice(r,1),r-=1}}var a={score:0,index:0};a.score=agent.predict(minmax(to_board(reverse(minmax(to_board(reverse(o[0])))))));for(r=1;r<o.length;++r){var c=agent.predict(minmax(to_board(reverse(minmax(to_board(reverse(o[r])))))));c>=a.score&&(a.score=c,a.index=r)}board=to_board(o[a.index]),requestAnimationFrame(function(){draw_board(board)}),player=!0}catch(o){board=[[0,1,0,1,0,1,0,1],[1,0,1,0,1,0,1,0],[0,1,0,1,0,1,0,1],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[-1,0,-1,0,-1,0,-1,0],[0,-1,0,-1,0,-1,0,-1],[-1,0,-1,0,-1,0,-1,0]],player=Math.random()>.5,draw_board(board),player||computer_move()}}function capturable(o){b=to_board(reverse(o));for(var e=0,r=0;r<8;++r)for(var t=0;t<8;++t)b[r][t]>0&&(e+=count_branches(b,r,t));return e}function ai_pcs(o){for(var e=0,r=0;r<8;++r)for(var t=0;t<8;++t)o[r][t]>0&&e++;return e}function count_branches(o,e,r){var t=0;if(o[e][r]>=1&&e<6){var a=o[e][r];if(r<6&&o[e+1][r+1]<0&&0==o[e+2][r+2]){o[e+2][r+2]=o[e][r],e+2==7&&(o[e+2][r+2]=3);var c=o[e+1][r+1];o[e+1][r+1]=0,o[e][r]!=o[e+2][r+2]?(o[e][r]=0,t+=1):(o[e][r]=0,t=count_branches(o,e+2,r+2)+1),o[e+1][r+1]=c,o[e][r]=a,o[e+2][r+2]=0}if(r>1&&o[e+1][r-1]<0&&0==o[e+2][r-2]){o[e+2][r-2]=o[e][r],e+2==7&&(o[e+2][r-2]=3);c=o[e+1][r-1];o[e+1][r-1]=0,o[e][r]!=o[e+2][r-2]?(o[e][r]=0,t+=1):(o[e][r]=0,t=count_branches(o,e+2,r-2)+1),o[e+1][r-1]=c,o[e][r]=a,o[e+2][r-2]=0}}if(3==o[e][r]&&e>1){if(r<6&&o[e-1][r+1]<0&&0==o[e-2][r+2]){o[e-2][r+2]=o[e][r],o[e][r]=0;c=o[e-1][r+1];o[e-1][r+1]=0,t=count_branches(o,e-2,r+2)+1,o[e-1][r+1]=c,o[e][r]=o[e-2][r+2],o[e-2][r+2]=0}if(r>1&&o[e-1][r-1]<0&&0==o[e-2][r-2]){o[e-2][r-2]=o[e][r],o[e][r]=0;c=o[e-1][r-1];o[e-1][r-1]=0,t=count_branches(o,e-2,r-2)+1,o[e-1][r-1]=c,o[e][r]=o[e-2][r-2],o[e-2][r-2]=0}}return t}function minmax(o){var e=generate_next(o),r={score:0,index:0},t=generate_next(to_board(reverse(e[0])));if(t.length<1)return e[0];r.score=agent.predict(reverse(t[0]));for(var a=1;a<t.length;++a){(n=agent.predict(reverse(t[a])))<r.score&&(r.score=n)}for(a=1;a<e.length;++a){if((t=generate_next(to_board(reverse(e[a])))).length<1)return e[a];for(var c=agent.predict(reverse(t[0])),l=1;l<t.length;++l){var n;(n=agent.predict(reverse(t[l])))<c&&(c=n)}c>=r.score&&(r.score=c,r.index=a)}return e[r.index]}function reverse(o){return to_input([[0,-o.get(31),0,-o.get(30),0,-o.get(29),0,-o.get(28)],[-o.get(27),0,-o.get(26),0,-o.get(25),0,-o.get(24),0],[0,-o.get(23),0,-o.get(22),0,-o.get(21),0,-o.get(20)],[-o.get(19),0,-o.get(18),0,-o.get(17),0,-o.get(16),0],[0,-o.get(15),0,-o.get(14),0,-o.get(13),0,-o.get(12)],[-o.get(11),0,-o.get(10),0,-o.get(9),0,-o.get(8),0],[0,-o.get(7),0,-o.get(6),0,-o.get(5),0,-o.get(4)],[-o.get(3),0,-o.get(2),0,-o.get(1),0,-o.get(0),0]])}function to_board(o){return[[0,o.get(0),0,o.get(1),0,o.get(2),0,o.get(3)],[o.get(4),0,o.get(5),0,o.get(6),0,o.get(7),0],[0,o.get(8),0,o.get(9),0,o.get(10),0,o.get(11)],[o.get(12),0,o.get(13),0,o.get(14),0,o.get(15),0],[0,o.get(16),0,o.get(17),0,o.get(18),0,o.get(19)],[o.get(20),0,o.get(21),0,o.get(22),0,o.get(23),0],[0,o.get(24),0,o.get(25),0,o.get(26),0,o.get(27)],[o.get(28),0,o.get(29),0,o.get(30),0,o.get(31),0]]}function generate_branches(o,e,r){var t=[to_input(o)];if(o[e][r]>=1&&e<6){var a=o[e][r];if(r<6&&o[e+1][r+1]<0&&0==o[e+2][r+2]){o[e+2][r+2]=o[e][r],e+2==7&&(o[e+2][r+2]=3);var c=o[e+1][r+1];o[e+1][r+1]=0,o[e][r]!=o[e+2][r+2]?(o[e][r]=0,t=t.concat([to_input(o)])):(o[e][r]=0,t=t.concat(generate_branches(o,e+2,r+2))),o[e+1][r+1]=c,o[e][r]=a,o[e+2][r+2]=0}if(r>1&&o[e+1][r-1]<0&&0==o[e+2][r-2]){o[e+2][r-2]=o[e][r],e+2==7&&(o[e+2][r-2]=3);c=o[e+1][r-1];o[e+1][r-1]=0,o[e][r]!=o[e+2][r-2]?(o[e][r]=0,t=t.concat([to_input(o)])):(o[e][r]=0,t=t.concat(generate_branches(o,e+2,r-2))),o[e+1][r-1]=c,o[e][r]=a,o[e+2][r-2]=0}}if(3==o[e][r]&&e>1){if(r<6&&o[e-1][r+1]<0&&0==o[e-2][r+2]){o[e-2][r+2]=o[e][r],o[e][r]=0;c=o[e-1][r+1];o[e-1][r+1]=0,t=t.concat(generate_branches(o,e-2,r+2)),o[e-1][r+1]=c,o[e][r]=o[e-2][r+2],o[e-2][r+2]=0}if(r>1&&o[e-1][r-1]<0&&0==o[e-2][r-2]){o[e-2][r-2]=o[e][r],o[e][r]=0;c=o[e-1][r-1];o[e-1][r-1]=0,t=t.concat(generate_branches(o,e-2,r-2)),o[e-1][r-1]=c,o[e][r]=o[e-2][r-2],o[e-2][r-2]=0}}return t}function generate_next(o){for(var e=[],r=0;r<8;++r)for(var t=0;t<8;++t)o[r][t]>0&&(e=e.concat(generate_branches(o,r,t).slice(1)));if(e.length>0)return e;for(r=0;r<8;++r)for(t=0;t<8;++t){if(o[r][t]>=1&&r<7){var a=o[r][t];t<7&&0==o[r+1][t+1]&&(o[r+1][t+1]=o[r][t],r+1==7&&(o[r+1][t+1]=3),o[r][t]=0,e=e.concat([to_input(o)]),o[r][t]=a,o[r+1][t+1]=0),t>0&&0==o[r+1][t-1]&&(o[r+1][t-1]=o[r][t],r+1==7&&(o[r+1][t-1]=3),o[r][t]=0,e=e.concat([to_input(o)]),o[r][t]=a,o[r+1][t-1]=0)}3==o[r][t]&&r>0&&(t<7?0==o[r-1][t+1]&&(o[r-1][t+1]=o[r][t],o[r][t]=0,e=e.concat([to_input(o)]),o[r][t]=o[r-1][t+1],o[r-1][t+1]=0):t>0&&0==o[r-1][t-1]&&(o[r-1][t-1]=o[r][t],o[r][t]=0,e=e.concat([to_input(o)]),o[r][t]=o[r-1][t-1],o[r-1][t-1]=0))}return e}c.addEventListener("click",userInterface);