Linear Model Measurements Linear Model Measurements with Application to Bird Flocking with Application to Bird Flocking Scott A. Smolka Scott A. Smolka Stony Brook University Joint work with Radu Grosu, Doron Peled, C.R. Ramakrishnan, Scott Stoller, Junxing Yang Congratulations Ed! • I first met Ed at Harvard in 1980, on occasion of visit by Amir Pnueli • Closely followed Ed’s work throughout his illustrious career • Finally got to work with Ed in 2009 with launch of NSF CMACS Expedition in Computing • Ed is mentor, friend, colleague, and inspiration! Talk Outline • Flocking Model • Neighborhood-based Measurements • Path-based Measurements • Application to Flocking Goal: Model-measurement framework provides fitness values for parameter-optimization framework Flocking Model Cucker’s model n vai (t) = åf ( xi (t) - x j (t) )(v j (t) - vi (t)) j=1 f (d) = H (1+ d 2 )b Reynold’s model Velocity Matching • Measures how well the velocities are aligned: 1 2 1 VM (t) = ( å vi (t) - v j (t) ) 2 n i> j • LTL property to be “measured”: FG(VM £ q ) Neighborhood-Based Measurement • State space is a tuple S, s0 , R • S is finite set of states • • s0 ÎS is initial state R Í S ´ S is transition relation • Components in each state • • • • • Tuple of measurement variables V Well-founded value set W, < Expressions E based on V that result in values from W Constants Update function f Measurement Algorithm With each clock tick, execute in each state s If E(s) is not minimal, then do Send V(s) to all neighbors Receive V q (s) from neighbors q Î{q1, q2 ,..., qn(s) } q Update V = f (V,V q1 ,...,V n ( s ) ) decreasing E(s) Example Measurements • Find maximal value in a graph current maximal (m, d) = (max(m, m1, m2 ,..., msucc(s) ), d -1) counter, initialized to width of the structure • Well-founded domain is the natural numbers with usual < • Decreasing expression E assigned to each state is simply d Example Measurements (contd.) • CTL Model Checking • Variable vh for each subformula h • Two counters: phase-counter and down-counter • For sub-formula e.g. (hEU r ) : v(hEU r ) = vr Ú (vh Ù Ú v(qhEU r ) ) qÎN (s) f := (VM £ q ). Measure linear combination of how fast Gf becomes true in FGf + average value of VM while Gf is true. • LTL Model Checking: Let Path Measurements 1. Paths may be infinite. Assume measurements are affected mainly by a finite prefix of sequences. Impose a limit on the length. 2. Multiple paths in the structure (possibly infinite). Use generalized Monte Carlo measurements to conclude that a large enough number of executions has guaranteed some measurement threshold. Generalized Monte-Carlo Measurements • Obtain joint estimate mZ = ( m B , m R ) of mean values of Boolean-real pairs • Additive approximation (AAA algorithm): • Multiplicative approximation (SRA and OAA algorithms): Experimental Results Table 1. Results obtained from OAA Table 2. Results obtained from AAA Runs μR N Runs μR N 1 0.00644 66846 1 0.00681 84 2 0.00651 65592 2 0.00685 84 3 0.00646 66696 3 0.00589 84 4 0.00648 66173 4 0.00630 84 5 0.00646 66588 5 0.00585 84 Avg 0.00647 66379 Avg 0.00634 84 Std 2.7e-05 505.9 Std 0.00047 0 Figure 1. Birds’ positions and velocities after 50 steps of simulation V-formation • Model measurements as fitness in Genetic Algorithm • To achieve V-formation, measure clear view + upwash benefit Figure 2. Birds’ positions and velocities after 500 steps of simulation