•  FSharp Resource Web
  • F# F#文档 F#新闻 F#专家 F#开发系列教程
Rule 30 cellular automaton
2008年10月14日 11时35分39秒

This 1D cellular automaton is the simplest automaton to exhibit complex and unpredictable behaviour. Each cell is in one of two states. Cells transition between states based upon the states of themselves and their two neighbours in the previous generation:

As a programming example, this 70-line F# program uses Windows Forms to render a bitmap, handles GUI events in a functional style and uses pattern matching and higher-order functions to implement the cellular automaton itself.

This simple .NET program fills a window with generations of the rule 30 cellular automaton:

This example program is freely available in three forms:

固定链接 | 分类:F#源码 | 评论: | 引用: | 浏览:
+ 相关文章
+ 发表评论
  • 名称(*)
  • 邮箱
  • 网站链接
  • 验证(*) 如看不清楚,请点击刷新
  • 正文(*)(留言最长字数:1024)
  • 记住我,下次回复时不用输入个人信息
  • 欢迎参与讨论,请在这里发表您的看法,表达您的观点。
Develop By Myshuiyue
©Copyright 2007-2009 FSharp.cn All Rights Reserved.
  Valid CSS!  Valid XHTML 1.0 Transitional
Seach