Let's look at a very simple example called the logistic map. What this equation does is simply update the value of $x$ at each iteration by multiplying the previous step by $r$ and $(1 - x)$.
ロジスティック写像と呼ばれるとてもシンプルな例をみてみましょう。この式が行うのは、繰り返しごとに$x$の値を前のステップに $r$ と $(1 - x)$を掛けたものに更新するだけです。
$x_{n+1} = r x_n (1 - x_n)$
// Parameter r:
// If 2.0, converges to a single point (order)
// If 3.2, oscillates between two values (periodic)
// If 3.9, exhibits unpredictable behavior (chaos)
let r = 3.9;
let x = 0.5; // Initial value
for (let i = 0; i < 50; i++) {
// This is the nonlinear update equation that simultaneously performs "stretching" and "folding"
x = r * *x ** (1 - x);
console.log(x.toFixed(4)); // Display the change in value
}
With just this logic, depending on the value of $r$, you can get a sequence that looks very random. You can find a sample here that displays the values directly, but to visualize the behavior more intuitively, let's use a technique called the Cobweb plot.
これだけのロジックですが、$r$ の値によっては非常にランダムに見える数列が得られます。値を直接表示したものはここにサンプルを置いておきますが、より視覚的に挙動を見るために、Cobweb plot という手法を使ってみましょう。
In the Cobweb plot, we map the current value $x_n$ on the x-axis to the next value $x_{n+1}$ on the y-axis, then project that result back to the diagonal $y=x$ to find the new starting point. The faint horizontal lines are auxiliary lines that return the end of the plot to the next starting point on the diagonal. When drawn this way, we can clearly see the feedback loop where the value of $x$ jumps around relative to a certain curve (the Logistic Curve). Try changing the value of r to see how the behavior changes.
Cobweb plot では現在の$x$の値($x_{n}$)をx軸に、次の$x$の値($x_{n+1}$)をy軸にマッピングし、その結果を対角線$y=x$に投影して新しい出発点を見つけます。薄く描かれた水平線はプロットの終端を対角線上の次の出発点に戻す補助線です。このように表示すると、$x$ の値があるカーブ(Logistic Curve)を基準にして飛び回るフィードバックループがはっきりとみて取れます。r の値を変更して動きがどう変わるかを試してみましょう。
https://codepen.io/kynd/pen/XJKdNqY?editors=0010
In the Cobweb plot, we observed the changes in $x$ when $r$ was fixed at a specific value, but now let's see how the overall behavior changes when we vary $r$.
Cobweb plot では $r$ を特定の値に固定した時も $x$ の変化を見ましたが、今度は $r$ を変化させた時に全体の動きがどう変わるかを見てみましょう。