Coder Social home page Coder Social logo

lifegame's Introduction

LifeGame

学部 3 年の時に作ったライフゲームとシーケンサー(おまけ)

ライフゲームとは

イギリスの数学者 Conway が考案した生命の誕生と死のシミュレーション

ルール

ライフゲームでは初期状態のみでその後の状態が決定される。碁盤のような格子があり、一つの格子はセル(細胞)と呼ばれる。各セルには 8 つの近傍のセルがある (ムーア近傍) 。各セルには「生」と「死」の 2 つの状態があり、あるセルの次のステップ(世代)の状態は周囲の 8 つのセルの今の世代における状態により決定される。

セルの生死は次のルールに従う。

誕生 死んでいるセルに隣接する生きたセルがちょうど 3 つあれば、次の世代が誕生する。

生存 生きているセルに隣接する生きたセルが 2 つか 3 つならば、次の世代でも生存する。

過疎 生きているセルに隣接する生きたセルが 1 つ以下ならば、過疎により死滅する。

過密 生きているセルに隣接する生きたセルが 4 つ以上ならば、過密により死滅する。

(参考: https://ja.wikipedia.org/wiki/%E3%83%A9%E3%82%A4%E3%83%95%E3%82%B2%E3%83%BC%E3%83%A0)

使い方

  1. https://maximum-maximum.github.io/LifeGame/ にアクセス
  2. マス目をクリックしてところどころ黒く塗りつぶす。黒いマスは生命の存在を意味する。
  3. Start ボタンを押すとルールに則って世代交代のシミュレーションが始まる。

lifegame's People

Contributors

maximum-maximum avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.