Skip to content
CHAOS HOUSE

Every chaos generator should have a house!

The story of Chaos House

In my dissertation, I tried to classify about 84 analog chaos generators. The dynamics of each can be described by a system of ordinary differential equations. I already knew there were many more. I included the generators whose descriptions I could find at the time.

To see how a generator behaved as its parameters changed, I linked the computers in several teaching labs and divided the parameter combinations among their processor cores. Even with all those cores working together, a map for one generator took weeks.

I wanted an atlas with room for the generators I had yet to find. Today, GPUs and servers make those maps much faster to compute. In Chaos House you can pick a point on a map, see the corresponding trajectory, then change a coefficient and follow what happens to the motion.

I want this atlas to include every known chaos generator and to bring together the people who study them. Perhaps you know a system that is missing here, or have found an interesting regime in a familiar one. Share the equations and parameters so someone else can try your experiment.

Submission instructions

Hopfield — Lewis & Glass

Comments

Search and filters

Code
Appearance

Connecting to the archive…

Orbit parameters and sources

x₁̇ = (−x₁)/(τ)+(1+tanh(ε·(k_(1,1)·x₁+k_(1,2)·x₂+k_(1,3)·x₃+k_(1,4)·x₄+k_(1,5)·x₅+k_(1,6)·x₆)))/(2)−β
x₂̇ = (−x₂)/(τ)+(1+tanh(ε·(k_(2,1)·x₁+k_(2,2)·x₂+k_(2,3)·x₃+k_(2,4)·x₄+k_(2,5)·x₅+k_(2,6)·x₆)))/(2)−β
x₃̇ = (−x₃)/(τ)+(1+tanh(ε·(k_(3,1)·x₁+k_(3,2)·x₂+k_(3,3)·x₃+k_(3,4)·x₄+k_(3,5)·x₅+k_(3,6)·x₆)))/(2)−β
x₄̇ = (−x₄)/(τ)+(1+tanh(ε·(k_(4,1)·x₁+k_(4,2)·x₂+k_(4,3)·x₃+k_(4,4)·x₄+k_(4,5)·x₅+k_(4,6)·x₆)))/(2)−β
x₅̇ = (−x₅)/(τ)+(1+tanh(ε·(k_(5,1)·x₁+k_(5,2)·x₂+k_(5,3)·x₃+k_(5,4)·x₄+k_(5,5)·x₅+k_(5,6)·x₆)))/(2)−β
x₆̇ = (−x₆)/(τ)+(1+tanh(ε·(k_(6,1)·x₁+k_(6,2)·x₂+k_(6,3)·x₃+k_(6,4)·x₄+k_(6,5)·x₅+k_(6,6)·x₆)))/(2)−β
dx₁/dt = (−x₁)/(τ)+(1+tanh(ε·(k_(1,1)·x₁+k_(1,2)·x₂+k_(1,3)·x₃+k_(1,4)·x₄+k_(1,5)·x₅+k_(1,6)·x₆)))/(2)−β
dx₂/dt = (−x₂)/(τ)+(1+tanh(ε·(k_(2,1)·x₁+k_(2,2)·x₂+k_(2,3)·x₃+k_(2,4)·x₄+k_(2,5)·x₅+k_(2,6)·x₆)))/(2)−β
dx₃/dt = (−x₃)/(τ)+(1+tanh(ε·(k_(3,1)·x₁+k_(3,2)·x₂+k_(3,3)·x₃+k_(3,4)·x₄+k_(3,5)·x₅+k_(3,6)·x₆)))/(2)−β
dx₄/dt = (−x₄)/(τ)+(1+tanh(ε·(k_(4,1)·x₁+k_(4,2)·x₂+k_(4,3)·x₃+k_(4,4)·x₄+k_(4,5)·x₅+k_(4,6)·x₆)))/(2)−β
dx₅/dt = (−x₅)/(τ)+(1+tanh(ε·(k_(5,1)·x₁+k_(5,2)·x₂+k_(5,3)·x₃+k_(5,4)·x₄+k_(5,5)·x₅+k_(5,6)·x₆)))/(2)−β
dx₆/dt = (−x₆)/(τ)+(1+tanh(ε·(k_(6,1)·x₁+k_(6,2)·x₂+k_(6,3)·x₃+k_(6,4)·x₄+k_(6,5)·x₅+k_(6,6)·x₆)))/(2)−β

    Spectrum and distribution settings
    Code and downloads

    hopfield / euler.c

    First-order explicit Euler. Each equation is evaluated once per step. The starting step is one tenth of the scene step; reduce it again to check convergence.

    // Hopfield — Lewis & Glass | Chaos House 2026.11.25-readable.6
    // Source: https://doi.org/10.1162/neco.1992.4.5.621
    // Raw coordinates. See README.txt and the included source licenses.
    // First-order explicit Euler. Each equation is evaluated once per step. The starting step is one tenth of the scene step; reduce it again to check convergence.
    #include <math.h>
    #include <stdio.h>
    #include <stdlib.h>
    int main(void)
    {
    
        // 1. Parameters and initial conditions.
        double beta = 0.5;
        double eps = 10;
        double k_1_1 = 0;
        double k_1_2 = -1;
        double k_1_3 = 0;
        double k_1_4 = 0;
        double k_1_5 = -1;
        double k_1_6 = -1;
        double k_2_1 = 0;
        double k_2_2 = 0;
        double k_2_3 = 0;
        double k_2_4 = -1;
        double k_2_5 = -1;
        double k_2_6 = -1;
        double k_3_1 = -1;
        double k_3_2 = -1;
        double k_3_3 = 0;
        double k_3_4 = 0;
        double k_3_5 = -1;
        double k_3_6 = 0;
        double k_4_1 = -1;
        double k_4_2 = -1;
        double k_4_3 = -1;
        double k_4_4 = 0;
        double k_4_5 = 0;
        double k_4_6 = 0;
        double k_5_1 = -1;
        double k_5_2 = -1;
        double k_5_3 = 0;
        double k_5_4 = -1;
        double k_5_5 = 0;
        double k_5_6 = 0;
        double k_6_1 = 0;
        double k_6_2 = -1;
        double k_6_3 = -1;
        double k_6_4 = -1;
        double k_6_5 = 0;
        double k_6_6 = 0;
        double tau = 2.5;
        double x1_initial = -0.67127393;
        double x2_initial = -0.2420173;
        double x3_initial = -0.055676628;
        double x4_initial = 0.34697948;
        double x5_initial = 0.45273118;
        double x6_initial = 0.78389688;
    
        // 2. Time settings. Time units belong to the mathematical model.
        double dt = 0.0010865;
        double duration = 217.29999999999998;
        if (!(dt > 0 && duration >= dt && duration / dt <= 600000)) { fputs("Require a positive step and between 1 and 600000 steps. Reduce duration for a smaller dt.\n", stderr); return 1; }
        int steps = (int)round(duration / dt);
    
        // 3. Allocate arrays and keep every computed step, including the initial state.
        double *t = calloc((size_t)steps + 1, sizeof(double));
        if (!t) { fputs("Not enough memory.\n", stderr); return 1; }
        double *x1 = calloc((size_t)steps + 1, sizeof(double));
        if (!x1) { fputs("Not enough memory.\n", stderr); return 1; }
        x1[0] = x1_initial;
        double *x2 = calloc((size_t)steps + 1, sizeof(double));
        if (!x2) { fputs("Not enough memory.\n", stderr); return 1; }
        x2[0] = x2_initial;
        double *x3 = calloc((size_t)steps + 1, sizeof(double));
        if (!x3) { fputs("Not enough memory.\n", stderr); return 1; }
        x3[0] = x3_initial;
        double *x4 = calloc((size_t)steps + 1, sizeof(double));
        if (!x4) { fputs("Not enough memory.\n", stderr); return 1; }
        x4[0] = x4_initial;
        double *x5 = calloc((size_t)steps + 1, sizeof(double));
        if (!x5) { fputs("Not enough memory.\n", stderr); return 1; }
        x5[0] = x5_initial;
        double *x6 = calloc((size_t)steps + 1, sizeof(double));
        if (!x6) { fputs("Not enough memory.\n", stderr); return 1; }
        x6[0] = x6_initial;
        int count = 1;
        for (int step_index = 0; step_index < steps; step_index++) {
            x1[step_index + 1] = x1[step_index] + dt * (-x1[step_index] / tau + (1.0 + tanh(eps * (k_1_1 * x1[step_index] + k_1_2 * x2[step_index] + k_1_3 * x3[step_index] + k_1_4 * x4[step_index] + k_1_5 * x5[step_index] + k_1_6 * x6[step_index]))) / 2.0 - beta);
            x2[step_index + 1] = x2[step_index] + dt * (-x2[step_index] / tau + (1.0 + tanh(eps * (k_2_1 * x1[step_index] + k_2_2 * x2[step_index] + k_2_3 * x3[step_index] + k_2_4 * x4[step_index] + k_2_5 * x5[step_index] + k_2_6 * x6[step_index]))) / 2.0 - beta);
            x3[step_index + 1] = x3[step_index] + dt * (-x3[step_index] / tau + (1.0 + tanh(eps * (k_3_1 * x1[step_index] + k_3_2 * x2[step_index] + k_3_3 * x3[step_index] + k_3_4 * x4[step_index] + k_3_5 * x5[step_index] + k_3_6 * x6[step_index]))) / 2.0 - beta);
            x4[step_index + 1] = x4[step_index] + dt * (-x4[step_index] / tau + (1.0 + tanh(eps * (k_4_1 * x1[step_index] + k_4_2 * x2[step_index] + k_4_3 * x3[step_index] + k_4_4 * x4[step_index] + k_4_5 * x5[step_index] + k_4_6 * x6[step_index]))) / 2.0 - beta);
            x5[step_index + 1] = x5[step_index] + dt * (-x5[step_index] / tau + (1.0 + tanh(eps * (k_5_1 * x1[step_index] + k_5_2 * x2[step_index] + k_5_3 * x3[step_index] + k_5_4 * x4[step_index] + k_5_5 * x5[step_index] + k_5_6 * x6[step_index]))) / 2.0 - beta);
            x6[step_index + 1] = x6[step_index] + dt * (-x6[step_index] / tau + (1.0 + tanh(eps * (k_6_1 * x1[step_index] + k_6_2 * x2[step_index] + k_6_3 * x3[step_index] + k_6_4 * x4[step_index] + k_6_5 * x5[step_index] + k_6_6 * x6[step_index]))) / 2.0 - beta);
            if (!(isfinite(x1[step_index + 1]) && fabs(x1[step_index + 1]) < 1e8 && isfinite(x2[step_index + 1]) && fabs(x2[step_index + 1]) < 1e8 && isfinite(x3[step_index + 1]) && fabs(x3[step_index + 1]) < 1e8 && isfinite(x4[step_index + 1]) && fabs(x4[step_index + 1]) < 1e8 && isfinite(x5[step_index + 1]) && fabs(x5[step_index + 1]) < 1e8 && isfinite(x6[step_index + 1]) && fabs(x6[step_index + 1]) < 1e8)) {
                fputs("Stopped at a non-finite or very large state. Try a smaller step or another preset. The plotted prefix is not a confirmed bounded attractor.\n", stderr);
                break;
            }
            t[step_index + 1] = (step_index + 1) * dt;
            count = count + 1;
        }
    
        // 4. Plot the trajectory. Green is the start; red is the end.
        // Only the first three coordinates are shown; all state arrays are retained.
        FILE *file = fopen("hopfield-trajectory.dat", "w");
        if (!file) { perror("trajectory file"); return 1; }
        for (int row = 0; row < count; row++) {
            fprintf(file, "%.17g %.17g %.17g\n", x1[row], x2[row], x3[row]);
        }
        int write_failed = ferror(file);
        if (fclose(file) != 0) write_failed = 1;
        if (write_failed) return 1;
        // Requires gnuplot on PATH. Set GNUTERM=svg for a headless SVG output.
        int plot_status = system("gnuplot -persist -e 'set title \"Hopfield — Lewis & Glass / Euler\"; set xlabel \"x1\"; set ylabel \"x2\"; set zlabel \"x3\"; set grid; set view equal xyz; stats \"hopfield-trajectory.dat\" using 1 nooutput; last=STATS_records-1; splot \"hopfield-trajectory.dat\" using 1:2:3 with lines title \"Trajectory\", \"\" every ::0::0 using 1:2:3 with points pt 7 lc rgb \"green\" title \"Start\", \"\" every ::last::last using 1:2:3 with points pt 7 lc rgb \"red\" title \"End\"'");
        free(t);
        free(x1);
        free(x2);
        free(x3);
        free(x4);
        free(x5);
        free(x6);
        return plot_status == 0 ? 0 : 1;
    }
    

    Beyond the browser

    Choose a programming language and download the files you need from the downloads page. Choose a programming language

    Does your chaos have a name?

    We want to bring every chaos generator into one open catalogue and connect the people who study chaos and nonlinear dynamics. Developing your own system? Send its equations, parameters, initial state, recommended method and step, a reference and the code licence. After review we will add it with your name and link.

    Submission instructions · Write to the author

    Comments

    Hopfield — Lewis & Glass

    Generator ranking

    Collections and index · 420 models