{"id":7973,"date":"2026-06-01T19:10:33","date_gmt":"2026-06-02T00:10:33","guid":{"rendered":"https:\/\/justinparrtech.com\/JustinParr-Tech\/?p=7973"},"modified":"2026-06-01T19:10:33","modified_gmt":"2026-06-02T00:10:33","slug":"conways-game-of-life-implemented-in-javascript","status":"publish","type":"post","link":"https:\/\/justinparrtech.com\/JustinParr-Tech\/conways-game-of-life-implemented-in-javascript\/","title":{"rendered":"Conway&#8217;s &#8220;Game of Life&#8221; Implemented in Javascript"},"content":{"rendered":"<h1>Conway&#8217;s &#8220;Game of Life&#8221; Implemented in Javascript<\/h1>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-7974\" src=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-content\/uploads\/JSGOL-600x424.png\" alt=\"\" width=\"600\" height=\"424\" srcset=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-content\/uploads\/JSGOL-600x424.png 600w, https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-content\/uploads\/JSGOL-300x212.png 300w, https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-content\/uploads\/JSGOL-768x543.png 768w, https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-content\/uploads\/JSGOL.png 951w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Click here to play:<\/strong><\/p>\n<p><a href=\"https:\/\/justinparrtech.com\/JustinParr-Tech\/apps\/jslife\/JS-Life.html\" target=\"_blank\" rel=\"noopener\">Conway&#8217;s Life in Javascript<\/a><\/p>\n<p>Instructions:<\/p>\n<ol>\n<li>Click the &#8220;Fill Random&#8221; button<\/li>\n<li>Click the &#8220;Play \/ Pause&#8221; button<\/li>\n<li>If things get boring, click &#8220;Spawn a Random Glider&#8221;<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2>What is Game of Life?<\/h2>\n<p>Each cell has 8 neighbors.\u00a0 Based on the number of neighbors:<\/p>\n<ul>\n<li>If a cell has more than 3 neighbors, it dies of overcrowding<\/li>\n<li>If a cell has fewer than 2 neighbors (1 or 0) it dies of loneliness<\/li>\n<li>If a dead cell has exactly 3 neighbors, a new cell is born<\/li>\n<li>If a cell has 2 or 3 neighbors, it continues to the next generation<\/li>\n<\/ul>\n<p>Each &#8220;generation&#8221; results in these rules being applied to every cell on the game board, resulting in a new game board.\u00a0 The new game board is then analyzed to produce the next generation, and so-forth.<\/p>\n<p>The point of all of this, is that a few simple rules can create amazing complexity.<\/p>\n<p>When mathematician <a href=\"https:\/\/en.wikipedia.org\/wiki\/John_Horton_Conway\" target=\"_blank\" rel=\"noopener\">John Conway<\/a> came up with this in the 1970&#8217;s, it became extremely popular, despite having to be largely computed by hand on graph paper.\u00a0 John Conway, who passed away in 2020 at age 82, is known for dozens of innovations in math, science, and computer science.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Conway&#8217;s &#8220;Game of Life&#8221; Implemented in Javascript &nbsp; Click here to play: Conway&#8217;s Life in Javascript Instructions: Click the &#8220;Fill Random&#8221; button Click the &#8220;Play \/ Pause&#8221; button If things get boring, click &#8220;Spawn a Random Glider&#8221; &nbsp; What is Game of Life? Each cell has 8 neighbors.\u00a0 Based on the number of neighbors: If [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"aside","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7973","post","type-post","status-publish","format-aside","hentry","category-other-stuff","post_format-post-format-aside"],"_links":{"self":[{"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/posts\/7973","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/comments?post=7973"}],"version-history":[{"count":1,"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/posts\/7973\/revisions"}],"predecessor-version":[{"id":7975,"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/posts\/7973\/revisions\/7975"}],"wp:attachment":[{"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/media?parent=7973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/categories?post=7973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/justinparrtech.com\/JustinParr-Tech\/wp-json\/wp\/v2\/tags?post=7973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}