《超越学科的认知基础》2015颜峻学习报告-第九周

来自iCenter Wiki
跳转至: 导航搜索

第九周作业

关键词

  1. Netlogo
  2. Patch
  3. Turtle
  4. Link
  5. Observer
  6. Model library

本文

NetLogo is a programmable modeling environment for simulating natural and social phenomena. It was authored by Uri Wilensky in 1999 and has been in continuous development ever since at the Center for Connected Learning and Computer-Based Modeling. [1]

NetLogo is the next generation of the series of multi-agent modeling languages including StarLogo and StarLogoT. NetLogo runs on the Java virtual machine, so it works on all major platforms (Mac, Windows, Linux, et al). It is run as a desktop application. Command line operation is also supported. [1]

400px 400px

Great Advantages [1]

System
  1. Free, open source
  2. Cross-platform: runs on Mac, Windows, Linux, et al
  3. International character set support
Programming
  1. Fully programmable
  2. Language is Logo dialect extended to support agents
  3. Large vocabulary of built-in language primitives
  4. Mobile agents (turtles) move over a grid of stationary agents (patches)
  5. Link agents connect turtles to make networks, graphs, and aggregates
  6. Approachable syntax
  7. Double precision floating point math
  8. First-class function values (aka tasks, closures, lambda)
  9. Runs are reproducible cross-platform
Environment
  1. Interface builder w/ buttons, sliders, switches, choosers, monitors, text boxes, notes, output area
  2. Agent monitors for inspecting and controlling agents
  3. NetLogo 3D for modeling 3D worlds
  4. Command center for on-the-fly interaction
  5. Info tab for annotating your model with formatted text and images
  6. HubNet: participatory simulations using networked devices
  7. Export and import functions (export data, save and restore state of model, make a movie)
  8. BehaviorSpace, an open source tool used to collect data from multiple parallel runs of a model
  9. System Dynamics Modeler
  10. Headless mode allows doing batch runs from the command line
Display and visualization
  1. Line, bar, and scatter plots
  2. Speed slider lets you fast forward your model or see it in slow motion
  3. View your model in either 2D or 3D
  4. Scalable and rotatable vector shapes
  5. Turtle and patch labels
APIs
  1. controlling API allows embedding NetLogo in a script or application
  2. extensions API allows adding new commands and reporters to the NetLogo language; open source example extensions are included


Netlogo模型的基本架构

Netlogo模型中起着关键作用的是Observer, patch, turtle和link四个功能模块。

Patch是被安放在网格中的,Turtle在网格中运动。Link连接两个Turtle。Observer控制全部的模块。这一点通过命令语言也能够看出,通过直接命令语句能够在对应的模块控制框中修改参量,但是在观察者的控制框中能够通过Ask语句控制其他的三种模块。

这其实是一种比喻的体现。其中的turtle作为structural metaphors,能够以一个简单的图标来模拟其他的不同事物,而事物的性质能够通过一系列函数添加到turtle上,而这些性质是通过功能或者说函数来实现的,netlogo中的tutrtle具有读取数据并且修改数据的功能,因此能够作为一个非常强大的本体载体。通过改变patch我们能够很轻松地修改环境参量,从而建立我们所需要的模型。

Netlogo的语言实际上是一种简化过的计算机语言,具有很高的可操作性和简洁性。在编写程序的时候,程序包含控制流和数据流,那么observer实际上就是控制流,而turtle, patch和link则相当于被控制的模块,数据流很大程度上是通过颜色来实现的,颜色的种类(深浅)代替了不同的数值。Netlogo的语言通过这种简单的架构大大地降低了操作的复杂性。


800px

程序语言[1]

Agents Agents are beings that can follow instructions
Procedures Commands and reporters you define yourself are called procedures
Variables Agent variables are places to store values (such as numbers) in an agent
Tick counter In many NetLogo models, time passes in discrete steps, called "ticks"
Colors NetLogo represents colors in different ways
Ask NetLogo uses the ask command to give commands to turtles, patches, and links
Agentsets An agentset is exactly what its name implies, a set of agents
Breeds NetLogo allows you to define different "breeds" of turtles and breeds of links
Buttons Buttons in the interface tab provide an easy way to control the model
Lists Lists allow for the convenient packaging of information in NetLogo
Random numbers The random numbers used by NetLogo are what is called "pseudo-random"
Turtle shapes In NetLogo, turtle shapes are vector shapes.
Link shapes Link Shapes are similar to turtle shapes, only you use the Link Shape Editor to create and edit them
View updates The "view" in NetLogo lets you see the agents in your model on your computer's screen
Plotting NetLogo's plotting features let you create plots to help you understand what's going on in your model
Strings Strings may contain any Unicode characters
Output This section is about output to the scree
File I/O In NetLogo, there is a set of primitives that give you the power to interact with outside files
Movies This section describes how to capture a QuickTime movie of a NetLogo model
Perspective The 2D and the 3D view show the world from the perspective of the observer
Drawing The drawing is a layer where turtles can make visible marks
Topology The way the world of patches is connected can change
Links A link is an agent that connects two turtles
Tasks Tasks let you store code to be run later
Ask-Concurrent The following information is included only for backwards compatibility
Tie Tie connects two turtles so that the movement of one turtles affects the location and heading of another
Multiple source files The __includes keyword allows you to use multiple source files in a single NetLogo model
Syntax In the Code tab and elsewhere in the NetLogo user interface

800px

有趣的发现

  1. 一般的软件都只会提供用户手册,但是Netlogo的帮助栏中还多了一项Netlogo辞典。[2]这是非常有趣的。点进去可以看到其根据字母、种类以及特殊进行了初步分类,然后再每一种具体列出。在数量少的时候,词条或者说词典的作用显现不出来,但是一旦内容多了,一个有序的词典的重要性便被凸显出来,这个词典无疑能够帮助我们快速地掌握netlogo中的一些词条,从而较为轻松的跨越incomesurability。这也是顾老师为什么让我们写词条的原因。词条的力量是强大的!
  2. Netlogo的Maunual book的网页的架构和wiki相似,整个网页的编辑都感觉像是在编辑wiki。

400px 400px

                      

 

关键人物

  1. Uri Wilensky

关键技术

  1. Netlogo
  2. Netlogo 3D
  3. Java VIrtual Box
  4. StarLogo
  5. StarLogoT

关键组织和制度

  1. the Center for Connected Learning and Computer-Based Modeling

参考文献

  1. Netlogo Manual Book
  2. Netlogo辞典
  3. file:///D:/软件们/netlogo/NetLogo%205.2.1/docs/index.html
  4. file:///D:/软件们/netlogo/NetLogo%205.2.1/docs/index2.html