Yea this is great. As an applied math major in college, modeling was my favorite class with so many variations of ABMs with Monte Carlo randomness. Like you, I was focused on social sciences, specifically economics so love these methods to better simulate and understand our world.
My friends and I have taken similar shots at putting this functionality online, and turning it into a game is a great idea! Especially a game that helps teach/learn different concepts. For example, we had a previous project that allowed folks to learn Javascript by programming the AI for your different units in a RTS game. Unfortunately, we didn't have enough money/time to support it - hopefully we can bring it back online soon - but you can see more info on this reddit thread: http://www.reddit.com/r/learnprogramming/comments/1alfd9/jav...
Similar to you, we were using HTML5 canvas with a CodeMirror editor so users could modify and republish their own version in real-tim. I think you could do something similar where users had to modify the code (to different extents which could be levels) to get it to flock in certain ways. And then actually give the flock some real world story/context. That would be really cool.
Anyone not understanding what the three lines are, and how to apply them, has not the knowledge required to fully appreciate what you've done: Beauty from simplicity.
@population = 55 # agents
@setVision 4 # patches & set patch rect
@minSeparation = 3 # patches
AgentBase.org as a website allows the in-browser editing and sharing of ABMs. These ABMs make use of the AgentBase library. This library is quite similar to AgentScript.
The AgentBase library actually was a fork from the AgentScript library. See here for why I forked it (basically to keep it simple and to be able to apply basic minimum coding standards and add automated tests):
https://groups.google.com/forum/#!topic/agentbase/4NicEY8B6W...
You can try a template model here: http://agentbase.org/model.html?9d54597f7aafc995d227
AgentBase uses:
* HTML canvas, jQuery, etc
* CoffeeScript browser library, for compilation of CoffeeScript
* ACE editor for code editing
* GitHub gists, mini-repositories for storage of models
* NodeJS + Mongo for keeping a list of models
Comments most welcome!