Published
Edited
Jul 18, 2019
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
W = [[1.0, .62, 2.23],
[2.55, 1.0, 0.65],
[0.91, 2.19, 1.0]]
Insert cell
U = {
return matWeight(W, [[b,a,a],[a,b,a],[a,a,b]])
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data = [iso(0,1), iso(1,2), iso(2,0)] // [[1,1,0], [1,0,1]]
Insert cell
clines = data.map((d,i) =>
ter.line(d.filter(p => p.every(c => c > -0.1))) // 2 of 3 candidates lie in the triangle's extent.
) // [d[i], d[(i+1)%3]] // brittle, works while limit cycle exists
Insert cell
pts = trace.map(s => ter.point(T(s))) // [ter.point(data[0][0])]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
trace = {
let s = strategy.map(u => [u]), // as column vector
game = U, // linWeight([.1, .9], [U, I]), // control step size
trace = [s]
let T = 20, dt = .05
for (let t = 1; t < T/dt; ++t) {
let r = times(game, s)
s = s.map((x,i) => [(1 + r[i]*dt)*x] )
s = normalize(s) // FIXME: clamp dynamics to appropriate radius.
trace.push(s)
}
return trace
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more