📄 swarm.overview.mag2.chapter.html
字号:
<HTML><HEAD><TITLE>Mag 2x: Basis of Swarm Computation</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.53"><LINKREL="HOME"TITLE="Documentation Set for Swarm 2.1.1"HREF="set.html"><LINKREL="UP"TITLE="Brief Overview of Swarm"HREF="book149.html"><LINKREL="PREVIOUS"TITLE="Mag 1x: Experimental Procedure in a Computer"HREF="swarm.overview.mag1.chapter.html"><LINKREL="NEXT"TITLE="Mag 3x: Swarm Structures"HREF="swarm.overview.mag3.chapter.html"></HEAD><BODYCLASS="CHAPTER"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Documentation Set for Swarm 2.1.1</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="swarm.overview.mag1.chapter.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="swarm.overview.mag3.chapter.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="CHAPTER"><H1><ANAME="SWARM.OVERVIEW.MAG2.CHAPTER">Chapter 2. Mag 2x: Basis of Swarm Computation</A></H1><P>Here is a first approximation to embedding the above outline of an experimental procedure in Swarm code:Swarm is implemented in the Object-Oriented Programming language Objective-C. Computation in a Swarm application takes place by having objects send messages to each other. The basic message syntax is: <TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><PRECLASS="PROGRAMLISTING"> [targetObject message Arg1: var1 Arg2: var2] </PRE></TD></TR></TABLE> Where "targetObject" is the recipient of the message, "messageArg1:Arg2:" is the message to send to that object, and "var1", "var2", etc, are arguments to pass along with the message. Objective C's messages are keyword/value oriented, which is why the message name "messageArg1:Arg2:" is interspersed with the arguments. </P><P>The whole idea of Swarm is to provide an execution context within which a large number of objects can "live their lives" and interact with one another in a distributed, concurrent manner. Furthermore, we wish to insulate the user from having to master all of the highly baroque computer-science wizardry usually required to implement such massively distributed systems of autonomous agents reliably and robustly.</P><P>In the context of the Swarm simulation system, the generic outline of an experimental procedure takes the following form:</P><P></P><OLTYPE="1"><LI><P>Create an artificial universe replete with space, time, and objects that can be located, within reason, to certain "points" in the overall structure of space and time within the universe., and allow these objects to determine their own behavior according to their own rules and internal state in concert with sampling the state of the world, usually only sparsely.</P></LI><LI><P>Create a number of objects which will serve to observe, record, and analyze data produced by the behavior of the objects in the artificial universe implemented in step 1).</P></LI><LI><P>Run the universe, moving both the simulation and observation objects forward in time under some explicit model of concurrency. </P></LI><LI><P>Interact with the experiment via the data produced by the instrumentation objects to perform a series of controlled experimental runs of the system.</P></LI><LI><P>Depending on what is observed in stage 4), alter the experimental or instrumental "apparatus" and go back to 3).</P></LI><LI><P>Publish paper *including* detailed specification of the experimental set-up so that others can recreate your experiment and verify your results. </P></LI></OL></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="swarm.overview.mag1.chapter.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="set.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="swarm.overview.mag3.chapter.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Mag 1x: Experimental Procedure in a Computer</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="book149.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Mag 3x: Swarm Structures</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -