Herding Fish From TUNA to CoSMoS Adam Sampson University of Kent - - PowerPoint PPT Presentation

herding fish
SMART_READER_LITE
LIVE PREVIEW

Herding Fish From TUNA to CoSMoS Adam Sampson University of Kent - - PowerPoint PPT Presentation

Herding Fish From TUNA to CoSMoS Adam Sampson University of Kent Introduction Partly a wrap-up of TUNA Partly an advert for CoSMoS Will concentrate on simulation aspects ... since that's most likely to be of interest to the


slide-1
SLIDE 1

Herding Fish

From TUNA to CoSMoS Adam Sampson

University of Kent

slide-2
SLIDE 2

Introduction

  • Partly a wrap-up of TUNA
  • Partly an advert for CoSMoS
  • Will concentrate on simulation aspects

– ... since that's most likely to be of interest to the

people here

slide-3
SLIDE 3

TUNA

  • “Technology Underpinning Nanotech

Assemblers”

  • Two-year, £60k pilot project
  • Studied the feasibility of engineering emergent

behaviour in networks of nanites

slide-4
SLIDE 4

Case study: haemostasis

  • Artificial blood platelets
  • Block wounds via an emergent behaviour:

– Wounds emit chemical markers – Platelets become sticky in response – Platelets clump together and stick to edges of wound

Blood flow Wound

slide-5
SLIDE 5

Engineering emergent behaviour

  • Emergent behaviour appears everywhere in

nature – being able to design it would be really useful

  • Break a problem down into processes that solve

the problem as an emergent behaviour

– i.e. refine emergent behaviour into simple

behaviours

  • But conventional refinement doesn't work...
slide-6
SLIDE 6

Emergence does not refine

  • No single refinement step between specification

and implementation

– Need intermediate environment

  • See “Emergent properties do not refine” paper
slide-7
SLIDE 7

Modelling languages

  • CSP-based approaches

– Circus (CSP with Z) – CSP||B (CSP with B)

  • Use FDR and Probe for static analysis
  • Translate into real code for implementation

– Initially by hand – Investigated compiling CSP directly

slide-8
SLIDE 8

Blood clotting model

  • Stochastic cellular

automaton

– Lots of states! – Clot movement

requires coordination

  • Modelled and

verified using CSP

– 1D, 2D and 3D models

slide-9
SLIDE 9

Evolving the model

  • Added extra layer of

clots above platelets

– Synchronises platelet

movement

– Clots merge when

they collide

– Behaviour is the same,

but the rules have moved layers

slide-10
SLIDE 10

Evolving the model

  • Environmental layer

below platelets

– Models chemical

diffusion

slide-11
SLIDE 11

Process-oriented programming

  • Based on CSP and

pi-calculus models

  • f concurrency
  • Isolated processes

communicate via channels

  • Everything is an

agent!

slide-12
SLIDE 12

Languages and toolkits

  • occam-pi programming language

– Process-oriented – Mobile data provides efficient, safe data sharing – Supports millions of concurrent processes on

commodity hardware

– Takes advantage of multi-core processors

  • Also JCSP, Handel-C, C++CSP, PyCSP...
slide-13
SLIDE 13

Dependency tracking

  • Only recompute data

when necessary

– Process network

provides dependency graph

– Processes “sleep”

when nothing is changing

zzz zzz

slide-14
SLIDE 14

ether

Just-in-time world creation

  • Maintaining empty

world is expensive

  • Create low level

processes “just in time” in response to higher-level actions

  • Allow unused

processes to die

slide-15
SLIDE 15

Distributing the model

  • TUNA cluster

– 40 Pentium 4 PCs with gigabit networking – Much cheaper than we expected!

  • occam-pi provides transparent networked

channels

– Same semantics, but much higher latency

slide-16
SLIDE 16

Distributing the model

  • Can simply split up

the existing model

  • Some links are now

very high-latency, though...

Node 1 Node 2 Node 3

slide-17
SLIDE 17

Improving efficiency

  • For better efficiency,

make high-level processes aware of machine boundaries

  • Bundle up expensive

communications

Node 1 Node 2 Node 3 Distributed clot

slide-18
SLIDE 18

Blood clotting simulation

  • Using the tricks above...
  • Distributed across 24 nodes of the cluster
  • Can do 40,000,000+ processes (at 1.5fps)
  • (Nearly!) linear speedup as more nodes are

added

  • Visualisation based on VTK volumetric

renderer

slide-19
SLIDE 19

Blood clotting demo

slide-20
SLIDE 20

CoSMoS

  • “Complex Systems Modelling and Simulation”
  • Four-year, £1.1m project
  • Inspired by TUNA, but different focus
  • Started October 2007
slide-21
SLIDE 21

CoSMoS aims

  • Design patterns and software framework for

modelling and simulating complex systems

– Applicable to many different types of systems – Provide a pattern language for modelling – Make efficient, massively-concurrent simulation

accessible to scientists from other disciplines

slide-22
SLIDE 22

People involved

  • York CS/EE/Chem: Susan Stepney, Jon Timmis,

Martin Bates, Fiona Polack, Andy Tyrell

  • Kent CS: Peter Welch, Fred Barnes
  • Christopher Alexander
  • Microsoft
  • Celoxica
slide-23
SLIDE 23

Case studies

  • Plants and animals – often grid-based

– Fungi – ideal for multi-level modelling

  • Liquid crystals

– Continuous space, detailed physics model

  • Bio-inspired algorithms, such as artificial

immune systems

– Common concepts between different bio-inspired

systems

slide-24
SLIDE 24

Distributed continuous space

  • The first work we've done for CoSMoS...
  • TUNA concentrated on discrete space
  • Extend approach to continuous positioning

– ... but take advantage of the TUNA techniques

slide-25
SLIDE 25

Continuous model of space

  • Divide space into cell

processes

  • Space cells keep track
  • f relative positions
  • f local agents
  • Hand off agents as

they move between cells

space space space

slide-26
SLIDE 26

Agent vision

  • To see one cell in any

direction, you need to ask the cells around you

  • Vision requests are

forwarded between cells

space space space

Who can I see? Who can he see? Who can he see?

slide-27
SLIDE 27

Boids

  • Simple flocking rules

– Average position – Average speed – Maintain minimum distance from others

slide-28
SLIDE 28

Boids demo

slide-29
SLIDE 29

Any questions?

This work supported by EPSRC grants EP/C516966/1 and EP/E049419/1 http://www.cosmos-research.org/ First workshop will be at Communicating Process Architectures 2008 September 2008 at York