Skip to content

A replication of the paper: Quantifying the Rise and Fall of Complexity in Closed Systems: The Coffee Automaton

License

Notifications You must be signed in to change notification settings

MathisFederico/coffeematon

Repository files navigation

The Coffee Automaton - Quantifying the Rise and Fall of Complexity in Closed Systems

Licence - GPLv3

CodeStyle - Black CodeStyle - Ruff

A reproduction of the paper The Coffee Automaton - Quantifying the Rise and Fall of Complexity in Closed Systems.

This codebase started from the given code in the paper and was updated to python 3 with few changes to improve experiment speed. Moreover some additional feature were added such as a fluid-like automaton, different smoothing functions, and different initial states.

A drop of milk in coffee

Large fine circular drop gif Large coarse circular drop gif Large adjusted coarse circular drop gif
Fine Coarse Adjusted coarse

Entropy, Complexity and Sophistication

Large fine updown drop gif Large coarse updown drop gif Large adjusted coarse updown drop gif
Fine Coarse Adjusted coarse

Reproduced results

Paper figure: Paper figure

Reproduced figures:

Note that in our codebase and for the sake of accuracy and generalisation, we replaced "complexity" by the "coarse_3" size and "entropy" by the "fine" size.

Interacting Non-Interacting
Interacting gif Non-Interacting gif
Interacting results Non-Interacting results
Alt text Alt text
Interacting automaton takes more step because we count steps when two identical cells are choosen to be swaped, but results are fairly similar for both complexity and entropy. Non-interacting automaton results couldn't be reproduced, even in loglog scale we cannot see any sign of complexity increase during the experiment even if the entropy is identical.

Added Features

Circular initial state

Instead of starting with a half coffee / half milk initial state we called updown. You can now initialize a circle of milk in the center and coffee all around, called the circular initial state.

Updown Circular
Updown initial state Circular initial state
Updown initial state gif Circular initial state gif

Other smoothing functions

  • Generalisation of the coarse-graining function to $k\in N^*, k>2$ categories. In the paper, they take 3 for the initial coarse-graining and 7 for the adujsted coarse-graining.
  • Differences [0.5 if f(x) == x else x] for each coarse-graining.
  • Differences Mask [f(x) == x] for each coarse-graining.
Fine Coarse_3 Coarse_7 Coarse_11 Diff_3 Diff_7 Diff_11 Mask_3 Mask_7 Mask_11
Fine gif Coarse_3 gif Coarse_7 gif Coarse_11 gif Diff_3 gif Diff_7 gif Diff_11 gif Mask_3 gif Mask_7 gif Mask_11 gif

Fluid automaton

Interacting Non-Interacting Fluid
Interacting gif Non-Interacting gif Fluid gif

Installation

Using pip

pip install git+https://github.com/MathisFederico/coffeematon.git

From source

git clone https://github.com/MathisFederico/coffeematon.git

Then inside the worspace:

pip install -e .

Quickstart

Launch an experiment

python -m coffeematon --help

Plot a graph from a csv results file

python -m coffeematon.plot_results --help

Generate a gif from bitmaps

python -m coffeematon.generate_gifs --help

Results

Initial state Automaton type Size Graph
Updown Interacting 100 updown_interacting_100
Updown Interacting 200 updown_interacting_200
Circular Interacting 100 circular_interacting_100
Circular Interacting 200 circular_interacting_200
Updown Fluid 100 updown_fluid_100
Updown Fluid 200 updown_fluid_200
Circular Fluid 100 circular_fluid_100
Circular Fluid 200 circular_fluid_200
Updown Non-Interacting 100 updown_non-interacting_100
Updown Non-Interacting 200 updown_non-interacting_100
Circular Non-Interacting 100 circular_non-interacting_100
Circular Non-Interacting 200 circular_non-interacting_200

About

A replication of the paper: Quantifying the Rise and Fall of Complexity in Closed Systems: The Coffee Automaton

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages