diff --git a/a1/report/images/amplituda_nihanja_2050.png b/a1/report/images/amplituda_nihanja_2050.png new file mode 100644 index 00000000..03dec438 Binary files /dev/null and b/a1/report/images/amplituda_nihanja_2050.png differ diff --git a/a1/report/images/graf_dejanskih_podatkov_vs_izracunanih.png b/a1/report/images/graf_dejanskih_podatkov_vs_izracunanih.png new file mode 100644 index 00000000..ba9a5aff Binary files /dev/null and b/a1/report/images/graf_dejanskih_podatkov_vs_izracunanih.png differ diff --git a/a1/report/solution.aux b/a1/report/solution.aux new file mode 100644 index 00000000..545ab0f8 --- /dev/null +++ b/a1/report/solution.aux @@ -0,0 +1,11 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{1}{}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {2}Solution}{1}{}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Task 1}{1}{}\protected@file@percent } +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.1.1}Task description}{1}{}\protected@file@percent } +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.1.2}Read the map into a suitable format}{2}{}\protected@file@percent } +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.1.3}Choose a suitable representation of your solutions}{2}{}\protected@file@percent } +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.1.4}Define the fitness function}{2}{}\protected@file@percent } +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.1.5}Run the genetic algorithm with suitable settings}{3}{}\protected@file@percent } +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.1.6}Results}{4}{}\protected@file@percent } +\gdef \@abspage@last{4} diff --git a/a1/report/solution.fdb_latexmk b/a1/report/solution.fdb_latexmk new file mode 100644 index 00000000..41e86fb4 --- /dev/null +++ b/a1/report/solution.fdb_latexmk @@ -0,0 +1,64 @@ +# Fdb version 3 +["pdflatex"] 1668172364 "solution.tex" "solution.pdf" "solution" 1668172364 + "/usr/share/texmf-dist/fonts/enc/dvips/cm-super/cm-super-ts1.enc" 1650183167 2900 1537cc8184ad1792082cd229ecc269f4 "" + "/usr/share/texmf-dist/fonts/map/fontname/texfonts.map" 1650183167 3524 cb3e574dea2d1052e39280babc910dc8 "" + "/usr/share/texmf-dist/fonts/tfm/jknappen/ec/tcrm0900.tfm" 1650183167 1536 c4f439db76ef96a9c53bc437f35ffe20 "" + "/usr/share/texmf-dist/fonts/tfm/jknappen/ec/tcrm1000.tfm" 1650183167 1536 e07581a4bb3136ece9eeb4c3ffab8233 "" + "/usr/share/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm" 1650183167 1004 54797486969f23fa377b128694d548df "" + "/usr/share/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex8.tfm" 1650183167 988 bdf658c3bfc2d96d3c8b02cfc1c94c20 "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmbx10.tfm" 1650183167 1328 c834bbb027764024c09d3d2bf908b5f0 "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm" 1650183167 1324 c910af8c371558dc20f2d7822f66fe64 "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmex10.tfm" 1650183167 992 662f679a0b3d2d53c1b94050fdaa3f50 "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm" 1650183167 1524 4414a8315f39513458b80dfc63bff03a "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm" 1650183167 1512 f21f83efb36853c0b70002322c1ab3ad "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm" 1650183167 1520 eccf95517727cb11801f4f1aee3a21b4 "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmr12.tfm" 1650183167 1288 655e228510b4c2a1abe905c368440826 "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmr17.tfm" 1650183167 1292 296a67155bdbfc32aa9c636f21e91433 "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmr6.tfm" 1650183167 1300 b62933e007d01cfd073f79b963c01526 "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmr8.tfm" 1650183167 1292 21c1c5bfeaebccffdb478fd231a0997d "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmr9.tfm" 1650183167 1292 6b21b9c2c7bebb38aa2273f7ca0fb3af "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm" 1650183167 1124 6c73e740cf17375f03eec0ee63599741 "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm" 1650183167 1116 933a60c408fc0a863a92debe84b2d294 "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm" 1650183167 1120 8b7d695260f3cff42e636090a8002094 "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmti10.tfm" 1650183167 1480 aa8e34af0eb6a2941b776984cf1dfdc4 "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmtt10.tfm" 1650183167 768 1321e9409b4137d6fb428ac9dc956269 "" + "/usr/share/texmf-dist/fonts/tfm/public/cm/cmtt9.tfm" 1650183167 764 c98a2af25c99b73a368cf7336e255190 "" + "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb" 1650183167 34811 78b52f49e893bcba91bd7581cdc144c0 "" + "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb" 1650183167 32080 340ef9bf63678554ee606688e7b5339d "" + "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb" 1650183167 36299 5f9df58c2139e7edcf37c8fca4bd384d "" + "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb" 1650183167 35752 024fb6c41858982481f6968b5fc26508 "" + "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb" 1650183167 32722 d7379af29a190c3f453aba36302ff5a9 "" + "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb" 1650183167 32362 179c33bbf43f19adbb3825bb4e36e57a "" + "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb" 1650183167 33993 9b89b85fd2d9df0482bd47194d1d3bf3 "" + "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb" 1650183167 37944 359e864bd06cde3b1cf57bb20757fb06 "" + "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb" 1650183167 31099 c85edf1dd5b9e826d67c9c7293b6786c "" + "/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt9.pfb" 1650183167 29078 718ea4567ceff944262b0f5b0800e1d9 "" + "/usr/share/texmf-dist/fonts/type1/public/cm-super/sfrm0900.pfb" 1650183167 149037 995a6f1e12c1d647b99b1cf55db78699 "" + "/usr/share/texmf-dist/fonts/type1/public/cm-super/sfrm1000.pfb" 1650183167 138258 6525c253f16cededa14c7fd0da7f67b2 "" + "/usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii" 1650183167 71627 94eb9990bed73c364d7f53f960cc8c5b "" + "/usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty" 1650183167 2222 da905dc1db75412efd2d8f67739f0596 "" + "/usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty" 1650183167 4173 bc0410bcccdff806d6132d3c1ef35481 "" + "/usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty" 1650183167 87648 07fbb6e9169e00cb2a2f40b31b2dbf3c "" + "/usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty" 1650183167 4128 8eea906621b6639f7ba476a472036bbe "" + "/usr/share/texmf-dist/tex/latex/amsmath/amstext.sty" 1650183167 2444 926f379cc60fcf0c6e3fee2223b4370d "" + "/usr/share/texmf-dist/tex/latex/base/article.cls" 1650183167 20144 8a7de377ae7a11ee924a7499611f5a9d "" + "/usr/share/texmf-dist/tex/latex/base/size10.clo" 1650183167 8448 96f18c76bf608a36ee6fbf021ac1dd32 "" + "/usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty" 1650183167 13886 d1306dcf79a944f6988e688c1785f9ce "" + "/usr/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty" 1650183167 44020 81e985253f43a03ce2683caca98d0d1b "" + "/usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg" 1650183167 1224 978390e9c2234eab29404bc21b268d1e "" + "/usr/share/texmf-dist/tex/latex/graphics-def/pdftex.def" 1650183167 19103 48d29b6e2a64cb717117ef65f107b404 "" + "/usr/share/texmf-dist/tex/latex/graphics/graphics.sty" 1650183167 18399 7e40f80366dffb22c0e7b70517db5cb4 "" + "/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty" 1650183167 7996 a8fb260d598dcaf305a7ae7b9c3e3229 "" + "/usr/share/texmf-dist/tex/latex/graphics/keyval.sty" 1650183167 2671 4de6781a30211fe0ea4c672e4a2a8166 "" + "/usr/share/texmf-dist/tex/latex/graphics/trig.sty" 1650183167 4009 187ea2dc3194cd5a76cd99a8d7a6c4d0 "" + "/usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def" 1650183167 31644 9b75b7ffdb38fbd7bb4502cd6b086a3c "" + "/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg" 1650183167 678 4792914a8f45be57bb98413425e4c7af "" + "/usr/share/texmf-dist/web2c/texmf.cnf" 1650183167 39911 2da6c67557ec033436fe5418a70a8a61 "" + "/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map" 1667976612 4278762 af3ac1370db81a450c1118eabf1fe718 "" + "/var/lib/texmf/web2c/pdftex/pdflatex.fmt" 1667976608 2927660 ed1b7bf104dc0149386d555914042848 "" + "solution.aux" 1668172364 1098 f711545465c52d34863922edaf38c98e "pdflatex" + "solution.tex" 1668172363 7409 561f6cd6b4bec52f7c6292cacb0b9fb4 "" + (generated) + "solution.aux" + "solution.log" + "solution.pdf" diff --git a/a1/report/solution.fls b/a1/report/solution.fls new file mode 100644 index 00000000..820545c5 --- /dev/null +++ b/a1/report/solution.fls @@ -0,0 +1,219 @@ +PWD /home/gasperspagnolo/Documents/faks/3-letnik/1sem/is/assignments/a1/report +INPUT /usr/share/texmf-dist/web2c/texmf.cnf +INPUT /var/lib/texmf/web2c/pdftex/pdflatex.fmt +INPUT solution.tex +OUTPUT solution.log +INPUT /usr/share/texmf-dist/tex/latex/base/article.cls +INPUT /usr/share/texmf-dist/tex/latex/base/article.cls +INPUT /usr/share/texmf-dist/tex/latex/base/article.cls +INPUT /usr/share/texmf-dist/tex/latex/base/article.cls +INPUT /usr/share/texmf-dist/tex/latex/base/article.cls +INPUT /usr/share/texmf-dist/tex/latex/base/article.cls +INPUT /usr/share/texmf-dist/tex/latex/base/article.cls +INPUT /usr/share/texmf-dist/tex/latex/base/article.cls +INPUT /usr/share/texmf-dist/tex/latex/base/article.cls +INPUT /usr/share/texmf-dist/tex/latex/base/article.cls +INPUT /usr/share/texmf-dist/tex/latex/base/article.cls +INPUT /usr/share/texmf-dist/tex/latex/base/size10.clo +INPUT /usr/share/texmf-dist/tex/latex/base/size10.clo +INPUT /usr/share/texmf-dist/tex/latex/base/size10.clo +INPUT /usr/share/texmf-dist/tex/latex/base/size10.clo +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amstext.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amstext.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amstext.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amstext.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amstext.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amstext.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amstext.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amstext.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amstext.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amstext.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amstext.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +INPUT /usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +INPUT /usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +INPUT /usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +INPUT /usr/share/texmf-dist/tex/latex/graphics-def/pdftex.def +INPUT /usr/share/texmf-dist/tex/latex/graphics-def/pdftex.def +INPUT /usr/share/texmf-dist/tex/latex/graphics-def/pdftex.def +INPUT /usr/share/texmf-dist/tex/latex/graphics-def/pdftex.def +INPUT /usr/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty +INPUT /usr/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty +INPUT /usr/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty +INPUT /usr/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty +INPUT /usr/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty +INPUT /usr/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty +INPUT /usr/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty +INPUT /usr/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty +INPUT /usr/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty +INPUT /usr/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty +INPUT /usr/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty +INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty +INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def +INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def +INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def +INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def +INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def +INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def +INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def +INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def +INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def +INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def +INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def +INPUT ./solution.aux +INPUT solution.aux +INPUT solution.aux +OUTPUT solution.aux +INPUT /usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii +INPUT /usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii +INPUT /usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii +INPUT /usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii +INPUT /usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +INPUT /usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +INPUT /usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +INPUT /usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +INPUT /usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +INPUT /usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +INPUT /usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +INPUT /usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +INPUT /usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +INPUT /usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +INPUT /usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +INPUT /usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +INPUT /usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +INPUT /usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +INPUT /usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +INPUT /usr/share/texmf-dist/fonts/map/fontname/texfonts.map +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmr17.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmr9.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmr12.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmr8.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmr6.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmex10.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex8.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmr12.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmtt10.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmbx10.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/jknappen/ec/tcrm1000.tfm +OUTPUT solution.pdf +INPUT /var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map +INPUT /usr/share/texmf-dist/fonts/tfm/jknappen/ec/tcrm0900.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmtt9.tfm +INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmti10.tfm +INPUT solution.aux +INPUT /usr/share/texmf-dist/fonts/enc/dvips/cm-super/cm-super-ts1.enc +INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb +INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb +INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb +INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb +INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb +INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb +INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb +INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb +INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb +INPUT /usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt9.pfb +INPUT /usr/share/texmf-dist/fonts/type1/public/cm-super/sfrm0900.pfb +INPUT /usr/share/texmf-dist/fonts/type1/public/cm-super/sfrm1000.pfb diff --git a/a1/report/solution.log b/a1/report/solution.log new file mode 100644 index 00000000..3bdef66d --- /dev/null +++ b/a1/report/solution.log @@ -0,0 +1,167 @@ +This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022/Arch Linux) (preloaded format=pdflatex 2022.11.9) 11 NOV 2022 14:12 +entering extended mode + restricted \write18 enabled. + file:line:error style messages enabled. + %&-line parsing enabled. +**solution.tex +(./solution.tex +LaTeX2e <2021-11-15> patch level 1 +L3 programming layer <2022-04-10> (/usr/share/texmf-dist/tex/latex/base/article.cls +Document Class: article 2021/10/04 v1.4n Standard LaTeX document class +(/usr/share/texmf-dist/tex/latex/base/size10.clo +File: size10.clo 2021/10/04 v1.4n Standard LaTeX file (size option) +) +\c@part=\count185 +\c@section=\count186 +\c@subsection=\count187 +\c@subsubsection=\count188 +\c@paragraph=\count189 +\c@subparagraph=\count190 +\c@figure=\count191 +\c@table=\count192 +\abovecaptionskip=\skip47 +\belowcaptionskip=\skip48 +\bibindent=\dimen138 +) (/usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty +Package: amsmath 2021/10/15 v2.17l AMS math features +\@mathmargin=\skip49 + +For additional information on amsmath, use the `?' option. +(/usr/share/texmf-dist/tex/latex/amsmath/amstext.sty +Package: amstext 2021/08/26 v2.01 AMS text + (/usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +File: amsgen.sty 1999/11/30 v2.0 generic functions +\@emptytoks=\toks16 +\ex@=\dimen139 +)) (/usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty +Package: amsbsy 1999/11/29 v1.2d Bold Symbols +\pmbraise@=\dimen140 +) (/usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +Package: amsopn 2021/08/26 v2.02 operator names +) +\inf@bad=\count193 +LaTeX Info: Redefining \frac on input line 234. +\uproot@=\count194 +\leftroot@=\count195 +LaTeX Info: Redefining \overline on input line 399. +\classnum@=\count196 +\DOTSCASE@=\count197 +LaTeX Info: Redefining \ldots on input line 496. +LaTeX Info: Redefining \dots on input line 499. +LaTeX Info: Redefining \cdots on input line 620. +\Mathstrutbox@=\box50 +\strutbox@=\box51 +\big@size=\dimen141 +LaTeX Font Info: Redeclaring font encoding OML on input line 743. +LaTeX Font Info: Redeclaring font encoding OMS on input line 744. +\macc@depth=\count198 +\c@MaxMatrixCols=\count199 +\dotsspace@=\muskip16 +\c@parentequation=\count266 +\dspbrk@lvl=\count267 +\tag@help=\toks17 +\row@=\count268 +\column@=\count269 +\maxfields@=\count270 +\andhelp@=\toks18 +\eqnshift@=\dimen142 +\alignsep@=\dimen143 +\tagshift@=\dimen144 +\tagwidth@=\dimen145 +\totwidth@=\dimen146 +\lineht@=\dimen147 +\@envbody=\toks19 +\multlinegap=\skip50 +\multlinetaggap=\skip51 +\mathdisplay@stack=\toks20 +LaTeX Info: Redefining \[ on input line 2938. +LaTeX Info: Redefining \] on input line 2939. +) (/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR) + (/usr/share/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks21 +) (/usr/share/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2021/03/04 v1.4d Standard LaTeX Graphics (DPC,SPQR) + (/usr/share/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 2021/08/11 v1.11 sin cos tan (DPC) +) (/usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration +) +Package graphics Info: Driver file: pdftex.def on input line 107. + (/usr/share/texmf-dist/tex/latex/graphics-def/pdftex.def +File: pdftex.def 2020/10/05 v1.2a Graphics/color driver for pdftex +)) +\Gin@req@height=\dimen148 +\Gin@req@width=\dimen149 +) (/usr/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty +Package: fancyvrb 2022/04/12 4.2 verbatim text (tvz,hv) +\FV@CodeLineNo=\count271 +\FV@InFile=\read2 +\FV@TabBox=\box52 +\c@FancyVerbLine=\count272 +\FV@StepNumber=\count273 +\FV@OutFile=\write3 +) (/usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def +File: l3backend-pdftex.def 2022-04-14 L3 backend support: PDF output (pdfTeX) +\l__color_backend_stack_int=\count274 +\l__pdf_internal_box=\box53 +) + +LaTeX Warning: Unused global option(s): + [A4]. + +(./solution.aux) +\openout1 = `solution.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. + (/usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +\scratchcounter=\count275 +\scratchdimen=\dimen150 +\scratchbox=\box54 +\nofMPsegments=\count276 +\nofMParguments=\count277 +\everyMPshowfont=\toks22 +\MPscratchCnt=\count278 +\MPscratchDim=\dimen151 +\MPnumerator=\count279 +\makeMPintoPDFobject=\count280 +\everyMPtoPDFconversion=\toks23 +) (/usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf +Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 485. + (/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live +)) [1 + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] [3] [4] (./solution.aux) ) +Here is how much of TeX's memory you used: + 2406 strings out of 478238 + 36975 string characters out of 5850456 + 340297 words of memory out of 5000000 + 20654 multiletter control sequences out of 15000+600000 + 476294 words of font info for 53 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 55i,6n,62p,225b,256s stack positions out of 5000i,500n,10000p,200000b,80000s +{/usr/share/texmf-dist/fonts/enc/dvips/cm-super/cm-super-ts1.enc} +Output written on solution.pdf (4 pages, 159523 bytes). +PDF statistics: + 78 PDF objects out of 1000 (max. 8388607) + 47 compressed objects within 1 object stream + 0 named destinations out of 1000 (max. 500000) + 1 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/a1/report/solution.pdf b/a1/report/solution.pdf new file mode 100644 index 00000000..b87dcd3a Binary files /dev/null and b/a1/report/solution.pdf differ diff --git a/a1/report/solution.synctex.gz b/a1/report/solution.synctex.gz new file mode 100644 index 00000000..9bef492f Binary files /dev/null and b/a1/report/solution.synctex.gz differ diff --git a/a1/report/solution.tex b/a1/report/solution.tex new file mode 100644 index 00000000..23d510b9 --- /dev/null +++ b/a1/report/solution.tex @@ -0,0 +1,127 @@ +\documentclass[A4]{article} +\usepackage{amsmath} +\usepackage{graphicx} +\usepackage{fancyvrb} + +\begin{document} +\title{% +Seminar Assignment 1\\ +\small Intelligent Systems - FRI} +\author{Gasper Spagnolo} +\maketitle \section{Introduction} +In the first seminar assignment, your goal is to use genetic algorithms to find a path out of a maze, +represented as a vector of strings, where $\#$ characters represent walls, $.$ represent empty spaces, and +S and E represent the starting and ending points, as in a given example below: +\begin{center} +\begin{BVerbatim} + maze = c("####E######", + "##...#.####", + "#..#.#.####", + "#.##...####", + "#.##.#..S##", + "###########") +\end{BVerbatim} +\end{center} +You can move through the maze in four directions, left, right, up, and down. In the example above, +the shortest path from the starting position S to the exit E is composed of the following moves: left, +left, up, left, left, up, up, up. In your solution, this should be represented as a string ”LLULLUUU”. +Your task is to create a function that will be able to find path as short as possible out of any maze +represented in such a way + +\section{Solution} +\subsection{Task 1} +I decided to write this assignment in python using the pygad library becouse I am more familiar with this programming language. +\subsubsection{Task description} +Create a function that reads the 2D representation of a maze and returns the shortest path found by +a genetic algorithm. To do this, you will need to: +\begin{itemize} + \item Read the map into a suitable format (for example, a matrix). + \item choose a suitable representation of your solutions (the path). Hint: you don’t need to use strings +when working with the genetic algorithm. You can use numeric or binary representations for the +GA function and then convert the result to a string as the final result. + \item Define the fitness function. Make sure to penalise paths through walls - those are invalid solutions + \item Run the genetic algorithm with suitable settings. +\end{itemize} + +\subsubsection{Read the map into a suitable format} +I decided to read all the maps provided in the assignment into a list of lists. Each list represents a +maze and each element of the list represents a row of the maze. + +\subsubsection{Choose a suitable representation of your solutions} +I decided to use a binary representation of the solution same size as an original maze. Each bit represents a move. 0 means that the agent did +not visit the cell and 1 means that the agent visited the cell. So if maze is of size N x M, the solution will be of size N x M. But there is no +such thing as N-dimensional array that GA accepts. So I reshaped the matrix into a vector of size N * M and worked with that kind of solution. + +\subsubsection{Define the fitness function} +This part was the most difficult for me. I maybe overcomplicated that part but at least it yields good results. +Before runing the algorithm I have decided to construct a punish matrix, which is a matrix of the same size as the maze. Each cell in the punish matrix is +evaluated before the algorithm starts. The evaluation is based on the position of walls and valid paths. So if there is a wall in the cell, the fitness value in that cell is set to some low scalar. +If there is a valid move then the fitness value in that cell is high. So everytime the fitness function is called, the matrix product will be executed and some initiall fitness value will be computed asfollows: +\begin{center} +\begin{BVerbatim} + fitness = np.sum(path * maze.punish_matrix.reshape(-1)) +\end{BVerbatim} +\end{center} + +But though experimentation I found that this approach was not good enough so I modified the function by adding punsihment if the agent did not start at the starting position and +if the agent did not end at the ending position. Still the results were not good enough so I decided to check if there is a valid path from the starting position to the ending position. +If there is no valid path then I would punish the agent otherwise I would give him some reward. This approach yielded better results. +But still I was not satisfied with the results so I decided to add some more punishes and rewards: +\begin{itemize} + \item Add a reward if agent finds a shorter path than the best path found so far. + \item Update weights in punish matrix so that the agent will prefer to move on best path found so far. + \item If the agent does not find any valid path until 80\% of the GA iterations then activate critical search phase. That means that the agent + will be rewarded if he finds \textbf{any} path from start to end, even if it maybe isn't the correct one. This way the weights are updated + so that it converges to the correct path. +\end{itemize} + +\subsubsection{Run the genetic algorithm with suitable settings} +I used the following settings wen running the algorithm: +\begin{small} +\begin{itemize} + \item \begin{verbatim}number_of_genes = N * M \end{verbatim}(if the maze is of size N x M) + So the solution is a vector of size N * M. + \item \begin{verbatim} num_of_generations = 1000 \end{verbatim} + How many generations will the algorithm run. + \item \begin{verbatim} sol_per_pop = 2 \end{verbatim} + Number of solutions in the population. + \item \begin{verbatim} num_parents_mating = 2 \end{verbatim} + Number of solutions to be selected as parents in the mating pool. + \item \begin{verbatim} keep_parents = -1 \end{verbatim} + If -1, this means all parents in the current population will be used in the next population + \item \begin{verbatim} allow_duplicate_genes = True \end{verbatim} + If True, then a solution/chromosome may have duplicate gene values. + \item \begin{verbatim} mutation_type = "random" \end{verbatim} + Mutation type is random. + \item \begin{verbatim} crossover_type = "two_point" \end{verbatim} + Applies the 2 points crossover. It selects the 2 points randomly at which crossover takes place between the pairs of parents + \item \begin{verbatim} parent_selection = "tournament" \end{verbatim} + Selects the parents using the tournament selection technique. Later, these parents will mate to produce the offspring. + \item \begin{verbatim} gene_type = int \end{verbatim} + We will be predicting integer values. + \item \begin{verbatim} gene_space = [0,1] \end{verbatim} + Define binary subset to be gene space. + \item \begin{verbatim} fitness_func = fitness_func \end{verbatim} + Specify fitness function. + \item \begin{verbatim} parallel_processing = 4 \end{verbatim} + Spawn 4 additional threads to speed up computing. +\end{itemize} +\end{small} + +\subsubsection{Results} + +\begin{enumerate} + \item On first maze I got a perfect score: +\textit{The shortest path is [(3, 1), (2, 1), (2, 2), (1, 2), (0, 2)]} + \item Same for the second one: +\textit{The shortest path is [(4, 5), (4, 4), (4, 3), (4, 2), (3, 2), (2, 2), (2, 3), (2, 4), (2, 5), (1, 5), (0, 5)]} + \item The third one had many problems and it did not want to converge to propper soluition. + \item The fourth one also found the solution pretty quickly. +\textit{The shortest path is [(5, 5), (4, 5), (3, 5), (3, 6), (3, 7), (3, 8), (2, 8), (1, 8), (1, 7), (1, 6), (1, 5), (0, 5)]} +\end{enumerate} + +Other mazes found also found some solutions, but they were not optimal. I think that the problem is that the mutation and crossover operators are not good enough. +So I will try to improve them in the following sections. + + +\end{document}