1 / 24

Programming for Swarm

Programming for Swarm. CS655 Course Project Weilin Zhong. Swarm Computing Models. The developments in micro-fabrication and nanotechnology will enable the inexpensive manufacturing of massive numbers of tiny computing elements

rodd
Télécharger la présentation

Programming for Swarm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming for Swarm CS655 Course Project Weilin Zhong

  2. Swarm Computing Models • The developments in micro-fabrication and nanotechnology will enable the inexpensive manufacturing of massive numbers of tiny computing elements • It will become possible to build new computing models, which incorporate large numbers of small computing elements CS655 Project Weilin Zhong

  3. Swarm Computing Examples • Intelligent and responsive environment • Multi-agent system • Amorphous computing medium CS655 Project Weilin Zhong

  4. Swarm Computing Models System characteristics: • Myriad numbers of elements. • Decentralized control. • Autonomous members behave with simple rules based on local information, interacting with neighbors within a small radius. • Members collaborate to achieve sophisticated global behaviors. • Unreliable elements with limited power and resource connected in irregular way. Challenge to traditional programming models. • How to achieve complex global behaviors from locally information and interaction without individually programming each member? • System must be adaptive and self-organized. CS655 Project Weilin Zhong

  5. Learn From the Nature • Social Insects • Nest Building Wasp Nets • Ant Forage CS655 Project Weilin Zhong

  6. What Can We Learn? Swarm Intelligence lies on its interaction network • Direct Interaction • A member interacts with its neighbors • Indirection Interaction • A member interacts indirectly with other members by changing the common environment they live. CS655 Project Weilin Zhong

  7. Programming for Swarm • StarLogo • GPL – Growing Point Language CS655 Project Weilin Zhong

  8. StarLogo • StarLogo • A Programming language and environment of decentralized multi-agent systems. • StarLogo System consists of Turtles and Patches • Turtles are the moving agents • Patches compose the environment where the turtles live • Turtles can change the state of the patches they visit • All turtles and patches are running in parallel CS655 Project Weilin Zhong

  9. StarLogo • Data Type Booleans(true, false), Lists, Numbers, and Strings. • Variable • Building-in State Variables of turtles and patches Xcor, ycor,color,heading,breed,shown?, pendown? • Global Variables turtles own [variables] patches own [variables] • Local Variables Let [:j 0] • Procedure to procedure-name List of Commands ; no separator needed output something ; exits and returns something end CS655 Project Weilin Zhong

  10. StarLogo • Control Flow • if , ifelse, • case • loop, every, repeat, do [list of commands] forever • ignore • Primitives • Turtle Commands forward, bk, die • Patch Commands diffuse, diffuse4, nsum, nsum4 • Observer Commands ca, crt, setc, setpc ask-turtles, ask-patches, CS655 Project Weilin Zhong

  11. StarLogo Ant Forage Model • Observe Procedures Setup the nest, foods, generate ants Initial ants and patches • Turtle Procedures Look-for-food, find-food, return-to-nest, find-nest • Patches Procedures diffuse, evaporate CS655 Project Weilin Zhong

  12. StarLogo Ant Forage Model CS655 Project Weilin Zhong

  13. StarLogo • Advantage • Programmable Modeling Environment for Decentralized Multi-agent System with Massive Parallel support • Suitable for biology life simulation, traffic, economic and ecology models • Limitations • Patches are regular coordinated spatial lattice • Patches have limited computational capabilities and weak influence to its neighborhood • Problems with the language • Limited number of Data Types • Parameters only passed by value • No patches command center CS655 Project Weilin Zhong

  14. Growing Point Language • Amorphous Computing Medium • is a system of irregularly placed, identically programmed, asynchronous, locally interacting computational particles • GPL(Growing Point Language) • is a language to program amorphous computing medium to generate highly complex and prespecified patterns • A CMOS Circuit layout • obtained from a small program encoding about 17 computational states CS655 Project Weilin Zhong

  15. Growing Point Language • Botanical Metaphor - Growing Points and Tropisms • Growing Point is a lotus of activity which can propagate its activities to its neighbors • A growing point move according to its tropism, which is specified in terms of differences in pheromone levels in its neighborhood • A growing point can “deposit” material and “secrete” pheromone when it visits a particle • The path of growing point is the collection of particles it have visited, expressing by the materials it has deposited on those particles. • Theorem • Amorphous media can be programmed to draw any prespecified planar graph CS655 Project Weilin Zhong

  16. Growing Point Language • Primitive Datatypes • Materials • markers to indicate where growing points have previously visited • can be associated with a color • can be sensed by a growing points to make growth decision • Pheromone • exists to guide the movement of growing point • radially symmetric about the source and monotonic decreasing in the distance from the source • Tropism Expressions CS655 Project Weilin Zhong

  17. (define-growing-point (A-to-B) (material A-material) (size 0) (tropism (ortho+ B-pheromone)) (for-each-step (when ((sensing? B-material) (terminate)) (default (propagate))))) (define-growing-point (B-point) (material B-material) (size 0) (for-each-step (secrete+ 10 B-pheromone))) (color ((B-material) "red") ((A-material) "yellow")) (with-locations (a b) (at a (start-growing-point A-to-B)) (at b (start-growing-point B-point))) GPL – A-to-B segment CS655 Project Weilin Zhong

  18. GPL – A-to-B Segment CS655 Project Weilin Zhong

  19. GPL • Advantages • Irregular and coordinate free domain • Strict locality • Identically Programmed member • Particles compose the environment • Suitable for responsive environment and improved materials • Facilitate the analysis of programs CS655 Project Weilin Zhong

  20. GPL -- Limitations and Improvement Dynamic Problem • Limitation • Static Particles • Static Materials and Pheromone • Static Model ---- lack of emergence, can only generated prespecified patterns • Improvement • Mobile particles • Changeable Material labeling and Pheromone Evaporation Model • Dynamic and Real-time Model CS655 Project Weilin Zhong

  21. GPL – Limitation and Improvement • Reliability Issues • Extremely Friendly Environment • Reliable Communication System • Problems and Solutions • Communication Error – Error recoverable encoding, retransmission • Unreliable Particles – Neighborhood backups • Malicious Particles -- Redundant Computation and agreement in neighborhood CS655 Project Weilin Zhong

  22. StarLogo and GPL Similarity • Decentralized system consisting large number of members • Autonomous members achieve complex global behaviors from local interaction • Massive Parallel Model • Object Oriented Shortcomings • No consideration of security and survivability • Performance CS655 Project Weilin Zhong

  23. StarLogo Multi-agent System Mobile agents and static env Regularly discrete and coordinated spatial system Dynamic and adaptive models GPL Amorphous Computing Medium Static particles Irregular coordinated free domain Static Models StarLogo and GPL CS655 Project Weilin Zhong

  24. Summary

More Related