People vs Differential Evolution in Search of The Shortest Path

The most common aim of computer game optimisation is to nd the shortest path within a game or to solve a problem of a travelling salesman within a small group of cities. This article deals with the possibilities of comparing the ascertained solutions of a given problem of human intelligence and evolutionary algorithms. Human intelligence is represented by mobile game players programmed for the Android operating system, by their conduct during playing the game, and by the achieved the results. Evolutionary algorithms are represented by di erential evolution. The best possible parameter estimation will be sought and compared with the player's results. The goal is to nd parameter estimation of an equal or better quality in comparison with results of human players. Another task is to verify whether this setting is suitable for all mazes and whether people or the di erential evolution are better at searching.


Introduction
ou will hrdly meet person who hs never plyed omputer gme whether on his or her phone or on omputerF eople enjoy (lling the lnk spes in their free time y resting while plying omputer gmes ndD wht9s moreD they even orgnise tournments in this tivE ityF eording to @yruse niversity9s online wfe progrmD PHIW IHAD it eomes inresE ingly populr every yer to monitor omputer gme plyers nd ertin res re even eomE ing s populr s wthing the lssi sports tournmentsF lying omputer gmes is tuE lly disussed to e possily dded mong the new sports disiplines of the eports tegory @ghris feerD PHIW IPA t the ummer ylympi qmes in PHPR whih will tke ple in ris @snterntionl ylympi gommitteeD PHIW IIAF he most ommon issue of omputer gmes s well s the generl informtion sienes is to look for the shortest pth through (eld of ostlesF his prolem ould e generlised s serhing for the shortest pth through mze where we need to (nd our wy from point e to point fF he solution omprises vrious lgorithms sed on vrious priniples @hF qreen et lFD PHIU RAF he simplest solution is to use rute fore where the re is serhed through widthwiseF his solution n e optimised y trying to mke widthwise serh ut in the ssumed direE tionF he most sophistited nd omplex soluE c 2020 Journal of Advanced Engineering and Computation (JAEC) 207 tion is using evolutionry lgorithms @wrrowD PHHH SAF here re vrious options nd the limE iting ftor is lwys the required ury of results nd how timeEdemnding is the serhF sn this rtileD we will e ompring the onE dut of people in omputer gme with the use of the di'erentil evolution lgorithmF e will set olletions of solutions of the shortest pths tht n e found y omputer gme plyers nd ompre them with the solutions sertined y the di'erentil evolution E hiF he im is to (nd suitle setting for hi whih ould led to reltively esy provision of solution of the highest qulity omprle with the solution provided y rel people plying the gmesD who n prtilly see the solutions in front of them within smll mzesF e will verify whether the sme hi setting n e pplied to vrious kinds of mzeF et the sme timeD we will determine whether rel people or hi n provide etter reE serh outomes @rieD tornD vmpinenD PHHS TAF 2. Motivation he motivtion is to ompre group of peoE ple plying the sme gme with n evolutionry lgorithmF sn the se of n evolutionry lgoE rithmD di'erent results n e hieved due to hnge in the prmeter settingsF he gol is to ompre humn intelligene with the intelE ligene of n evolutionry lgorithm lso with regrd to the size nd omplexity of the mzeF enother gol is to verify the possiility of the exE istene of one hi prmeter settingD tht would e optiml for di'erent types of gmesF 3. Experiment design 3.1. Solution design he entire work is divided into two tsksF he (rst one is to progrmme gme pplition for users of moile phones with the endroid y with server prt tht should e reording the individul resulting pths nd their lengths @ehnD hishD PHHV VAF he seond tsk is to rete solution y using hiF he settings of the input hi prmeters n e hnged nd solution will e soughtD tht would e etter ompred to the previous onesD nd thnks to this feedkD the hi setting will e optimized @elinkD sekD vmpinenD PHHI QAF a) User game sn order to hve it more populrised nd villeD the gme rvelling lesmn hs een progrmmed etter for moile phones with the endroid operting systemD the ion of whih is displyed s pigF IF enE droid developer pge ws used tively for reting the pp @endroid developer pgeD PHPH WAF epp rvelling lesmn n e instlled from qoogle ly server hereX httpsXGGplyFgoogleFomGstoreGppsGdetilscid azFukekFtrvellingslesmn enother option is to instll with qoogle ly diretly from endroid devie nd (nd the pp using the rvelling lesmn nmeF pon the instlltion nd initition of the gmeD the plyers enter their niknme pigF PF he reson why niknme is required is the possiility of susequent omprison of the reE sults of given plyer with othersF he results of eh plyer re reorded in the logs t the server pgeF lyers do not see the pths of other plyE ersD ut only the numer of steps of the urrently shortest pthD ompred to the prllel solution of the ywe lgorithm @elinkD fukekD PHIT UAF b) Description of communication in Game 208 c 2020 Journal of Advanced Engineering and Computation (JAEC) VOLUME: 4 | ISSUE: 3 | 2020 | September he gme onsists of IH levels with progressively inresing di0ulty s the serhed re keeps enlrgingF pigure Q ompres grphilly the (rst nd the lst level genertedF pon strting the gme on n endroid devieD pigF R the devie is onneted to the pplition server whih is indited in pigF S y the orE nge rrowD nd the mps for given gme tsks re downloded long with the highest sores tE tined for the given levelsF he plyers will see this wy the highest sore ttined whih they either ttempt to exeed or t lest ttin the sme soreF he ourse of the gme is sved into the log nd sent to the server upon ompletion of the given round where it is svedF sn pigF S this is indited y the lue rrowF

Algorithm of dierential evolution
he desription of the lssi di'erentil evoluE tion @rie nd tornD IWWS IA is s followsF he initil popultion P 0 with elements N from the popultion of possile solutions P is determined y n equl seletion from spe SF he vlue of the ojetive funtion is lulted for ll points of the initil popultionF a) Pseudocode DE Initial population generation P 0 = (x 1 , x 2 , ..., x n ) por ll elements P 0 lulte the vlues of the end while e new possile solution Q G enters the new popultion yD the vlue of whih is given y the result of the inomil rossing nd the vlue is either the result of the muttion u or the (rst rndomly seleted solution r 1 from the previE ous popultionF he intersetion tkes ple in suh wy tht if the rndomly seleted numer from the intervl @HEIA is less thn or equl to the intersetion onstnt CR with the vlue from intervl @HEIAD the vlue y is formed y the mutted solution uF ytherwise y rndom solution r 1 F he mutted solution u rises using si rndom muttion of three rndomly seleted solutions r 1 , r 2 , r 3 from the previous genertion ording to the formul u = r 1 + F (r 2 − r 3 )D where F is muttion prmeter with vlue of @HEIAF his new soE lution y otined y muttion nd rossing will enter new popultion if its funtionl vlueD in our se the pth length is less thn or equl to the pth length of the solution from the previous genertionF ytherwiseD it enters new populE tion Q G solution x i D where i is the order of the solutionF es resultD only etter or the sme soE lutions enter new popultions thn in previous popultionsF b) Dierential Evolution in the game es for progrmming the di'erentil evolution serhing the mzeD we will need to del with the key issueD iFeF the ft tht the lssi lE gorithm of di'erentil evolution works in onE tinuous environment rther thn in disrete oneF ithin the mzeD rossrods @ itiesA re given where the lgorithm must stopD yet it must visit ll of them in order to prevent the soE lution from penliztion for tking the inorret pthF ih ity follows ertin group of ities where the ities re not situted next to eh otherF sn order to ompre the deisionEmking of hi nd of peopleD we must tke into ount the ft tht entire pths re ompred with hiD whih is ontrry to humn deisionEmking @nnkkisD ogelius PHIV PAF es for the ltE terD every individul ttempts to go through the mze from one point to nother nd if there is n unvisited ple on the wy nd it is possile to visit itD the individul deides to tke this detour to optimize etter the e'orts mde in order to tke this pth nd to ssess it etterF e person onsiders longer pth t eh rossrods of the given mzeY hi does not mke suh onsiderE tionsF he solution within the (rst genertion is determined y hi s ll pths whih n e pssed without onsidering the individul ples through whih it hs trvelled lredy or whih it hs not visitedF he resulting pths re reE ted y these prtil pths etween the ities regrdless of ny pths tken lredyF roweverD there re lwys etter solutions to e found from whih other genertions produe smrt inE dividulsD iFeF new solutionsD whih then trverse the pths ndD in the endD the lst genertions of hi tke the orret shortest pthsF 210 c 2020 Journal of Advanced Engineering and Computation (JAEC) sn order to omine the pths within the mze nd set resulting pth through the mze every timeD n entire ssessment must e (rst mde etween the shortest points within the mzeF sn this seD the est solution is to rete dtse @ tleA where the lengths of the pths etween the individul pths n e found esilyF he dtse is reted efore the hi initition y mens of n lgorithm of rute fore whih (nds the shortest distne for eh ity to the other ities y serhing widthwiseF pigure T displys tle of the shortest pths within the mzeF he oordintes of two spei( ities re mrked green with oordintes SES nd SEID nd the distne etween them is R stepsF he shortest pth for these two ities within the mze itself is displyed in pigF UF sn pigF V of the sme tle of the shortest pthsD the pth of V steps etween the ities UES nd UEI is highlighted nd it is displyed in the mze of pigF WF 4. Results

Measured values
rumns re represented y group of IH people ged UETHF ih person plys eh level t lest oneF

Findings a) Conduct of humans vs. DE
he result of omprison of humn ondut on the sme lol pth with the hi ondut is lso worth mentioningF hi is set in suh wy tht the (nl pth lengthD ontining the lredy visE ited plesD is penlised proportionlly to the numer of suh repeted visitsF por instneD if we re supposed to get from point e to point fD s displyed in pigsF IH or IID nd we wish to visit points ID P nd Q on the wy s wellD we hve two options to do thtX the pth following pigsF IH or IIF hiD 'eted y the trversing nd sE sessmentD will reh the est pth following pigF IHD s the pth following pigF II is penlised for visiting ity P repetedlyF es opposed to thtD humns tend to selet the vrint following pigF IIF sn ftD it does not mtter whih vrint is seletedD s oth pths re of the sme lengthD oth (gures disply prt from ity I to ity P of the sme length nd two identil prts etween ities P nd QF b) Blind alleys hespite the ft tht the generted grphs do not ontin ny lind orridors nd the rossE rods lwys hve t lest Q pths within the mzeD there re linds lleys ontinedF es disE plyed in pigF IPD lind lley is suh prt of the mze with only one pth leding to it nd this pth must lso e used to return from this reF e lind lley ontins severl itiesF sf there re more suh lleys within the mzeD it is more di0ult for hi to omine this pthY lolly lind lley is pssed orretly y hi evolutionF e lind lley n e reted even if the re n e essed from two ends nd one of these ends ws used for susidiry lol serhF sf we use this pth ginD the resulting pth is proE longed y itF sf we enter the re through pth we hve not used eforeD when exiting the reD we will need to tke one of the pths we hve lredy used in oth sesF st is est to keep suh n re till the end of serhing nd enter the re through pth we hve not used eE foreD or more preiselyD through ity we hve not visited eforeF

Conclusions
e my sy tht the (rst humn solution is not d t llD euse people use their ommon sense when eing t rossrods nd they do not selet the pths etween the ities rndomlyD s displyed in pigsF IQ nd IRF he given re n e pssed in di'erent wysF e thinking perE son will selet suonsiously the shortest lol pth nd solve the pssge through the entire mp s ompound of the shortest pthsF prom the omprisonsD it emerges tht the huE mns mostly use n lgorithm to (nd the shortE est onnetion whih they ttempt to pss in suh n order tht will mke the totl pth s short s possileF he green intuitive humn solution is rtionlD orret nd fst with smll mzesF yur gming levels n e divided into three types depending on their sizeF vow levels @smll mzes of level I nd PAD medium levels @QEUA nd high levels @VEIHAF es for the low levelsD the reE sults of people nd hi re identilD oth teE gories found short pths within the mze of the sme lengthF hi evolution found more omiE ntion shpes with the sme lengthD ut needs  reltively lrge numer of evolution ylesD lrge popultion to o'er veri(le nd the shortest pthF e my sy tht people ome to the sme or even etter onlusions thn hi with less e'ortF es for the medium levelsD the results of hi re etter thn the ones of peoE pleF e n see tht the mps ontin some lind lleys with only one entrneD ut there re not s mny of thoseD so the hi with the sme settings s for the low levels did well nd found the est omintionF hi is etter t these levelsF es opposed to thtD people re oE vious winners when pssing through lrge mzesF here re more lind lleys nd it is neessry to omine them etterF hi strts onneting the lind lleys whih re not lwys neighourE ingD ut sometimes in lep through the entire gme pln nd so often visited some ples reE petedlyF st emerges from the mesured vlues nd oserving the lgorithm tht it is lwys etter to set higher g vlue @HEIHHAD iFeF pE proximtely VH7D s it leds to higher trverE sl numer nd prmeter p @HEIA within HFSEIF hnks to these settingsD the lgorithm will try to pss more pths nd more omintions of itiesF eople re le to keep in mind the entire pth nd to orient themselvesD so when there is pleD they hve not visited next to the ple they hve just pssedD they visit this ple s wellF here is not single ommon hi setting for ll kinds of mzesD s it depends on the size of the mzeD the numer of itiesD the numer of lind lleys nd on the lleys neighouring to the given (eldF purthermoreD the element of hne plys prt in hi t ll timesF e good solution n e reted even in the (rst generE tions nd ll solutions derived therefrom my not e neessrily s goodF sn the next workD it would e good to dd the hi optimiztion so tht when generting rndom lol rodsD nother ity lredy pssed on the given rod would e reorded nd tken into ountF he hi lgorithm does not tke into ount the sitution whenD for exmpleD we hve three ities mrked eD fD gD whih lies on the line egD where etween points e nd g lies point fF hen of ourse the shortest pth is given y the sequene eD fD gD ut the lE gorithm rndomly genertes s one of the (rst solutions the pth eD gD fD while in order to get from e to gD he hd to visit ity fD ut s if he ws not thereD he returns to ity f fter pssing ity gF his pth is of ourse longer thn the vrint eD fD gD ut it is ultivted in the next genertions due to muttions nd rosses to the orret resultF