diff --git a/README.md b/README.md
index 6eadd2f..b13948a 100644
--- a/README.md
+++ b/README.md
@@ -4,12 +4,14 @@
![](https://user-images.githubusercontent.com/35543500/111094823-74c67200-8512-11eb-912b-8e90c0995334.mp4)
-This purpose of this project is to test different research ideas for cellular automata. This is in the form of hypotheses, demos, simulations, and unstructured trial/error. Some of these hypotheses are:
+This purpose of this project is to test different research ideas for cellular automata. This is in the form of hypotheses, demos, simulations, and unstructured trial/error. The main ideas that have been developed in this repo are:
- How can we detect the self-producing cycles?
- How can we detect moving cycles? (mobiles)
- Can a Reinforcement Learning Agent interact with a CA environment to create a desired state?
+
+
## How to Use
You can utilize these functions and programs by cloning/forking this repository. Depending on future development, the structure of this project might change into a Python package available on PyPI.
diff --git a/app/ml_app.py b/app/ml_app.py
new file mode 100644
index 0000000..c239856
--- /dev/null
+++ b/app/ml_app.py
@@ -0,0 +1,15 @@
+from flask import Flask
+import numpy as np
+
+import sys
+sys.path.append('../src/')
+
+from path_handler import PathHandler as PH
+import sim.automata as atm
+from sim.rules import Rules
+
+app = Flask(__name__)
+
+@app.route('/')
+def hello_world():
+ return "
Hello world
"
\ No newline at end of file
diff --git a/nb/automata-analysis-v0.ipynb b/nb/automata-analysis-v0.ipynb
index 638c465..7a282d2 100644
--- a/nb/automata-analysis-v0.ipynb
+++ b/nb/automata-analysis-v0.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "6d13da26",
+ "id": "62ebc07b",
"metadata": {},
"source": [
"*This notebook is my own notes / development playground. It will be disorganized in nature. Feel free to skim through.*"
@@ -21,9 +21,11 @@
"\n",
"import sys\n",
"sys.path.append('../src')\n",
- "import automata as atm\n",
- "import analysis as ans\n",
- "from rules import Rules"
+ "import sim.automata as atm\n",
+ "import analysis.analysis as ans\n",
+ "import analysis.stats as stats\n",
+ "from sim.rules import Rules\n",
+ "import sim.sim as sim\n"
]
},
{
@@ -45,7 +47,7 @@
{
"cell_type": "code",
"execution_count": 24,
- "id": "6f4c7b39",
+ "id": "65ad9432",
"metadata": {},
"outputs": [
{
@@ -98,7 +100,7 @@
},
{
"cell_type": "markdown",
- "id": "85bae9cf",
+ "id": "2b0cd07e",
"metadata": {},
"source": [
"### Cycle Detection\n",
@@ -136,7 +138,7 @@
{
"cell_type": "code",
"execution_count": 24,
- "id": "615b1ade",
+ "id": "74f9eba7",
"metadata": {},
"outputs": [],
"source": [
@@ -147,7 +149,7 @@
{
"cell_type": "code",
"execution_count": 41,
- "id": "765a7122",
+ "id": "d2438b6e",
"metadata": {},
"outputs": [
{
@@ -171,7 +173,7 @@
{
"cell_type": "code",
"execution_count": 27,
- "id": "282d1836",
+ "id": "ebe7688b",
"metadata": {},
"outputs": [
{
@@ -193,7 +195,7 @@
{
"cell_type": "code",
"execution_count": 28,
- "id": "b6bd8818",
+ "id": "8790872c",
"metadata": {},
"outputs": [
{
@@ -215,7 +217,7 @@
{
"cell_type": "code",
"execution_count": 7,
- "id": "8fc3a363",
+ "id": "e4f45f26",
"metadata": {},
"outputs": [
{
@@ -241,7 +243,7 @@
{
"cell_type": "code",
"execution_count": 13,
- "id": "cfa03711",
+ "id": "423b910d",
"metadata": {},
"outputs": [
{
@@ -266,7 +268,7 @@
{
"cell_type": "code",
"execution_count": 24,
- "id": "1a71c907",
+ "id": "397df0bc",
"metadata": {},
"outputs": [
{
@@ -294,7 +296,7 @@
{
"cell_type": "code",
"execution_count": 22,
- "id": "47b21960",
+ "id": "ef1b8cd7",
"metadata": {},
"outputs": [
{
@@ -329,7 +331,7 @@
},
{
"cell_type": "markdown",
- "id": "15cfba73",
+ "id": "fc9d4509",
"metadata": {},
"source": [
"### Testing Rule Integration"
@@ -338,7 +340,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "id": "b2ee2e99",
+ "id": "5f301f1d",
"metadata": {},
"outputs": [
{
@@ -360,7 +362,7 @@
{
"cell_type": "code",
"execution_count": 3,
- "id": "be5c2199",
+ "id": "e42577c3",
"metadata": {},
"outputs": [
{
@@ -395,7 +397,7 @@
{
"cell_type": "code",
"execution_count": 9,
- "id": "21f9d915",
+ "id": "d7aa9251",
"metadata": {},
"outputs": [],
"source": [
@@ -406,7 +408,7 @@
{
"cell_type": "code",
"execution_count": 11,
- "id": "ae73a168",
+ "id": "acd48c9f",
"metadata": {},
"outputs": [
{
@@ -429,7 +431,7 @@
{
"cell_type": "code",
"execution_count": 15,
- "id": "dd3b7c8c",
+ "id": "d9054d01",
"metadata": {},
"outputs": [
{
@@ -454,7 +456,7 @@
{
"cell_type": "code",
"execution_count": 26,
- "id": "481183f3",
+ "id": "0aa0022c",
"metadata": {},
"outputs": [
{
@@ -477,7 +479,7 @@
{
"cell_type": "code",
"execution_count": 35,
- "id": "6564f077",
+ "id": "f62c5f18",
"metadata": {},
"outputs": [],
"source": [
@@ -487,7 +489,7 @@
{
"cell_type": "code",
"execution_count": 39,
- "id": "8f809a1e",
+ "id": "6c79138d",
"metadata": {},
"outputs": [
{
@@ -512,7 +514,7 @@
{
"cell_type": "code",
"execution_count": 40,
- "id": "91d3e52f",
+ "id": "110fb79a",
"metadata": {},
"outputs": [
{
@@ -537,7 +539,7 @@
{
"cell_type": "code",
"execution_count": 72,
- "id": "edece9a0",
+ "id": "96dbf82a",
"metadata": {},
"outputs": [
{
@@ -559,7 +561,7 @@
{
"cell_type": "code",
"execution_count": 77,
- "id": "6bbde2aa",
+ "id": "a4f65937",
"metadata": {},
"outputs": [
{
@@ -584,7 +586,7 @@
{
"cell_type": "code",
"execution_count": 79,
- "id": "e2cde96c",
+ "id": "6351938d",
"metadata": {},
"outputs": [
{
@@ -606,7 +608,7 @@
{
"cell_type": "code",
"execution_count": 59,
- "id": "3b58c967",
+ "id": "4d2d1964",
"metadata": {},
"outputs": [
{
@@ -630,7 +632,7 @@
{
"cell_type": "code",
"execution_count": 54,
- "id": "d7a778ae",
+ "id": "1d8afd75",
"metadata": {},
"outputs": [],
"source": [
@@ -640,7 +642,7 @@
{
"cell_type": "code",
"execution_count": 55,
- "id": "745885f1",
+ "id": "2d69bfbf",
"metadata": {},
"outputs": [
{
@@ -661,7 +663,7 @@
{
"cell_type": "code",
"execution_count": 57,
- "id": "76365ec8",
+ "id": "16f19223",
"metadata": {},
"outputs": [
{
@@ -682,13 +684,304 @@
"plt.show()"
]
},
+ {
+ "cell_type": "markdown",
+ "id": "350b2f5d",
+ "metadata": {},
+ "source": [
+ "---\n",
+ "# Detecting Cycles"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "id": "f1d284e5",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "state = np.array([\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0],\n",
+ " [0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n",
+ "], dtype = int)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "id": "3d1b98ec",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "state_no_cycle = atm.get_random_state((11,11))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "id": "ef92f1aa",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "(3, 11, 22)"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "states.shape"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "id": "5829018b",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "states = sim.play(state, steps = 3, rule = Rules.CONWAY)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "id": "2acc4202",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAC5CAYAAAAWJ+UfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFU0lEQVR4nO3cMWokVxSG0duO2ygxCIHyXkB5TbOBUaod9Aq8md6AtYAODUoaO1ReTuzB9ozRqIqqv273OaBkzOXVe575MGO4u3EcC4D1/ZD+AIBbJcAAIQIMECLAACECDBAiwAAp4zh+909VjVN/Hh4e2s12/W7v5c5bne363XPvXFW/f6upq/0X8OfPn9vNJs/uOJs82517zCbPTt65qn771i/6KwiAEAEGCBFggBABBggRYIAQAQYIEWCAEAEGCBFggBABBggRYIAQAQYIEeAFDcPwoW1z/9k8B1y53Xt/2He73aeq+lRVdXd3Nz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BEgAFCBBggxDrKBeeto7z+2eTZHWeTZ1tH2Wx27rx1lNc/2/W7vde6dy7rKAG2RYABQgQYIESAAUIEGCBEgAFCBBggRIABQgQYIESAAUIEGCBEgAFCBBggxDrKjZ7dcTZ5tjv3mE2ebR1ls9mu3+293Hmrs12/2zpKgCsjwAAhAgwQIsAAIQIMECLAACECDBAiwAAhAgwQIsAAIQIMECLAACECDBDyoXWUVXWoqvPEs36qqj+azSbP7jibPNude8wmz07e+TCO449f/epH1lHO+an/Wce25dmu3+293Hmrs12/e6k7+ysIgBABBghZM8C/NJxNnt1xNnm2O/eYTZ69uTu/+z/hAFiGv4IACBFggBABBggRYIAQAQYI+RNYK88d4UyzMAAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAC5CAYAAAAWJ+UfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFOUlEQVR4nO3dMWojZxjH4XdSK7gJGIN7HUA5017Abn0Dn2AvowusDqAy4MYkpfpJk2KDN0w0s9Z/Xul5QM2Gl2++sfZHcODNMI5jAXB5v6QfAOBWCTBAiAADhAgwQIgAA4QIMEDKOI7/+1NV49zPw8NDu9muz+19ufNaZ7s+99I7V9WfP2rqxf4N+Onpqd1s8uyOs8mz3bnHbPLs5J2r6o8f/aFfQQCECDBAiAADhAgwQIgAA4QIMECIAAOECDBAiAADhAgwQIgAA4QIMECIAAOEDFP/V+RhGL5U1Zeqqru7u93Ly8usgx4fH+vt7a3VbPLsjrPJs925x2zy7OSdn5+fD+M4/v7hH1xqH/Dr62u72a7P7X2581pnuz730jtX1bfoPmAA/k2AAUIEGCBEgAFCBBggRIABQgQYIESAAU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s/tfbnzWme7Prd1lABXRoABQgQYIESAAUIEGCBEgAFCBBggRIABQgQYIESAAUIEGCBEgAFCBBgg5Kx1lFW1rarjzLN+q6q/ms0mz+44mzzbnXvMJs9O3nk7juOvH/70nHWUSz71H+vY1jzb9bm9L3de62zX5/6sO/sVBECIAAOEXDLAXxvOJs/uOJs82517zCbPXt2dJ/8jHACfw68gAEIEGCBEgAFCBBggRIABQv4GykHyBtO685wAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAC5CAYAAAAWJ+UfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFaklEQVR4nO3cPW4bVxSG4cPUCtQEEASw5wKYNXkDVqsdcAXZjDYQLoBlADVCUqqfVPm1A5lzQ35zOM8DsLFxcOeO6ReGDJzNNE0FwPV9l34AgLUSYIAQAQYIEWCAEAEGCBFggJRpmr75U1XT3M/j42O72a7P7X2581Jnuz736J2r6tevNfVq/wL+/Plzu9nk2R1nk2e7c4/Z5NnJO1fVL1/7RT+CAAgRYIAQAQYIEWCAEAEGCBFggBABBggRYIAQAQYIEWCAEAEGCBFggBABvqD9fn/Wtrl/bZ4Dbtzmo7/sm83mU1V9qqq6v7/fPz8/zzpou93W6+trq9nR+d1uV3d3d7Nm397eVve+Os4mz+44mzw7eeenp6fjNE0/fvEb19oHfDgc2s2Ozr+8vExzrfF9dZzt+tze13XvXFU/R/cBA/BPAgwQIsAAIQIMECLAACECDBAiwAAhAgwQIsAAIQIMECLAACECDBAiwAAh1lFecN46ytufTZ7dcTZ5tnWUzWZH562jvP3Zrs/tfV33zmUdJcCyCDBAiAADhAgwQIgAA4QIMECIAAOECDBAi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sdZRVtauq08yzfqiq35rNJs/uOJs82517zCbPTt55N03T91/86jnrKEc+9R/r2JY82/W5vS93Xups1+e+1J39CAIgRIABQq4Z4J8azibP7jibPNude8wmz17cnT/8TzgALsOPIABCBBggRIABQgQYIESAAUJ+B32OgtLhfFpYAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "for i in range(3):\n",
+ " ans.plot_state(states[i])"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "id": "a13c2518",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "states_no_cycle = sim.play(state_no_cycle, steps = 3, rule = Rules.CONWAY)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "id": "f4fdc4a8",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0sAAAJOCAYAAABm/pxxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAqCElEQVR4nO3df6yld30f+PeHmVjGpuWHPGLBdmKrYqlcdiOYuxRCE0UxVQ1hYypVFW5IKULyVhsSko0UOelqUZRWyu6mEZHKZndKjFnhmKYOKxAlAZb8QK2owx1jbfwDimN+eMDgscgPQjdruPPZP+6dMD5+zv11znN+3Pt6SVdzznOf83w/95kz5zPv+/2e51R3BwAAgKd6xrILAAAAWEXCEgAAwABhCQAAYICwBAAAMEBYAgAAGCAsAQAADBCWWDlVdUdV/fNl1wEAx01V/WBVnVt2HbAqhCUAgCOqqk5X1dmq+ouq+k9V9feWXROsk5PLLgAAgNH8qyS/nWQjyXVJrlhqNbBmzCyRJKmq26rqj6vqG1X1YFX9/SWXdFVVfWynnj+oqu9Zcj0AsHSH6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kP5Dk15Oku5/s7j9dalH7czLJM6vqZJIrknxlyfU8TXd/IsnXJzbfnOQ9O7ffk+T1i6wJWDl68wLozQujN7NvqxiWrk7y6CX3z2XFX9wuVVXXJXlpknuWXMpe3pHkZ5NcWHId+3V9kvNJ3r2zPOFdVXXlsovaTXd/OckvJ/lSkseS/Fl3f3S5Ve3b87v7sZ3bX03y/GUWAyyd3rwY74jePCq9mYNaxbC0tqrqWUl+K8lPdfefL7ueaarqdUke7+6zy67lAE4meVmSX+vulyb5ZlZ8+nlnLfHN2W4mL0xyZVW9cblVHVxvf76AzxgA1pLePCq9eUn05sVZxbD05STXXnL/mp1tK62qvivbL8Z3dvf7l13PHl6V5Eeq6gvZXkrxQ1X13uWWtKdzSc5198XfCt6d7RfoVfbqJJ/v7vPd/a0k70/yfUuuab++VlUvSJKdPx9fcj3AcunN49ObF0Nv5kBWMSx9KsmLqur6qros22+6++CSa9pVVVW21+s+1N2/sux69tLdP9fd13T3ddk+v7/b3Sv9W5Xu/mqSR6vqxTubbkzy4BJL2o8vJXlFVV2x8xy5MSv+xtdLfDDJm3ZuvynJB5ZYC7B8evPI9OaF0Zs5kJPLLmBSd3+7qt6a5CPZvkLJ7d39wJLL2surkvxYkj+qqvt2tv18d394eSUdST+R5M6dRv1IkjcvuZ5ddfc9VXV3knuzfVWmTyc5s9yqnq6q7kryg0muqqpzSd6e5JeS/GZVvSXJF5P8w+VVCCyb3swu9OYR6M2ro7aXPAIAAHCpVVyGBwAAsHTCEgAAwABhCQAAYICwBAAAMEBYAgAAGCAsAQAADBCWAAAABvz//Xzh7dlKMVgAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "fig, axs = plt.subplots(2, 2, figsize = (20, 10))\n",
+ "s0 = axs[0, 0].imshow(states_no_cycle[0] == states_no_cycle[1], cmap = 'gray')\n",
+ "s1 = axs[0, 1].imshow(states_no_cycle[0] & states_no_cycle[1], cmap = 'gray')\n",
+ "s2 = axs[1, 0].imshow(states_no_cycle[0] != states_no_cycle[1], cmap = 'gray')\n",
+ "s3 = axs[1, 1].imshow(states_no_cycle[0] | states_no_cycle[1], cmap = 'gray')\n",
+ "\n",
+ "# a ==b is equiv ! (a xor b)\n",
+ "axs[0, 0].set_title('a == b')\n",
+ "axs[0, 1].set_title('a & b')\n",
+ "axs[1, 0].set_title('a != b')\n",
+ "axs[1, 1].set_title('a | b')\n",
+ "\n",
+ "\n",
+ "fig.colorbar(s0, ax = axs[0], ticks = [0, 1], shrink = 0.5)\n",
+ "fig.colorbar(s1, ax = axs[1], ticks = [0, 1], shrink = 0.5)\n",
+ "plt.show()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "id": "0e94c8ec",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPsAAAD4CAYAAAAq5pAIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKH0lEQVR4nO3dX4hmB3nH8e+vOwbdWNQiSNxNmy0ESxDayCLRlCLGQorBeFFKBEWksDe1RmkRK5ReFXohxVyUwrKNDRgSZA1tEFGLlbY3XTLZCMnuahuiTTZuTIqtSm9iyNOLeU0nw8zs5D3n7Dnp8/3czPueOe85D7v7nXPeP3M2VYWk//9+Ye4BJF0Zxi41YexSE8YuNWHsUhMbV3JnSXzpX5pYVWW35R7ZpSaMXWrC2KUmjF1qwtilJoxdamJQ7EluTfLdJI8n+cxYQ0kaX9b9rbckh4B/A34buAg8BHyoqs7v8xjfZ5cmNsX77O8EHq+qJ6rqeeB+4PYB25M0oSGxHwGe2nb/4mrZyyQ5kWQzyeaAfUkaaPKPy1bVSeAkeBovzWnIkf1p4Npt94+ulklaoCGx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ki7quXZJrk3wryfkk55LcOfdMOyU5lOSRJF+Ze5adkrwxyekk30lyIcm75p7p55J8avV3+liS+5K8duZ5JrnI62JiT3II+Cvgd4AbgA8luWHeqV7mBeCPquoG4CbgDxY2H8CdwIW5h9jDXcDXqurXgF9nIXMmOQJ8AjheVW8HDgF3zDvVNBd5XUzswDuBx6vqiap6HrifrQtbLkJVXaqqs6vbP2XrH+uReaf6P0mOAu8HTs09y05J3gD8FvA3AFX1fFX996xDvdwG8LokG8Bh4AdzDjPVRV6XFPsR4Klt9y+yoJi2S3IdcCNwZuZRtvs88GngxZnn2M0x4DngC6unGaeSXD33UABV9TTwOeBJ4BLw46r6xrxT7erAF3ndy5Jif1VI8nrgy8Anq+onc88DkOQ24NmqenjuWfawAbwD+OuquhH4Hxbyfw2snvveztYPpLcCVyf58LxT7a+23i9/xe+ZLyn2p4Frt90/ulq2GElew1bo91bVA3PPs83NwAeSfJ+tpz/vTfLFeUd6mYvAxar6+ZnQabbiX4L3Ad+rqueq6mfAA8C7Z55pN4Mv8rqk2B8Crk9yLMlVbL1I8uDMM70kSdh6znmhqv5y7nm2q6o/qaqjVXUdW39u/1hVizk6VdUzwFNJ3rZadAtwfsaRtnsSuCnJ4dXf8S0s5MXDHQZf5PVK/4rrnqrqhSQfB77O1iuid1fVuZnH2u5m4CPAo0m+vVr22ar66nwjvar8IXDv6gf5E8DHZp4HgKo6k+Q0cJatd1weYeaPzW6/yGuSi2xd5PUvgC8l+X1WF3l9xdv147JSD0s6jZc0IWOXmjB2qQljl5owdqkJY5eaMHapif8Fh+KI0gJDuhgAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "# T = 2 oscillating cycle\n",
+ "plt.imshow(states[0] == states[2], cmap = 'gray')\n",
+ "plt.show()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "id": "95568420",
+ "metad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qW1PS/KFHafMrNu+v8kccXvvsnM/fmmS395jnncneV5VnTs7Hex5s9fWpqouTfJDSV7Y3X+1zzxH2a9Wate1m9+Zves5yvFnHZ6b5GPdfcdeE9e9vQ84/m3kPs6e9OYV0pvXaiOPW3rzWujNrE+v6S522b6T6SeyfYfH18xe+9fZPvgkyYOzfTrVbUn+MMkT1lXrjpqfme1TRz6S5IbZ47Ikr0jyitk8r0xyU7bvVvnBJN86QN1PmNXz4Vltp7f3zroryetmn8dHk5xcd92zuh6a7eb+iB2vDbm9s/0Dy11JvpLt63xenu1rN9+X5NYkv5vkUbN5TyZ5/Y73ft9sX78tycsGqPu2bF+3dHo/P32X58cmeedB+9Wa6/4Ps/33I9luUo/ZXffs+/sdf9ZZ9+z1N5zer3fMO9L23u/4N/w+7nFGn7PevLq69ebV1Ko3r79uvXl5devNx/hRsw8JAAAAGICbyQEAAMBABHUAAAAYiKAOAAAAAxHUAQAAYCCCOgAAAAxEUAcAAICBCOoAAAAwkP8PFMQUMwCC/7wAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "fig, axs = plt.subplots(2, 2, figsize = (20, 10))\n",
+ "s0 = axs[0, 0].imshow(states[0] == states[1], cmap = 'gray')\n",
+ "s1 = axs[0, 1].imshow(states[0] & states[1], cmap = 'gray')\n",
+ "s2 = axs[1, 0].imshow(states[0] != states[1], cmap = 'gray')\n",
+ "s3 = axs[1, 1].imshow(states[0] | states[1], cmap = 'gray')\n",
+ "\n",
+ "# a ==b is equiv ! (a xor b)\n",
+ "axs[0, 0].set_title('a == b')\n",
+ "axs[0, 1].set_title('a & b')\n",
+ "axs[1, 0].set_title('a != b')\n",
+ "axs[1, 1].set_title('a | b')\n",
+ "\n",
+ "\n",
+ "fig.colorbar(s0, ax = axs[0], ticks = [0, 1], shrink = 0.5)\n",
+ "fig.colorbar(s1, ax = axs[1], ticks = [0, 1], shrink = 0.5)\n",
+ "plt.show()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "74e2311e",
+ "metadata": {},
+ "source": [
+ "Idea -- Consider the $a \\lor b$ chart. It is the union of the cells in a and b right. It is symmetrical in 2 dimensions. Does this imply that it will always be a cycle?"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "id": "13607e9c",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWgAAADxCAYAAADm+y3qAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAVLElEQVR4nO3df4wcZ2HG8e+DYwcOTAw1TYLtkkBdVJdWCT0FaBBOS2idFMVAASUSP0vlqCIFKioUiMQ5SJXSQqGgpKBrSBPaNAEFKG5xCeGHlaKK1E4wSWyT4qaA7RiCAQVTA4nx0z92DMtx59vdmdt7d/b5SKvbmX1v3nd3z0/evPPOO7JNRESU51GL3YCIiJhdAjoiolAJ6IiIQiWgIyIKlYCOiChUAjoiolAJ6IiIeUhaI+nzknZL2iXpjbOUkaT3Sdor6W5Jz6xb70l1DxARMQaOAm+2fZek5cCdkm6zvburzAXA2urxLOD91c+BpQcdETEP2wdt31U9PwzsAVbNKLYR+JA7vgiskHR6nXrTg46IVtqwYYMPHTrUU9k777xzF/Cjrl3TtqdnKyvpDOBs4I4ZL60C9nVt76/2Heyxyb8gAR0RrXTo0CG2b9/eU9lHPepRP7I9OV85SY8DPgq8yfb3azZxXgnoiGitJtcakrSUTjjfaPtjsxQ5AKzp2l5d7RtYxqAjorVs9/SYjyQBHwT22H73HMW2AK+qZnM8G3jI9sDDG5AedES0VK/h26NzgVcC90jaWe17G/ArVV0fALYCFwJ7gSPAa+tWmoCOiNY6duxYI8ex/QVA85Qx8PpGKqwkoCOitUZ9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GRffA3zE9q75DqxRv9ImIqKt0oOOiChUAjoiolAJ6IiIQiWgIyIKlYCOiChUAjoiolAJ6IiIQv0/AUeV3LsDeC0AAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "plt.imshow(stats.get_alive_matrix(states[1]) - stats.get_alive_matrix(states[0]), cmap = 'gray')\n",
+ "plt.colorbar()\n",
+ "plt.show()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "id": "ed9be12c",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAASwAAAD8CAYAAADNNJnuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAASSklEQVR4nO3dfYwd1X3G8e+DYctinBhEXhx2VdyGUlm0gWhLcZDSUmhlEho3bUEgQYFEchsVQiIqakAqrapKNKF5kYqiusQECQQ1BBpEEW8JVRTJENu8BBuD6hLCrgO1LQSOqcni7q9/3KHd9Xj33r1zdmbO5flIK3wvM2d+YPNw5syZcxQRmJnl4LCmCzAz65UDy8yy4cAys2w4sMwsGw4sM8uGA8vMsuHAMrMFI+lIST+U9IykbZL+plJ7nodlZgtFkoDFEbFP0hHAD4ArI+Lxfto7PGl1ZmbTRKdHtK/4eETx03cvqdbAWrp0aSxbtixZe5OTk8naAli8eHGytt58881kbUHa2iB9fe8mQ0NDSdtL+ed49+7d7N27V1XaWLVqVezZs6enY7ds2bINeGvaV+siYt30YyQtArYAHwZuiogn+q2t1sBatmwZt9xyS7L2xsfHk7UFsHLlymRtbdy4MVlbkLY2SF/fu8no6GjS9lL+OV67dm3lNvbs2cOmTZt6Ovawww57KyLG5jomIv4HOEXSUuBeSSdHxNZ+avOg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2R8TbwD3Axxqu6VC88QvtCqxNwImSlksaojPweV/DNf0fSaIzBrM9Ir7SdD3TRcQ1ETESESfQ+ff2vYhoTS8hIl4FxiWdVHx1FvBcgyVN9zJwuqSjit/js2jJA4GDeOMXWvRqTkQckHQ58BCdJzXrI2Jbw2VNdwZwMfBssSwGwLUR8UBzJWXlCuD24n9GLwKXNVwPABHxhKS7gSfpPAl+ioZfg/HGL7Pzqzlmlo023RKamc3JgWVm2XBgmVk2HFhmlg0Hlpllw4FlZtlwYJlZNv4XtFitJgr1xsIAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "plt.imshow(stats.get_alive_matrix(states_no_cycle[1]) - stats.get_alive_matrix(states_no_cycle[0]), cmap = 'gray')\n",
+ "plt.colorbar()\n",
+ "plt.show()"
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
- "id": "13ecc371",
+ "id": "4ca6e951",
"metadata": {},
"outputs": [],
- "source": []
+ "source": [
+ "states_no_cycle"
+ ]
}
],
"metadata": {
diff --git a/nb/q-learning-v0.ipynb b/nb/q-learning-v0.ipynb
index 632cb08..b782579 100644
--- a/nb/q-learning-v0.ipynb
+++ b/nb/q-learning-v0.ipynb
@@ -176,6 +176,48 @@
"agent = run(init_state, action_func, reward_func, num_training = 1000, num_testing = 500)"
]
},
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "id": "dda8f4c4",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "False"
+ ]
+ },
+ "execution_count": 15,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "agent.is_in_testing()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "id": "ff27c8fd",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "(40, 47)"
+ ]
+ },
+ "execution_count": 18,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "agent.get_action(init_state) // 50, agent.get_action(init_state) % 50"
+ ]
+ },
{
"cell_type": "code",
"execution_count": 3,
@@ -186,6 +228,14 @@
"states = sim.play(init_state.values, steps = 100)"
]
},
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "1ac594b3",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
{
"cell_type": "code",
"execution_count": 7,
@@ -258,13 +308,59 @@
"ans.plot_state(init_state.values)"
]
},
+ {
+ "cell_type": "markdown",
+ "id": "40f79b79",
+ "metadata": {},
+ "source": [
+ " --- "
+ ]
+ },
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 24,
"id": "7f78f0a0",
"metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAOsAAADrCAYAAACICmHVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAE1klEQVR4nO3dMW4bVxhG0TdBSgZuAhgG3HMBzJq8Abn1DryCbGa8gHAB7N0YSMl+UgdyIikYi++G5wCsDHx+knBhpfmzbNs2gPn9dOsHAM8jVogQK0SIFSLEChFihYpt2579GWNse33evXu325a9ebbubW/vt40xtn/q72b/sj48PNibZG/mt82+t/fb/o1fgyFCrBAhVogQK0SIFSLEChFihQixQoRYIUKsECFWiBArRIgVIsQKEWKFCLFChFgh4udbP4D/5nQ6jb3+bwpfvnzZZYcfa3nqB74sy4cxxocxxnjz5s3p06dPu/zF79+/H1+/ft1l6x73jsfjOBwOu2xdr9dxuVx22Rpj/u/dnnt7v+3jx49j27blu394q4Npnz9/3vXI1L3treu67WVd16m/1pn39n7bGBMeTANeRqwQIVaIECtEiBUixAoRYoUIsUKEWCFCrBAhVogQK0SIFSLEChFihQixQoRYIcJZl+iesy5z7DnrYu/Jj7Muc+w56wI8IlaIECtEiBUixAoRYoUIsUKEWCFCrBAhVogQK0SIFSLEChFihQixQoRYIUKsECFWiHCDKbrnBtMce24w2Xvy4wbTHHtuMAGPiBUixAoRYoUIsUKEWCFCrBAhVogQK0SIFSLEChFihQixQoRYIUKsECFWiBArRIg16nw+j2VZdvmcz+dbfzk8gxtM9qZ+2+x7bjDZe9W9md82+54bTMAjYoUIsUKEWCFCrBAhVogQK0SIFSLEChFihQixQoRYIUKsECFWiBArRIgVIsQKETeN9SVXKp76nE6nqffuzcw/iz33TqfTq31Pb3qD6e3bt7tsjTHG9Xodh8Nh2r1v377dzR2he/rZXq/XcblcdtkaY+IbTHta13XqvXu6I3RPP9t1Xd1gAv5OrBAhVogQK0SIFSLEChFihQixQoRYIUKsECFWiBArRIgVIsQKEWKFCLFChFgh4qZnXWY9c3JvezO/bfa9vd827VkXe3Pszfy22ff2ftsYzrpAnlghQqwQIVaIECtEiBUixAoRYoUIsUKEWCFCrBAhVogQK0SIFSLEChFihQixQoRYIcINpuje8Xgch8Nhl63r9Toul8suW2PM/71zg+l/dFensLeu67aXdV2n/lpn3nODCXhErBAhVogQK0SIFSLEChFihQixQoRYIUKsECFWiBArRIgVIsQKEWKFCLFChFghQqwQ4QZTdM8Npjn23GCy9+THDaY59txgAh4RK0SIFSLEChFihQixQoRYIUKsECFWiBArRIgVIsQKEWKFCLFChFghQqwQIVaIECtEuMEU3XODaY49N5jsPflxg2mOPTeYgEfEChFihQixQoRYIUKsECFWiBArRIgVIsQKEWKFCLFChFghQqwQIVaIECtEiBUixBp1Pp/Hsiy7fM7n862/HJ7BDSZ7U79t9j03mOy96t7Mb5t9zw0m4BGxQoRYIUKsECFWiBArRIgVIsQKEWKFCLFChFghQqwQIVaIECtEiBUixAoRYoWIF511GWMcxxiXnf7uX8cYf+60ZW+erXvb2/ttx23bfvneHzwZ64+yLMsf27b9Zu/2ezO/bfa913ybX4MhQqwQcctYf7c3zd7Mb5t979XedrP/ZgVexq/BECFWiBArRIgVIsQKEX8B8esbOrdlY1cAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "state = np.array([\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n",
+ "], dtype = int)\n",
+ "ans.plot_state(state)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "3aa86906",
+ "metadata": {},
"outputs": [],
- "source": []
+ "source": [
+ "\"\""
+ ]
}
],
"metadata": {
diff --git a/src/analysis/analysis.py b/src/analysis/analysis.py
index d058b81..e433495 100644
--- a/src/analysis/analysis.py
+++ b/src/analysis/analysis.py
@@ -40,8 +40,8 @@ def plot_state(state):
else:
axs.imshow(state[0], cmap = 'gray')
- axs.set_xticks(np.arange(len(state))+0.5)
- axs.set_yticks(np.arange(len(state))+0.5)
+ axs.set_xticks(np.arange(state.shape[1])+0.5)
+ axs.set_yticks(np.arange(state.shape[0])+0.5)
axs.set_xticklabels([])
axs.set_yticklabels([])
axs.grid()
diff --git a/src/analysis/feature_extract.py b/src/analysis/feature_extract.py
index d574d64..2a9406f 100644
--- a/src/analysis/feature_extract.py
+++ b/src/analysis/feature_extract.py
@@ -6,3 +6,5 @@
import sim.automata as atm
from sim.rules import Rules
+def num_cycles(states):
+ ...
\ No newline at end of file
diff --git a/src/sim/automata.py b/src/sim/automata.py
index 7af8dfd..7d25b6d 100644
--- a/src/sim/automata.py
+++ b/src/sim/automata.py
@@ -53,7 +53,10 @@ def np_update(state):
def get_neighbors(i, j, shape):
# list comp generates all neighbors including center. If center or invalid neighbor,
# does i-10, j-10 as coord to remove in next step
- neighbors = np.reshape([[[i + u, j + v] if in_range(i + u, j + v, shape = shape) else [i - 10, j - 10] for u in [-1, 0, 1]] for v in [-1, 0, 1]], (-1, 2))
+ neighbors = np.reshape(
+ [[[i + u, j + v] if in_range(i + u, j + v, shape = shape) else [i - 10, j - 10] for u in [-1, 0, 1]] for v in [-1, 0, 1]],
+ size = (-1, 2)
+ )
return neighbors[~np.all(np.logical_or(neighbors == [i, j], neighbors == [i - 10, j - 10]), axis = 1)] # make sure to exlude center and not in-range values
'''