cellular_automata 0.8.0 copy "cellular_automata: ^0.8.0" to clipboard
cellular_automata: ^0.8.0 copied to clipboard

outdatedDart 1 only

A cellular automata library & playground

Cellular Automata #

A cellular automata library / playground written in Dart. Happily accepting pull requests! ^_^

Features #

  • Simple system for writing optimised rules
  • MCell rules compatible, current systems supported:
    • MCell Generations
  • Generators to seed the simulation
  • Map states to colours/characters for rendering
  • Controls: pause, resume, stepBack, stepForward
  • Stale simulation detection (repeating generations or patterns in activity)
  • Utilises the package:logging for debug & info (view on pub)
  • Decoupled renderers:
    • Canvas: (Web), fullscreen support
    • StageXL: (Web), WebGL, fullscreen support, (performance issues with big scenes)

Implemented rules/simulations #

  • Conway's Game of Life (source)
  • Conway's Game of Life Simple (binary states) (source)
  • Brian's Brain (source)
  • Majority Vote (source)
  • MCell Generations rule parser. See the demos including:
    • Star Wars
    • Rake
    • Star Wars
    • Sedi Mental
    • Frozen Sprials

Demos #

See the demos/ folder for demos. You can try the hosted demos here.

Performance #

Dartium performance is significantly faster than compiled performance at the moment. Also there are some generator defects that are yet to be resolved. To try and increase use the trust-type-annotations flag in your pubspec:

transformers:
- $dart2js:
    checked: false
    minify: true
    commandLineOptions: ['--trust-type-annotations', '--trust-primitives']

Roadmap #

  • Add more MCell rule parsers
  • Add MCell rule database
  • Add multiple states to 'Majority Vote'
  • Add visual feedback to show processing of simulations - useful whilst building and debugging
  • Support for entities to exist which would allow for simulations such as Langton's Ant
  • Add a multiple states generator
  • Add more tests
  • Transitions for switching between two simulations
  • Multiple simulations/rule-sets running in a single scene
  • Generated color palettes
  • Interactive mode (edit mode)
  • Analysis tools (histograms for state counts)
  • Add an LED Matrix renderer for raspberry pi using GPIO pins
  • Flutter renderer
  • CLI renderer
  • Hexagonal grids
  • Infinite world size support

Credits #

Please see the credits file for a list of the authors that discovered the rules that have been implemented in this project.

Licence #

Please see the cellular_automata license.

0
likes
15
pub points
0%
popularity

Publisher

unverified uploader

A cellular automata library & playground

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

collection, logging, stagexl

More

Packages that depend on cellular_automata