diff --git a/Evaluation/GeneratedRecipes.ipynb b/Evaluation/GeneratedRecipes.ipynb index 77893bf..59ceeea 100644 --- a/Evaluation/GeneratedRecipes.ipynb +++ b/Evaluation/GeneratedRecipes.ipynb @@ -9,7 +9,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -20,11 +20,80 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + " \n", + " " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + " \n", + " " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "../EvolutionaryAlgorithm/EvolutionaryAlgorithm.py:60: TqdmExperimentalWarning:\n", + "\n", + "Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n", + "\n" + ] + } + ], + "source": [ + "import EvolutionaryAlgorithm as EA" + ] + }, + { + "cell_type": "code", + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ - "import EvolutionaryAlgorithm as EA" + "import json\n", + "import numpy as np" ] }, { @@ -37,43 +106,18 @@ }, { "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "p = EA.Population([\"noodle\"],['noodle'], min_additional=4, max_additional=13, n_population = 50)\n", - "\n", - "p.run(50)\n", - "\n", - "samples = EA.np.random.choice(p.population[:10], 5)\n", - "\n", - "for i, s in enumerate(samples):\n", - " display(EA.Markdown(f\"### Noodle Recipe {i+1}\"))\n", - " display(s.root().to_instruction().to_markdown())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Rice recipes\n", - "* generate noodle recipes with a population size of 50 over 50 cycles and choose randomly 5 from the 20 best" - ] - }, - { - "cell_type": "code", - "execution_count": 17, + "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "791ec7b41eb94717b800e114d9f56861", + "model_id": "3130e9bf5e3d4cbf943a1e55e7f54016", "version_major": 2, "version_minor": 0 }, "text/plain": [ - "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=50.0, style=ProgressStyle(…" + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" ] }, "metadata": {}, @@ -89,12 +133,2997 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "da397fc1a8cf4cc9b760f9c000351682", + "model_id": "76a6bc19191343de8bd711236b147421", "version_major": 2, "version_minor": 0 }, "text/plain": [ - "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=50.0, style=ProgressStyle(d…" + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Noodle Recipe 1" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "1733849\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1733861\n", + "\n", + " \n", + "ricotta cheese\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1733849->1733861\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1733850\n", + "\n", + " \n", + "heat\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1733849->1733850\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1733862\n", + "\n", + " \n", + "cut\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1733849->1733862\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1733851\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1733850->1733851\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1733852\n", + "\n", + " \n", + "cut\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1733851->1733852\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1733858\n", + "\n", + " \n", + "noodle\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1733851->1733858\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1733854\n", + "\n", + " \n", + "saute\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1733851->1733854\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1733856\n", + "\n", + " \n", + "broil\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1733851->1733856\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1733853\n", + "\n", + " \n", + "chicken\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1733852->1733853\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1733855\n", + "\n", + " \n", + "butter\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1733854->1733855\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1733857\n", + "\n", + " \n", + "salt\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1733856->1733857\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1733863\n", + "\n", + " \n", + "broccoli\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1733862->1733863\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * ricotta cheese\n", + " * butter\n", + " * salt\n", + " * chicken\n", + " * broccoli\n", + " * noodle\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | cut chicken, saute butter, broil salt and mix it with noodle. Then heat it. |\n", + "| 2 | cut broccoli and mix it with ricotta cheese and mix it together with the results of step 1. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "43d8bed61ec74e81b1357593d5adf427", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "46a7b359216c41e3b94831280b96f1c4", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Noodle Recipe 2" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "1813544\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1813548\n", + "\n", + " \n", + "cook\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1813544->1813548\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1813545\n", + "\n", + " \n", + "bake\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1813544->1813545\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1813549\n", + "\n", + " \n", + "mix\n", + "node score: 0.9048\n", + "\n", + "\n", + "\n", + "1813548->1813549\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1813554\n", + "\n", + " \n", + "chop\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1813549->1813554\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1813553\n", + "\n", + " \n", + "turkey\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1813549->1813553\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1813552\n", + "\n", + " \n", + "sauce\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1813549->1813552\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1813551\n", + "\n", + " \n", + "tomato sauce\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1813549->1813551\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1813550\n", + "\n", + " \n", + "noodle\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1813549->1813550\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1813557\n", + "\n", + " \n", + "basil\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1813549->1813557\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1813556\n", + "\n", + " \n", + "ground beef\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1813549->1813556\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1813555\n", + "\n", + " \n", + "carrot\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1813554->1813555\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1813546\n", + "\n", + " \n", + "cook\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1813545->1813546\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1813547\n", + "\n", + " \n", + "cheese\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1813546->1813547\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * basil\n", + " * carrot\n", + " * ground beef\n", + " * tomato sauce\n", + " * sauce\n", + " * turkey\n", + " * cheese\n", + " * noodle\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | chop carrot and mix it with turkey, sauce, tomato sauce, noodle, basil and ground beef. Then cook it. |\n", + "| 2 | cook and bake cheese |\n", + "| 3 | Mix together the results of step 1 and step 2. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "38608bae11c14f41a9fc905ed1ced7f5", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "abd89963403d4a0f84a03c2f4665d529", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Noodle Recipe 3" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "1884305\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1884306\n", + "\n", + " \n", + "heat\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1884305->1884306\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1884316\n", + "\n", + " \n", + "slice\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1884305->1884316\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1884318\n", + "\n", + " \n", + "slice\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1884305->1884318\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1884307\n", + "\n", + " \n", + "mix\n", + "node score: 0.9333\n", + "\n", + "\n", + "\n", + "1884306->1884307\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1884314\n", + "\n", + " \n", + "peel\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1884307->1884314\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1884313\n", + "\n", + " \n", + "noodle\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1884307->1884313\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1884308\n", + "\n", + " \n", + "chicken broth\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1884307->1884308\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1884312\n", + "\n", + " \n", + "cheese\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1884307->1884312\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1884309\n", + "\n", + " \n", + "cream\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1884307->1884309\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1884310\n", + "\n", + " \n", + "grate\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1884307->1884310\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1884315\n", + "\n", + " \n", + "garlic clove\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1884314->1884315\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1884311\n", + "\n", + " \n", + "onion\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1884310->1884311\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1884317\n", + "\n", + " \n", + "tomato\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1884316->1884317\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1884319\n", + "\n", + " \n", + "egg\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1884318->1884319\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * garlic clove\n", + " * egg\n", + " * chicken broth\n", + " * onion\n", + " * tomato\n", + " * cream\n", + " * cheese\n", + " * noodle\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | peel garlic clove, grate onion and mix it with noodle, chicken broth, cheese and cream. Then heat it. |\n", + "| 2 | slice tomato, slice egg and mix it together with the results of step 1. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "596e572e066348c99dbc0124f8790b25", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "2d5cac3819b141ae98e70a5d315e22e9", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Noodle Recipe 4" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "1893441\n", + "\n", + " \n", + "mix\n", + "node score: 0.8684\n", + "\n", + "\n", + "\n", + "1893433\n", + "\n", + " \n", + "wash\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1893441->1893433\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893439\n", + "\n", + " \n", + "bake\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1893441->1893439\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893431\n", + "\n", + " \n", + "crack\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1893441->1893431\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893437\n", + "\n", + " \n", + "cheese\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1893441->1893437\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893435\n", + "\n", + " \n", + "mozzarella cheese\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1893441->1893435\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893432\n", + "\n", + " \n", + "broccoli\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1893433->1893432\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893440\n", + "\n", + " \n", + "mix\n", + "node score: 0.9286\n", + "\n", + "\n", + "\n", + "1893439->1893440\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893438\n", + "\n", + " \n", + "milk\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1893440->1893438\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893427\n", + "\n", + " \n", + "slice\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1893440->1893427\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893425\n", + "\n", + " \n", + "soy sauce\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1893440->1893425\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893434\n", + "\n", + " \n", + "ground beef\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1893440->1893434\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893429\n", + "\n", + " \n", + "dice\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1893440->1893429\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893423\n", + "\n", + " \n", + "noodle\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1893440->1893423\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893424\n", + "\n", + " \n", + "water\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1893440->1893424\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893436\n", + "\n", + " \n", + "spaghetti sauce\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1893440->1893436\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893426\n", + "\n", + " \n", + "garlic clove\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1893427->1893426\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893428\n", + "\n", + " \n", + "onion\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1893429->1893428\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1893430\n", + "\n", + " \n", + "egg\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1893431->1893430\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * mozzarella cheese\n", + " * water\n", + " * garlic clove\n", + " * ground beef\n", + " * egg\n", + " * onion\n", + " * milk\n", + " * soy sauce\n", + " * spaghetti sauce\n", + " * cheese\n", + " * broccoli\n", + " * noodle\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | slice garlic clove, dice onion and mix it with milk, soy sauce, ground beef, noodle, water and spaghetti sauce. Then bake it. |\n", + "| 2 | wash broccoli, crack egg and mix it with cheese and mozzarella cheese and mix it together with the results of step 1. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "7746dd20b801414bba3adc1d8a5870b1", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "d7e1511fbfed478a969d0a6d211ae60d", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Noodle Recipe 5" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "1955737\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1955738\n", + "\n", + " \n", + "bake\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1955737->1955738\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1955747\n", + "\n", + " \n", + "cheese\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1955737->1955747\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1955739\n", + "\n", + " \n", + "mix\n", + "node score: 0.9000\n", + "\n", + "\n", + "\n", + "1955738->1955739\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1955741\n", + "\n", + " \n", + "chop\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1955739->1955741\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1955740\n", + "\n", + " \n", + "olive oil\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1955739->1955740\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1955744\n", + "\n", + " \n", + "noodle\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1955739->1955744\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1955743\n", + "\n", + " \n", + "ground beef\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1955739->1955743\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1955745\n", + "\n", + " \n", + "place\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "1955739->1955745\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1955742\n", + "\n", + " \n", + "onion\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1955741->1955742\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "1955746\n", + "\n", + " \n", + "milk\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "1955745->1955746\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * ground beef\n", + " * onion\n", + " * milk\n", + " * olive oil\n", + " * cheese\n", + " * noodle\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | chop onion, place milk and mix it with olive oil, noodle and ground beef. Then bake it. |\n", + "| 2 | Mix cheese and mix it together with the results of step 1. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "8ea12174e1ed480f9bf79f5bad38df3b", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "c77e6d00023647679f9d4139b0b3669f", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Noodle Recipe 6" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2044641\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2044642\n", + "\n", + " \n", + "heat\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2044641->2044642\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2044654\n", + "\n", + " \n", + "heat\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2044641->2044654\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2044652\n", + "\n", + " \n", + "grate\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2044641->2044652\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2044643\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2044642->2044643\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2044650\n", + "\n", + " \n", + "garlic\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2044643->2044650\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2044651\n", + "\n", + " \n", + "pepper\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2044643->2044651\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2044644\n", + "\n", + " \n", + "blend\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2044643->2044644\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2044648\n", + "\n", + " \n", + "cook\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2044643->2044648\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2044645\n", + "\n", + " \n", + "sauce\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2044644->2044645\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2044649\n", + "\n", + " \n", + "noodle\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2044648->2044649\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2044655\n", + "\n", + " \n", + "warm\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2044654->2044655\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2044656\n", + "\n", + " \n", + "cream\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2044655->2044656\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2044653\n", + "\n", + " \n", + "tomato\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2044652->2044653\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * garlic\n", + " * pepper\n", + " * sauce\n", + " * tomato\n", + " * cream\n", + " * noodle\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | blend sauce, cook noodle and mix it with garlic and pepper. Then heat it. |\n", + "| 2 | warm and heat cream |\n", + "| 3 | grate tomato and mix it together with the results of step 1 and step 2. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "2ec7b1dbaf434160b22abaf8dd04608b", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "94ff28309e6e4e6ab0b51ca403a8f30f", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Noodle Recipe 7" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2113274\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2113276\n", + "\n", + " \n", + "bake\n", + "node score: 0.9000\n", + "\n", + "\n", + "\n", + "2113274->2113276\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2113275\n", + "\n", + " \n", + "cheese\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2113274->2113275\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2113277\n", + "\n", + " \n", + "mix\n", + "node score: 0.9111\n", + "\n", + "\n", + "\n", + "2113276->2113277\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2113284\n", + "\n", + " \n", + "sauce\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2113277->2113284\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2113286\n", + "\n", + " \n", + "cut\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2113277->2113286\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2113283\n", + "\n", + " \n", + "basil\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2113277->2113283\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2113285\n", + "\n", + " \n", + "chicken broth\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2113277->2113285\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2113281\n", + "\n", + " \n", + "cayenne pepper\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2113277->2113281\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2113282\n", + "\n", + " \n", + "oregano\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2113277->2113282\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2113280\n", + "\n", + " \n", + "noodle\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2113277->2113280\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2113279\n", + "\n", + " \n", + "water\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2113277->2113279\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2113278\n", + "\n", + " \n", + "mozzarella cheese\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2113277->2113278\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2113288\n", + "\n", + " \n", + "wash\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2113277->2113288\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2113287\n", + "\n", + " \n", + "red bell pepper\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2113286->2113287\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2113289\n", + "\n", + " \n", + "chicken\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2113288->2113289\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * oregano\n", + " * basil\n", + " * mozzarella cheese\n", + " * water\n", + " * chicken broth\n", + " * red bell pepper\n", + " * chicken\n", + " * sauce\n", + " * cayenne pepper\n", + " * cheese\n", + " * noodle\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | cut red bell pepper, wash chicken and mix it with sauce, basil, chicken broth, cayenne pepper, oregano, noodle, water and mozzarella cheese. Then bake it. |\n", + "| 2 | Mix cheese and mix it together with the results of step 1. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "3970031df6d04cee8856eee14c6118e5", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "d7ec3eb268a34778a415eff7b5f80458", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Noodle Recipe 8" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2153242\n", + "\n", + " \n", + "bake\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2153243\n", + "\n", + " \n", + "mix\n", + "node score: 0.9556\n", + "\n", + "\n", + "\n", + "2153242->2153243\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2153246\n", + "\n", + " \n", + "peel\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2153243->2153246\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2153244\n", + "\n", + " \n", + "peel\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2153243->2153244\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2153255\n", + "\n", + " \n", + "noodle\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2153243->2153255\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2153254\n", + "\n", + " \n", + "sauce\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2153243->2153254\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2153249\n", + "\n", + " \n", + "pea\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2153243->2153249\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2153250\n", + "\n", + " \n", + "mozzarella cheese\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2153243->2153250\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2153252\n", + "\n", + " \n", + "butter\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2153243->2153252\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2153253\n", + "\n", + " \n", + "milk\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2153243->2153253\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2153248\n", + "\n", + " \n", + "parsley\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2153243->2153248\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2153251\n", + "\n", + " \n", + "corn\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2153243->2153251\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2153247\n", + "\n", + " \n", + "onion\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2153246->2153247\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2153245\n", + "\n", + " \n", + "shrimp\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2153244->2153245\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * butter\n", + " * mozzarella cheese\n", + " * pea\n", + " * onion\n", + " * milk\n", + " * parsley\n", + " * sauce\n", + " * corn\n", + " * shrimp\n", + " * noodle\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | peel onion, peel shrimp and mix it with noodle, sauce, pea, mozzarella cheese, butter, milk, parsley and corn. Then bake it. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "4ef27f0f13b54eeea1f7aa43ac79234d", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "008b5788593e44b8ab8492cc0c745d3f", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Noodle Recipe 9" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2206597\n", + "\n", + " \n", + "heat\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2206598\n", + "\n", + " \n", + "mix\n", + "node score: 0.9333\n", + "\n", + "\n", + "\n", + "2206597->2206598\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2206599\n", + "\n", + " \n", + "chop\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2206598->2206599\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2206604\n", + "\n", + " \n", + "water\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2206598->2206604\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2206601\n", + "\n", + " \n", + "red pepper\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2206598->2206601\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2206607\n", + "\n", + " \n", + "tomato sauce\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2206598->2206607\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2206605\n", + "\n", + " \n", + "chop\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2206598->2206605\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2206602\n", + "\n", + " \n", + "noodle\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2206598->2206602\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2206600\n", + "\n", + " \n", + "onion\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2206599->2206600\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2206606\n", + "\n", + " \n", + "zucchini\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2206605->2206606\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * zucchini\n", + " * red pepper\n", + " * water\n", + " * tomato sauce\n", + " * onion\n", + " * noodle\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | chop onion, chop zucchini and mix it with water, red pepper, tomato sauce and noodle. Then heat it. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "fd689db9388141618604b2094906769a", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "0448e4f462384ca2b01ca6b8b891a76f", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Noodle Recipe 10" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2282303\n", + "\n", + " \n", + "cook\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2282304\n", + "\n", + " \n", + "mix\n", + "node score: 0.7857\n", + "\n", + "\n", + "\n", + "2282303->2282304\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2282311\n", + "\n", + " \n", + "bake\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2282304->2282311\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2282314\n", + "\n", + " \n", + "salt\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2282304->2282314\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2282307\n", + "\n", + " \n", + "cut\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2282304->2282307\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2282313\n", + "\n", + " \n", + "garlic\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2282304->2282313\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2282315\n", + "\n", + " \n", + "water\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2282304->2282315\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2282309\n", + "\n", + " \n", + "peel\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2282304->2282309\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2282316\n", + "\n", + " \n", + "noodle\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2282304->2282316\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2282306\n", + "\n", + " \n", + "ground beef\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2282304->2282306\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2282312\n", + "\n", + " \n", + "cream\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2282311->2282312\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2282308\n", + "\n", + " \n", + "green onion\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2282307->2282308\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2282310\n", + "\n", + " \n", + "garlic clove\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2282309->2282310\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * green onion\n", + " * garlic\n", + " * water\n", + " * garlic clove\n", + " * ground beef\n", + " * salt\n", + " * cream\n", + " * noodle\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | bake cream, cut green onion, peel garlic clove and mix it with salt, garlic, water, noodle and ground beef. Then cook it. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "\n", + "for i in range(10):\n", + "\n", + " p = EA.Population([\"noodle\",],['noodle'], min_additional=5, max_additional=11, n_population = 75, mutations=2)\n", + "\n", + " p.run(35)\n", + "\n", + " scores = [tree.score() for tree in p.population]\n", + "\n", + " ii = np.argsort(-np.array(scores))\n", + "\n", + " samples_i = EA.np.random.choice(ii[:1],1)\n", + "\n", + " samples = [p.population[i] for i in samples_i]\n", + "\n", + " for k, s in enumerate(samples):\n", + " display(EA.Markdown(f\"### Noodle Recipe {i+1}\"))\n", + " display(s.root().dot())\n", + " display(s.root().to_instruction().to_markdown())\n", + " with open(f\"noodle_{i}.md\", \"w\") as f:\n", + " f.write(s.root().to_instruction().to_markdown().data)\n", + " f.close()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Rice recipes\n", + "* generate noodle recipes with a population size of 50 over 50 cycles and choose randomly 5 from the 20 best" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "b7aac32bdcd84c25af86e9003b7b09b6", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "d95d9f1b43e7480aa5f25badb200c065", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" ] }, "metadata": {}, @@ -119,24 +3148,196 @@ "metadata": {}, "output_type": "display_data" }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2318073\n", + "\n", + " \n", + "cook\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2318074\n", + "\n", + " \n", + "mix\n", + "node score: 0.9524\n", + "\n", + "\n", + "\n", + "2318073->2318074\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2318081\n", + "\n", + " \n", + "rice\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2318074->2318081\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2318082\n", + "\n", + " \n", + "cut\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2318074->2318082\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2318078\n", + "\n", + " \n", + "butter\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2318074->2318078\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2318080\n", + "\n", + " \n", + "chicken broth\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2318074->2318080\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2318085\n", + "\n", + " \n", + "chop\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2318074->2318085\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2318079\n", + "\n", + " \n", + "vegetable broth\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2318074->2318079\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2318077\n", + "\n", + " \n", + "vegetable oil\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2318074->2318077\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2318083\n", + "\n", + " \n", + "green onion\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2318082->2318083\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2318076\n", + "\n", + " \n", + "ginger\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2318085->2318076\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, { "data": { "text/markdown": [ "**Ingredients**:\n", + " * vegetable oil\n", + " * green onion\n", + " * ginger\n", " * rice\n", - " * olive oil\n", + " * butter\n", + " * vegetable broth\n", " * chicken broth\n", - " * celery\n", - " * mushroom soup\n", "\n", "\n", "**Instructions**:\n", "\n", "| Step | Instruction |\n", "| ----:|:----------- |\n", - "| 1 | chop celery and mix it with chicken broth and mushroom soup. Then simmer it. |\n", - "| 2 | Mix rice and olive oil. Then warm it. |\n", - "| 3 | Mix together the results of step 1 and step 2. |\n" + "| 1 | cut green onion, chop ginger and mix it with rice, butter, chicken broth, vegetable broth and vegetable oil. Then cook it. |\n" ], "text/plain": [ "" @@ -145,6 +3346,48 @@ "metadata": {}, "output_type": "display_data" }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "73d9539a3162463fbad736504777b526", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "731fa0aa2d244c9da21ccb00a7faad07", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, { "data": { "text/markdown": [ @@ -157,22 +3400,318 @@ "metadata": {}, "output_type": "display_data" }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2340774\n", + "\n", + " \n", + "mix\n", + "node score: 0.9487\n", + "\n", + "\n", + "\n", + "2340763\n", + "\n", + " \n", + "cut\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2340774->2340763\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340770\n", + "\n", + " \n", + "simmer\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2340774->2340770\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340772\n", + "\n", + " \n", + "heat\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2340774->2340772\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340767\n", + "\n", + " \n", + "mash\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2340774->2340767\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340758\n", + "\n", + " \n", + "cut\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2340774->2340758\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340762\n", + "\n", + " \n", + "cabbage\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2340763->2340762\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340771\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2340770->2340771\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340759\n", + "\n", + " \n", + "pea\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2340771->2340759\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340761\n", + "\n", + " \n", + "mushroom soup\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2340771->2340761\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340755\n", + "\n", + " \n", + "rice\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2340771->2340755\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340769\n", + "\n", + " \n", + "chicken broth\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2340771->2340769\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340768\n", + "\n", + " \n", + "salt\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2340771->2340768\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340756\n", + "\n", + " \n", + "water\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2340771->2340756\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340773\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2340772->2340773\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340765\n", + "\n", + " \n", + "cut\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2340773->2340765\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340760\n", + "\n", + " \n", + "chicken soup\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2340773->2340760\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340764\n", + "\n", + " \n", + "green onion\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2340765->2340764\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340766\n", + "\n", + " \n", + "egg\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2340767->2340766\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2340757\n", + "\n", + " \n", + "tomato\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2340758->2340757\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, { "data": { "text/markdown": [ "**Ingredients**:\n", - " * soy sauce\n", - " * spinach\n", - " * garlic\n", + " * cabbage\n", " * rice\n", - " * olive oil\n", - " * onion\n", - " * clove garlic\n", - " * chicken\n", - " * red kidney bean\n", + " * green onion\n", + " * water\n", + " * pea\n", + " * egg\n", + " * chicken broth\n", + " * salt\n", + " * chicken soup\n", " * tomato\n", - " * celery\n", - " * cheese\n", " * mushroom soup\n", "\n", "\n", @@ -180,10 +3719,9 @@ "\n", "| Step | Instruction |\n", "| ----:|:----------- |\n", - "| 1 | heat and simmer clove garlic |\n", - "| 2 | cut and cut tomato |\n", - "| 3 | wash chicken, grate onion, cut celery, chop spinach, slice olive oil and mix it with garlic, soy sauce, rice, red kidney bean and mushroom soup and mix it together with the results of step 1 and step 2. Then cook it. |\n", - "| 4 | grate cheese and mix it together with the results of step 3. |\n" + "| 1 | Mix pea, mushroom soup, rice, chicken broth, salt and water. Then simmer it. |\n", + "| 2 | cut green onion and mix it with chicken soup. Then heat it. |\n", + "| 3 | cut cabbage, mash egg, cut tomato and mix it together with the results of step 1 and step 2. |\n" ], "text/plain": [ "" @@ -192,6 +3730,48 @@ "metadata": {}, "output_type": "display_data" }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "184a9ad86c56426ebfb2c5aad3fc30fe", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "2c131cc9bf2544508182b118ee0638a2", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, { "data": { "text/markdown": [ @@ -204,30 +3784,269 @@ "metadata": {}, "output_type": "display_data" }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2425901\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2425902\n", + "\n", + " \n", + "cook\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2425901->2425902\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2425904\n", + "\n", + " \n", + "simmer\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2425901->2425904\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2425903\n", + "\n", + " \n", + "chicken soup\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2425902->2425903\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2425905\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2425904->2425905\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2425909\n", + "\n", + " \n", + "water\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2425905->2425909\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2425915\n", + "\n", + " \n", + "rice\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2425905->2425915\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2425910\n", + "\n", + " \n", + "dice\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2425905->2425910\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2425912\n", + "\n", + " \n", + "cut\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2425905->2425912\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2425907\n", + "\n", + " \n", + "dice\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2425905->2425907\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2425906\n", + "\n", + " \n", + "soy sauce\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2425905->2425906\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2425914\n", + "\n", + " \n", + "paprika\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2425905->2425914\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2425917\n", + "\n", + " \n", + "olive oil\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2425905->2425917\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2425911\n", + "\n", + " \n", + "onion\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2425910->2425911\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2425913\n", + "\n", + " \n", + "chicken\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2425912->2425913\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2425908\n", + "\n", + " \n", + "celery\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2425907->2425908\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, { "data": { "text/markdown": [ "**Ingredients**:\n", - " * green pea\n", " * rice\n", " * water\n", - " * olive oil\n", - " * onion\n", - " * chicken broth\n", - " * clove garlic\n", - " * chicken\n", + " * celery\n", " * chicken soup\n", - " * pepper\n", - " * ground beef\n", + " * onion\n", + " * chicken\n", + " * soy sauce\n", + " * olive oil\n", + " * paprika\n", "\n", "\n", "**Instructions**:\n", "\n", "| Step | Instruction |\n", "| ----:|:----------- |\n", - "| 1 | saute and slice olive oil |\n", - "| 2 | boil and heat clove garlic |\n", - "| 3 | pour chicken soup, pour chicken broth, grate onion, brown rice, chop chicken and mix it with ground beef, water, pepper and green pea and mix it together with the results of step 1 and step 2. Then heat it. |\n" + "| 1 | dice onion, cut chicken, dice celery and mix it with water, rice, soy sauce, paprika and olive oil. Then simmer it. |\n", + "| 2 | cook chicken soup and mix it together with the results of step 1. |\n" ], "text/plain": [ "" @@ -236,6 +4055,48 @@ "metadata": {}, "output_type": "display_data" }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "d3a658352d19468b8bc8bad761de3bab", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "44e9385b8f1e4a5886ac05171106931e", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, { "data": { "text/markdown": [ @@ -248,29 +4109,284 @@ "metadata": {}, "output_type": "display_data" }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2480052\n", + "\n", + " \n", + "heat\n", + "node score: 0.9091\n", + "\n", + "\n", + "\n", + "2480053\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2480052->2480053\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480063\n", + "\n", + " \n", + "chicken stock\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2480053->2480063\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480061\n", + "\n", + " \n", + "chop\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2480053->2480061\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480058\n", + "\n", + " \n", + "parsley\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2480053->2480058\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480065\n", + "\n", + " \n", + "vinegar\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2480053->2480065\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480059\n", + "\n", + " \n", + "chop\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2480053->2480059\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480064\n", + "\n", + " \n", + "olive oil\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2480053->2480064\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480054\n", + "\n", + " \n", + "slice\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2480053->2480054\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480067\n", + "\n", + " \n", + "rice\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2480053->2480067\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480056\n", + "\n", + " \n", + "brush\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2480053->2480056\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480066\n", + "\n", + " \n", + "ground black pepper\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2480053->2480066\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480068\n", + "\n", + " \n", + "tomato soup\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2480053->2480068\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480062\n", + "\n", + " \n", + "garlic clove\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2480061->2480062\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480060\n", + "\n", + " \n", + "green onion\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2480059->2480060\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480055\n", + "\n", + " \n", + "celery\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2480054->2480055\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2480057\n", + "\n", + " \n", + "tomato\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2480056->2480057\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, { "data": { "text/markdown": [ "**Ingredients**:\n", - " * green pea\n", - " * corn\n", - " * garlic\n", + " * green onion\n", " * rice\n", + " * ground black pepper\n", + " * vinegar\n", + " * celery\n", + " * garlic clove\n", + " * tomato soup\n", " * olive oil\n", - " * sprout\n", - " * onion\n", - " * chicken broth\n", - " * clove garlic\n", - " * pepper\n", - " * ground beef\n", + " * chicken stock\n", + " * tomato\n", + " * parsley\n", "\n", "\n", "**Instructions**:\n", "\n", "| Step | Instruction |\n", "| ----:|:----------- |\n", - "| 1 | grate onion, chop clove garlic, cook chicken broth, heat corn and mix it with olive oil. Then simmer it. |\n", - "| 2 | chop garlic, refrigerate rice and mix it with sprout, ground beef, pepper and green pea and mix it together with the results of step 1. Then heat it. |\n" + "| 1 | chop garlic clove, chop green onion, slice celery, brush tomato and mix it with chicken stock, parsley, vinegar, olive oil, rice, ground black pepper and tomato soup. Then heat it. |\n" ], "text/plain": [ "" @@ -279,6 +4395,48 @@ "metadata": {}, "output_type": "display_data" }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "2d2a008b308e46c7ac1cdcb15eb683a9", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "2bf2b7ce8426490a9c3b2c787d9d9954", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, { "data": { "text/markdown": [ @@ -291,28 +4449,1575 @@ "metadata": {}, "output_type": "display_data" }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2559610\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2559624\n", + "\n", + " \n", + "cut\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2559610->2559624\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2559614\n", + "\n", + " \n", + "boil\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2559610->2559614\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2559612\n", + "\n", + " \n", + "beat\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2559624->2559612\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2559613\n", + "\n", + " \n", + "egg\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2559612->2559613\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2559615\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2559614->2559615\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2559616\n", + "\n", + " \n", + "sausage\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2559615->2559616\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2559620\n", + "\n", + " \n", + "saffron\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2559615->2559620\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2559618\n", + "\n", + " \n", + "slice\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2559615->2559618\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2559621\n", + "\n", + " \n", + "chicken broth\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2559615->2559621\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2559622\n", + "\n", + " \n", + "parsley\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2559615->2559622\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2559617\n", + "\n", + " \n", + "rice\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2559615->2559617\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2559619\n", + "\n", + " \n", + "clove garlic\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2559618->2559619\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, { "data": { "text/markdown": [ "**Ingredients**:\n", - " * green pea\n", - " * garlic\n", " * rice\n", - " * water\n", - " * olive oil\n", - " * onion\n", - " * chicken broth\n", " * clove garlic\n", - " * chicken\n", - " * pepper\n", - " * ground beef\n", + " * egg\n", + " * chicken broth\n", + " * saffron\n", + " * parsley\n", + " * sausage\n", "\n", "\n", "**Instructions**:\n", "\n", "| Step | Instruction |\n", "| ----:|:----------- |\n", - "| 1 | grate onion, chop chicken, place chicken broth, warm water, heat garlic and mix it with green pea, clove garlic, rice, olive oil, pepper and ground beef. Then heat it. |\n" + "| 1 | beat and cut egg |\n", + "| 2 | slice clove garlic and mix it with sausage, saffron, chicken broth, parsley and rice. Then boil it. |\n", + "| 3 | Mix together the results of step 1 and step 2. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "0db21948c69549faacba6c72bf10e4af", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "926747e94e434c74b9d685cf09cffa77", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Rice Recipe 6" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2619502\n", + "\n", + " \n", + "heat\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2619503\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2619502->2619503\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2619508\n", + "\n", + " \n", + "saute\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2619503->2619508\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2619505\n", + "\n", + " \n", + "kosher salt\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2619503->2619505\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2619513\n", + "\n", + " \n", + "rice\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2619503->2619513\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2619514\n", + "\n", + " \n", + "chicken broth\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2619503->2619514\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2619512\n", + "\n", + " \n", + "saffron\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2619503->2619512\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2619504\n", + "\n", + " \n", + "sausage\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2619503->2619504\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2619506\n", + "\n", + " \n", + "slice\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2619503->2619506\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2619509\n", + "\n", + " \n", + "chop\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2619508->2619509\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2619510\n", + "\n", + " \n", + "onion\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2619509->2619510\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2619507\n", + "\n", + " \n", + "carrot\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2619506->2619507\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * rice\n", + " * carrot\n", + " * chicken broth\n", + " * onion\n", + " * saffron\n", + " * sausage\n", + " * kosher salt\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | chop and saute onion |\n", + "| 2 | slice carrot and mix it with kosher salt, rice, chicken broth, saffron and sausage and mix it together with the results of step 1. Then heat it. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "da108b0e8328436880442164a3ee8093", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "2d50a77146154da7924154790f7fc1d8", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Rice Recipe 7" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2621040\n", + "\n", + " \n", + "heat\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2621041\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2621040->2621041\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2621034\n", + "\n", + " \n", + "saffron\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2621041->2621034\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2621038\n", + "\n", + " \n", + "chop\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2621041->2621038\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2621030\n", + "\n", + " \n", + "rice\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2621041->2621030\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2621032\n", + "\n", + " \n", + "cut\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2621041->2621032\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2621039\n", + "\n", + " \n", + "vegetable broth\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2621041->2621039\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2621036\n", + "\n", + " \n", + "chop\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2621041->2621036\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2621033\n", + "\n", + " \n", + "water\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2621041->2621033\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2621037\n", + "\n", + " \n", + "celery\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2621038->2621037\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2621031\n", + "\n", + " \n", + "tomato\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2621032->2621031\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2621035\n", + "\n", + " \n", + "garlic clove\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2621036->2621035\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * rice\n", + " * vegetable broth\n", + " * celery\n", + " * garlic clove\n", + " * water\n", + " * tomato\n", + " * saffron\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | chop celery, cut tomato, chop garlic clove and mix it with saffron, rice, vegetable broth and water. Then heat it. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "fa8076cf2ace462d84050db33b11e9dd", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "b7a0f57e78af418287dd9cc81db90e3b", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Rice Recipe 8" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2723679\n", + "\n", + " \n", + "heat\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2723680\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2723679->2723680\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2723687\n", + "\n", + " \n", + "vegetable oil\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2723680->2723687\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2723683\n", + "\n", + " \n", + "grate\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2723680->2723683\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2723685\n", + "\n", + " \n", + "mushroom soup\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2723680->2723685\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2723688\n", + "\n", + " \n", + "rice\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2723680->2723688\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2723689\n", + "\n", + " \n", + "ground beef\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2723680->2723689\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2723686\n", + "\n", + " \n", + "soy sauce\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2723680->2723686\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2723681\n", + "\n", + " \n", + "peel\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2723680->2723681\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2723684\n", + "\n", + " \n", + "carrot\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2723683->2723684\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2723682\n", + "\n", + " \n", + "onion\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2723681->2723682\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * vegetable oil\n", + " * rice\n", + " * ground beef\n", + " * carrot\n", + " * onion\n", + " * soy sauce\n", + " * mushroom soup\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | grate carrot, peel onion and mix it with vegetable oil, mushroom soup, rice, ground beef and soy sauce. Then heat it. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "fbc941a2a8464c799263119832250f04", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "cb6cd4db7a8045a58a69565b2feda5e5", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Warning: cannot find matching action node for mutation\n", + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Rice Recipe 9" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2728998\n", + "\n", + " \n", + "heat\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2728999\n", + "\n", + " \n", + "mix\n", + "node score: 0.9286\n", + "\n", + "\n", + "\n", + "2728998->2728999\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2728995\n", + "\n", + " \n", + "green pea\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2728999->2728995\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2728988\n", + "\n", + " \n", + "slice\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2728999->2728988\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2728990\n", + "\n", + " \n", + "chop\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2728999->2728990\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2728986\n", + "\n", + " \n", + "rice\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2728999->2728986\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2728997\n", + "\n", + " \n", + "chop\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2728999->2728997\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2728993\n", + "\n", + " \n", + "chicken broth\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2728999->2728993\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2728992\n", + "\n", + " \n", + "chop\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2728999->2728992\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2728994\n", + "\n", + " \n", + "salt\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2728999->2728994\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2728987\n", + "\n", + " \n", + "onion\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2728988->2728987\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2728989\n", + "\n", + " \n", + "chicken breast\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2728990->2728989\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2728996\n", + "\n", + " \n", + "parsley\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2728997->2728996\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2728991\n", + "\n", + " \n", + "green pepper\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2728992->2728991\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * green pepper\n", + " * rice\n", + " * green pea\n", + " * chicken broth\n", + " * salt\n", + " * onion\n", + " * parsley\n", + " * chicken breast\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | slice onion, chop chicken breast, chop parsley, chop green pepper and mix it with green pea, rice, chicken broth and salt. Then heat it. |\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "28960ce1e8b1446983eed4f3f64f2971", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='build initial population', max=75.0, style=ProgressStyle(…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "37f8c72c2c4a4893ab76bc69dd9b7fd5", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=35.0, style=ProgressStyle(d…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Warning: cannot mutate given node\n", + "\n" + ] + }, + { + "data": { + "text/markdown": [ + "### Rice Recipe 10" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "%3\n", + "\n", + "\n", + "\n", + "2803311\n", + "\n", + " \n", + "heat\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2803312\n", + "\n", + " \n", + "mix\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2803311->2803312\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2803322\n", + "\n", + " \n", + "parsley\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2803312->2803322\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2803323\n", + "\n", + " \n", + "sausage\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2803312->2803323\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2803320\n", + "\n", + " \n", + "rice\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2803312->2803320\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2803314\n", + "\n", + " \n", + "garlic salt\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2803312->2803314\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2803315\n", + "\n", + " \n", + "vegetable oil\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2803312->2803315\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2803321\n", + "\n", + " \n", + "chicken broth\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2803312->2803321\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2803318\n", + "\n", + " \n", + "cut\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2803312->2803318\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2803316\n", + "\n", + " \n", + "dice\n", + "node score: 1.0000\n", + "\n", + "\n", + "\n", + "2803312->2803316\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2803319\n", + "\n", + " \n", + "onion\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2803318->2803319\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "2803317\n", + "\n", + " \n", + "tomato\n", + "node score:1.0000\n", + "\n", + "\n", + "\n", + "2803316->2803317\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "**Ingredients**:\n", + " * garlic salt\n", + " * vegetable oil\n", + " * rice\n", + " * chicken broth\n", + " * onion\n", + " * tomato\n", + " * parsley\n", + " * sausage\n", + "\n", + "\n", + "**Instructions**:\n", + "\n", + "| Step | Instruction |\n", + "| ----:|:----------- |\n", + "| 1 | cut onion, dice tomato and mix it with parsley, sausage, rice, garlic salt, vegetable oil and chicken broth. Then heat it. |\n" ], "text/plain": [ "" @@ -323,15 +6028,59 @@ } ], "source": [ - "p = EA.Population([\"rice\"],['rice'], min_additional=4, max_additional=13, n_population = 50)\n", + "for i in range(10):\n", "\n", - "p.run(50)\n", + " p = EA.Population([\"rice\"],['rice'], min_additional=6, max_additional=11, n_population = 75, mutations=2)\n", "\n", - "samples = EA.np.random.choice(p.population[:10], 5)\n", + " p.run(35)\n", "\n", - "for i, s in enumerate(samples):\n", - " display(EA.Markdown(f\"### Rice Recipe {i+1}\"))\n", - " display(s.root().to_instruction().to_markdown())" + " scores = [tree.score() for tree in p.population]\n", + "\n", + " ii = np.argsort(-np.array(scores))\n", + "\n", + " samples_i = EA.np.random.choice(ii[:1],1)\n", + "\n", + " samples = [p.population[i] for i in samples_i]\n", + "\n", + " for k, s in enumerate(samples):\n", + " display(EA.Markdown(f\"### Rice Recipe {i+1}\"))\n", + " display(s.root().dot())\n", + " display(s.root().to_instruction().to_markdown())\n", + " with open(f\"rice_{i}.md\", \"w\") as f:\n", + " f.write(s.root().to_instruction().to_markdown().data)\n", + " f.close()" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(array(['heat', 'boil', 'cool', 'cook', 'bake', 'place', 'simmer', 'pour',\n", + " 'warm', 'refrigerate', 'drain', 'brown', 'chill', 'cut', 'blend',\n", + " 'beat', 'whisk', 'thicken', 'rinse', 'freeze', 'slice', 'soak',\n", + " 'spread', 'knead', 'fry', 'melt', 'whip', 'steam', 'grill', 'peel',\n", + " 'chop', 'break', 'brush', 'wash', 'open', 'burn', 'saute', 'steep',\n", + " 'skim', 'squeeze', 'wipe', 'mash', 'marinate', 'broil', 'thaw',\n", + " 'sour', 'crack', 'dice', 'grind', 'baste', 'mince', 'grate'],\n", + " dtype='