{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Introduction\n",
"\n",
"This document is an introduction to **Graph-Rewriting Automata** (GRA).\n",
"\n",
"GRA are an extension of **Cellular Automata** to a dynamic structure using local graph-rewriting rules. In this framework, initially simple graphs can evolve into complex self-organized structures. GRA display complex behaviors and can thus constitute a useful model of natural phenomena.\n",
"\n",
"A **Graph-Rewriting Automaton** consists of:\n",
"* an **initial graph** $G_0$ defined at time step $t=0$,\n",
"* a **rule** to iteratively evolve it to any discrete time step $t>0$.\n",
"\n",
"$G_t$ is the graph obtained at time $t$.\n",
"\n",
"![example](images/gra-example.png)\n",
"\n",
"In the following, a linear algebra based approach to GRA will be presented along with code examples.\n",
"\n",
"````{important}\n",
"The code examples relie on the [**GRA** python package](https://github.com/paulcousin/gra-python). To install it on your computer, type the following command in your terminal.\n",
"```{code}\n",
"pip install gra\n",
"```\n",
"````\n",
"\n",
"```{note}\n",
"The concepts presented here are in the continuity of a previous work {cite}`cousin2022organic` that was implemented in [Mathematica](https://www.wolfram.com/mathematica/). This code can be found in a dedicated [GitHub repository](https://github.com/paulcousin/gra-mathematica). The new python implementation leverages [TensorFlow](https://www.tensorflow.org) for GPU accelerated computations and has more functionality. However, since Mathematica offers more appropriate graph plotting functions, it has been used to generate the plots of the *Gallery* section.\n",
"```"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.9.7 ('.venv': venv)",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python",
"version": "3.9.7"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "4f024cd9f5c57439f3e6fa4daaabb10a816e87e26ad1ca77f07bda2365c16d62"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}