large scale adaptive systems n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Large-scale adaptive systems PowerPoint Presentation
Download Presentation
Large-scale adaptive systems

play fullscreen
1 / 42

Large-scale adaptive systems

150 Views Download Presentation
Download Presentation

Large-scale adaptive systems

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Large-scale adaptive systems Lecture 6: Programming and modeling of large scale networks Dr. Stefan Dulman s.o.dulman@tudelft.nl

  2. Review previous lecture • Introduction: design methodologies • Alternatives to traditional design • Example #1 • Amorphous computing – global-2-local compiler • Example #2 • ASH Clustering scheme

  3. Related work • This lecture is based on: • Michael De Rosa, et al.: Programming Modular Robots with Locally Distributed Predicates, in Proc. ICRA 2008http://www.cs.cmu.edu/~claytronics/papers/derosa-icra08.pdf • Adaptive Systems by prof. Giovanna diMartzoSerugendohttp://www.dcs.bbk.ac.uk/~dimarzo/courses/as.html

  4. Lecture overview • Programming for distributed systems • Example: LDP • Modeling – introduction and examples • Project overview • Summary

  5. Programming in distributed env. • Issues: • Large scale network • Number of devices not known • Churn is basic characteristic • Code spreads virally • Code in various execution levels across network • Global state unknown • Basic assumptions: • HW/SW failures, heterogeneity, dynamics of all sorts • Central controlling entity missing • Devices may contain actuators, changing the environment • Question: how to program such a network?

  6. Goals can be counter-intuitive! Lecture on Pario by Todd Mowry(http://www.youtube.com/watch?v=4Ixc-DaAm1k)

  7. State of the art • Various solutions • Amorphous computing: global-to-local compiler • WSN field: macro programming • Swarm robotics • Logical declarative languages (P2, Meld) • Reactive programming techniques (subsumption architecture) • Functional approaches (Regiment, Proto) • We focus on Locally distributed predicates (LDP) Michael De Rosa: Programming Modular Robots with Locally Distributed Predicates (ICRA 2008)

  8. LDP • LDP operates on finite size neighborhoods • Searching in the local vicinity is cheaper • Reality (swarm robotics) is built like that • Natural for large scale modular robots (local decisions) • Syntax: data declaration and statements • Statements: predicate clause and action clauses • No explicit control structures • Architecture • Each robot has a collection of threads (one for each statement) • PatternMatchers created on clock ticks, sensor events… • Objects migrating though the network

  9. LDP • Triggering actions • Setting a state variable • Changing topology of the system • Calling an arbitrary function on the robot

  10. Source code for Snake program

  11. Source code for Average

  12. Sheet of modules

  13. More examples (LDP)

  14. More examples (Meld) M. Ashley-Rollman - Meld: A declarative approach to programming ensembles, IROS 2007

  15. Lecture overview • Programming for distributed systems • Example: LDP • Modeling – introduction and examples • Project overview • Summary

  16. Modeling

  17. Modeling • Steps to take • Descriptive of the collective process • Identification of the lower-level units and interactions • Formulation of a model hypothesis • Generation of predictions of the model • Comparison of the predictions of the model with the collective process

  18. Experimental investigation • Modeling of a complex system has an increased difficulty level • Modeling should not be targeted at obtaining the global pattern • Modeling must target the components and their interaction • Dangers: • It is tempting to tweak the model parameters to obtain a pattern • Ad-hoc interpretation of the specific value of the parameter

  19. Models • Description of the system • Simplified description • Assumptions • Examples • Static models • City maps • Architectural diagrams • Scale models • Dynamic models • Weather models • Games rules descriptions • Ant/termites behavior models

  20. Example: • Ant nest + one food source – simplified problem • 100 ants • Ant spends an average 1/rN minutes in the nest before foraging • Ant usually finds food within 1/rD minutes after leaving nest • If unsuccessful it spends roughly 1/rS minutes before returning • If successful it spends roughly 1/rF minutes to load and return • No learning is assumed (parameters stay constant) • Q: how many ants end up (in average) in each state?

  21. State machine representation

  22. Modeling with differential equations N, F, S – number of ants in nest, feeder, search rN, rF, rS, rD – rates of ants in various stages

  23. Modeling with differential equations • Model predicts an equilibrium state • Characteristics: • Non-integer results (12.2 ants in search state) • Continuous time model • Easy to test various initial conditions

  24. Monte Carlo simulations • Differential-equation models work well for large populations • Continuous model becomes a good approximation • Simulation models use often a discrete approach • Example: • Keep track of each ant • Probabilistically decide what they do • Aggregate results

  25. Cellular automata models • Regular grid of cells (multidimensional) • Each cell has a finite number of states • Evolves with time • State of a cell at time t: • Function of the states of a finite number of neighbors at time t-1 • Neighbor cells are fixed • Same rule is applied by every cell in order to change its state

  26. Example • Conway’s game of life • 2D cellular automata • Each cell can be “dead” or “alive” • Rules: • Live cell with less than two neighbors dies of loneliness • Live cell with more than three neighbors dies of crowding • Dead cell with three neighbors comes to life • Live cell with two or three neighbors lives Video cellular automata

  27. Cellular automata • What can be simulated? • Large number of physics processes • Gas and fluid dynamics • Optics phenomena • Tearing and ripping of solids • Increasing number of applications relevant to us • Radio propagation in city environments • Routing and scheduling strategies in MANETs and WSNs • What’s next: particle systems, physics engines, …?

  28. Computer-based models • Executable program • Clearly described program • Advantages • Can be stopped, restarted under new conditions • Monitoring of data: analysis of data off-line • Disadvantages • Calculations limited by computer power • Approximations provided by numerical analysis • Due to common practice of bad modeling it lost credibility in various fields of computer science

  29. Computer-based models • What is described in the program? • Building blocks: elements/agents • Behavioral rules • Interactions rules • Important when whole system behavior is not the sum of the behavioral rules • What is the model? • Set of all possible states • Set of all possible transitions from one state to another • Defined by behavioral and interaction rules

  30. Examples • Swarms • Algorithms • transition rules with probabilities and random variations • No specific learning • Cellular automata (to some extent) • Agent-based models • Programs with learning capabilities • Neural networks • Game bots • Building blocks = strategies • Experience used for modifying and improving strategies • Game theory + reinforcement learning

  31. Agent-based models • Object/elements = social agents • Interacting rules between agents • Agents are: • Intelligent and purpose-full • Situated in space and time • Behavior of agents encoded in an algorithm • Programs • NetLogo, StarLogo, Swarm, Repast, Mason, etc. • Ns2, Omnet++, Opnet, etc.

  32. Machine learning • Several approaches – AI domain • Examples: • Unsupervised learning • Find patterns in an input stream • Supervised learning • Classification or numerical regression • Reinforcement learning • Adapt actions to continuously maximize the gain • Expert systems • Set of rules in the form “if … else …”

  33. Lecture overview • Programming for distributed systems • Example: LDP • Modeling – introduction and examples • Project overview • Summary

  34. Project overview • Assignment • Create a static overlay of software agents on top of a mobile mesh-alike network (use Netlogo for simulations) • Deliver zip file containing: • .netlogo file • Written report – pdf format (Approx.1500 words) • Section 1: Explanation of basic mechanism • Section 2: Mechanism implementation details • Section 3: Analysis of the cost/overhead • Section 4: Analysis of the robustness • Individual work - hand in by CPM by Jan. 23rd • Later submissions strictly NOT ACCEPTED

  35. Example

  36. Project overview • Constraints on algorithmic design • Centralized solutions not accepted • One device collects all data and delivers order to all others • Local broadcasting only • Time-to-live of messages maximum twice the size of the cell • Messages must have limited size O(size_local_neighborhood) • Algorithm should be robust/adaptive • Failure of nodes should trigger reconfiguration

  37. Project overview • Design considerations • Initialization phase needs to be built in • Where does it start? How many nodes start it? • What if half of the network suddenly disappears? • What if the network nodes get shuffled because of mobility? • Possible answers • User initializes one/more nodes, at random explicitly • Each node decides with a certain small probability to start • A “growing” process around one seed is triggered • Be creative!

  38. Project overview • Design considerations • Adaptation/robustness • Dynamics will push the system into unstable states • What brings it back into stable regime? • Possible answers • Lattice points check their lattice neighbors • Each node checks its neighborhood for the list oflattice points • Could a “virtual” coordinate system be used on top? • Maybe lattice points have a lifetime associated and die anyhow -> reconfiguration is periodically triggered • Be creative!

  39. Project overview • Netlogo project • You may reuse code you have used in the lab • Lattice shape not specified • You may choose one: triangular, orthogonal, hexagonal or else? • Netlogo has additional commands that give neighborhood • It’s not necessary to construct the graph as you did in the lab! • Any simplifying assumption costs you points • A static node in the middle of the design? Etc. • Controls need to be added for • Initialization and running of the network • Changing basic parameters: number of nodes, speed, transmission range, lattice dimensions • Emulating failures • E.g. a button that disables a number of nodes, etc.

  40. Lecture overview • Programming for distributed systems • Example: LDP • Modeling – introduction and examples • Project overview • Summary

  41. Thank you for following the course! Good luck in your future careers! Good luck in your future careers!