{"id":312,"date":"2014-04-19T02:21:52","date_gmt":"2014-04-19T02:21:52","guid":{"rendered":"http:\/\/www.nicassio.it\/daniele\/blog\/?p=312"},"modified":"2014-04-19T02:21:52","modified_gmt":"2014-04-19T02:21:52","slug":"jsgenetic-library-and-new-genetic-environment-implementation","status":"publish","type":"post","link":"http:\/\/www.nicassio.it\/daniele\/blog\/?p=312","title":{"rendered":"JSGenetic library and new Genetic Environment implementation"},"content":{"rendered":"<p>I&#8217;ve created a little Genetic Algorithm library called JSGenetic, which takes care of the population management of a genetic algorithm.<\/p>\n<p>As a test for this library, I&#8217;ve re-implemented <a href=\"http:\/\/www.nicassio.it\/daniele\/blog\/?p=164\" target=\"_blank\">an old project, the Genetic Environment<\/a>, which is basically a simulation of an environment made by resources (water and food) which spontaneously grows or rains on the field, and by &#8220;animals&#8221;, which have a genetic code that specifies their behavior given what they see of the environment: they can actually &#8220;see&#8221; only north, south, east and west. The animals also have a little memory of 4 bits, and can understand if they are running out of water or food.<\/p>\n<p>The genetic code of the animals is initially set to random, and is progressively processed by the genetic library which selects the individuals which survive more time.<\/p>\n<p>After some generations, it&#8217;s clear that the individuals live longer because of the selection made on their genetic code, which defines how they behave.<\/p>\n<p>The code of the JSGenetic library is <a href=\"https:\/\/github.com\/danielenick89\/JSGenetic\" target=\"_blank\">on GitHub<\/a>, and the live example of the code is on my github page <a href=\"http:\/\/danielenick89.github.io\/enviroment\/\" target=\"_blank\">at this address<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve created a little Genetic Algorithm library called JSGenetic, which takes care of the population management of a genetic algorithm. As a test for this library, I&#8217;ve re-implemented an old project, the Genetic Environment, which is basically a simulation of an environment made by resources (water and food) which spontaneously grows or rains on the &hellip; <a href=\"http:\/\/www.nicassio.it\/daniele\/blog\/?p=312\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">JSGenetic library and new Genetic Environment implementation<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[13,4,6,7],"tags":[],"_links":{"self":[{"href":"http:\/\/www.nicassio.it\/daniele\/blog\/index.php?rest_route=\/wp\/v2\/posts\/312"}],"collection":[{"href":"http:\/\/www.nicassio.it\/daniele\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.nicassio.it\/daniele\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.nicassio.it\/daniele\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.nicassio.it\/daniele\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=312"}],"version-history":[{"count":1,"href":"http:\/\/www.nicassio.it\/daniele\/blog\/index.php?rest_route=\/wp\/v2\/posts\/312\/revisions"}],"predecessor-version":[{"id":313,"href":"http:\/\/www.nicassio.it\/daniele\/blog\/index.php?rest_route=\/wp\/v2\/posts\/312\/revisions\/313"}],"wp:attachment":[{"href":"http:\/\/www.nicassio.it\/daniele\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.nicassio.it\/daniele\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=312"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.nicassio.it\/daniele\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}