{"id":15706736,"url":"https://github.com/jexp/gameoflife","last_synced_at":"2025-04-15T23:16:44.783Z","repository":{"id":606001,"uuid":"242783","full_name":"jexp/GameOfLife","owner":"jexp","description":"Game of Life implementations in different languages and styles (scala, clojure,mapreduce)","archived":false,"fork":false,"pushed_at":"2011-09-01T21:18:05.000Z","size":132,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T23:16:14.422Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"3ofcoins/jetpack","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jexp.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-07-03T21:33:40.000Z","updated_at":"2013-11-26T12:50:54.000Z","dependencies_parsed_at":"2022-07-07T14:58:41.069Z","dependency_job_id":null,"html_url":"https://github.com/jexp/GameOfLife","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2FGameOfLife","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2FGameOfLife/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2FGameOfLife/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2FGameOfLife/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jexp","download_url":"https://codeload.github.com/jexp/GameOfLife/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249167456,"owners_count":21223508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T20:27:27.591Z","updated_at":"2025-04-15T23:16:44.759Z","avatar_url":"https://github.com/jexp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"After reading a ugly and simplistic GOL implementation in IOKE (which Ola was surprised to see in his repository) while attending #qcon I used the walk time to the conference to think of a functinal GOL approach.\n\nThe first idea is to have a lazy infinite sequence of boards with a next function taking a board and transforming it to the next iteration.\n\nSecond idea: represent a bord not as a two dimensional structure but as a list with [x,y] tuples. During the iteration just check the 8 neighbours and the cell to create a liveness condition on which to filter the current board list. The condition is: living count is 3/9  or cell is alive and living count is 4/9.\n\nSo its just filtering the current board through the liveness filter.\n\nA small improvement was not to filter all cells through that filter but just those alive and their neighbours.\n\nUsing a set eliminates duplicates.\n\nLast idea was: during the iteration have a cell bleed its life into its neighbours and then count the lifeness per cell (list of blooddrops or counter) and decide on that if the current cell lives or not. \n\nThat last idea should map perfectly to map-reduce. You do the bleeding of each potential cell into its neighbours in the map step and aggregating the results and deciding if the cell lives in the reduce step:\n[x,y] -map-\u003e list of cell + neighbours -reduce\u003e to [x,y]: count + decide on liveness.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjexp%2Fgameoflife","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjexp%2Fgameoflife","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjexp%2Fgameoflife/lists"}