Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i4ncg-0006QW-Kv for pgsql-docs@arkaria.postgresql.org; Mon, 02 Sep 2019 14:48:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i4nce-0006zk-6T for pgsql-docs@arkaria.postgresql.org; Mon, 02 Sep 2019 14:48:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i4ncd-0006zd-UC for pgsql-docs@lists.postgresql.org; Mon, 02 Sep 2019 14:48:00 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i4ncW-0008Cm-Do for pgsql-docs@lists.postgresql.org; Mon, 02 Sep 2019 14:47:59 +0000 Received: from [192.168.178.43] ([77.181.245.34]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPSA (Nemesis) id 1N4eOd-1iCwke3RIt-011hlO for ; Mon, 02 Sep 2019 16:47:47 +0200 To: Pg Docs From: =?UTF-8?Q?J=c3=bcrgen_Purtz?= Subject: Consolidation of first figures Message-ID: <99b6d626-cca9-0722-3e77-e0cb188a13a3@purtz.de> Date: Mon, 2 Sep 2019 16:47:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------97E60CE86DFB3941795F8B9B" Content-Language: en-US X-Provags-ID: V03:K1:nZmtMhrc/hw+gPyfYfLNXfHLfZMIOByNifUyIXtayXakYmfbe+V A3WLMvzXUPt93wJ4JoBFsHcwUCmdWvB3V/5Je2PxfBdYqpC2YlRCj1y/AgFJtu2lhNxJpOo denWLlc7sW6Rb8mJcnWbkcNxUitJ2dGdXj6QucvFaAZSvZyfcNTSxyVgS0YAS4kenrkZr6I IudeaKnU0swzW4QDhykEw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:9B2FLQHRsVc=:Fjzrp3Del36hDloQCZTWpE 745X22B6d3LZ5ybbusVJVuob0VRLJRgcWtbZonGAGuKl18F69Xm5zLCja3sodj+BeuRQirPMc iQUvhaerrZTZMhSN5lFk5OH8xlZl8sMMRIqlMektJ34ePKJShrOZoVJz/uLRw/V0evLnZ7syO QW2U0nRxiEpVDwAP2b9zAiRT3LMNLGdqLrl09n3Vxp51jSnf01w2t5yi+xsXcvFjpbIml8cPv 3xFJJSmszcedtN46EGCE9FV7cnQhXF/VdzK4F5SnzFeUpnRYiI13divCuRhXGnTM7sgo8wVCy CLRvv8uIcwCF0HpboftT8xMllYnTm8IK+Xs8jTnlHCyzH+F52xQ1dUAzuX7EB1Xw6kz4FOHuG r4WJ1ifSXzAbwKfrXHl0U6J7uoaBJ8tCwiQUBVnZLl+lWhNlHkootJBh5jh5RpXe8IqF0u0vh y85qhyoqnTGiFgwTBZB8S+wTQan7hXVHSmhN/Acq+pIyPhHCp9dkwloILbNSqWymGV9vrkJQe ZnwEq1JtBXlnXtZIeehRke2iddvrToGhgtCINBG6wk70A/XBLAwkuhg7pIbEEr7i1ahFM1CXT HsdhjeVUPDLSDAUSZUCXJOf8Sqgt5JR2AHy/aazoctHSkgbm+LYdcbfS77Wyq6PN7YEdSoqRM I7rMtplfy/wP3+RexuNDyU0zXDnPKjCBv8LedEVZ4KFlRq0XNnVKKvch/EmVoiJAkHpjg3MBC 2FsrKLb9L6gePjnd7vdwJpuTXqxmoe0Rf2HwfGUsWf+ioWlAlnT2M1gDt/UnslBdJGZWWPif0 haapz+W+PsWzprlHzIGCC7D7xkNTQ== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------97E60CE86DFB3941795F8B9B Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit We plan to integrate figures into version 12. Currently there are 2 resp. 3 figures in git (BETA3 / master). This may be intended - or not. Additionally there are some patches in the mailing list. The attached patch summarizes everything for an integration into BETA3: 3 figures, common attributes (fonts, sizes, colors) and structure for .gv files, changed texts in gin.gv, Makefile, README. Jürgen Purtz --------------97E60CE86DFB3941795F8B9B Content-Type: text/x-patch; name="figures_12beta3.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="figures_12beta3.patch" diff --git a/doc/src/sgml/geqo.sgml b/doc/src/sgml/geqo.sgml index 5120dfbb42..81cd84155a 100644 --- a/doc/src/sgml/geqo.sgml +++ b/doc/src/sgml/geqo.sgml @@ -84,59 +84,25 @@ Through simulation of the evolutionary operations recombination, mutation, and selection new generations of search points are found - that show a higher average fitness than their ancestors. + that show a higher average fitness than their ancestors. + illustrates in which order and how long the three steps are processed. +
+ Structure of a Genetic Algorithm + + + + + +
+ According to the comp.ai.genetic FAQ it cannot be stressed too strongly that a GA is not a pure random search for a solution to a problem. A GA uses stochastic processes, but the result is distinctly non-random (better than random). - -
- Structured Diagram of a Genetic Algorithm - - - - - - P(t) - generation of ancestors at a time t - - - - P''(t) - generation of descendants at a time t - - - - - - -+=========================================+ -|>>>>>>>>>>> Algorithm GA <<<<<<<<<<<<<<| -+=========================================+ -| INITIALIZE t := 0 | -+=========================================+ -| INITIALIZE P(t) | -+=========================================+ -| evaluate FITNESS of P(t) | -+=========================================+ -| while not STOPPING CRITERION do | -| +-------------------------------------+ -| | P'(t) := RECOMBINATION{P(t)} | -| +-------------------------------------+ -| | P''(t) := MUTATION{P'(t)} | -| +-------------------------------------+ -| | P(t+1) := SELECTION{P''(t) + P(t)} | -| +-------------------------------------+ -| | evaluate FITNESS of P''(t) | -| +-------------------------------------+ -| | t := t + 1 | -+===+=====================================+ - -
diff --git a/doc/src/sgml/images/Makefile b/doc/src/sgml/images/Makefile index 1e7993020b..f9e356348b 100644 --- a/doc/src/sgml/images/Makefile +++ b/doc/src/sgml/images/Makefile @@ -3,6 +3,7 @@ # see README in this directory about image handling ALL_IMAGES = \ + genetic-algorithm.svg \ gin.svg \ pagelayout.svg diff --git a/doc/src/sgml/images/README b/doc/src/sgml/images/README index 07c4580255..c451d4bca4 100644 --- a/doc/src/sgml/images/README +++ b/doc/src/sgml/images/README @@ -13,7 +13,8 @@ involve diffable source files. These tools are acceptable: - Graphviz (https://graphviz.org/) -- Ditaa (http://ditaa.sourceforge.net/) +- Ditaa (https://github.com/stathissideris/ditaa), version 0.11 or + higher. Previous versions does not support SVG. We use SVG as the format for integrating the image into the ultimate output formats of the documentation, that is, HTML, PDF, and others. diff --git a/doc/src/sgml/images/genetic-algorithm.gv b/doc/src/sgml/images/genetic-algorithm.gv new file mode 100644 index 0000000000..fd4c982e91 --- /dev/null +++ b/doc/src/sgml/images/genetic-algorithm.gv @@ -0,0 +1,49 @@ +digraph { + + layout=dot; + + // default values + node [shape=box, label="", fontname="sans-serif", style=filled, fillcolor=white, width=2.2, fontsize=8]; + graph [fontname="sans-serif"]; // must be specified separately + edge [fontname="sans-serif"]; // must be specified separately + + // an unobtrusive background color + pad="1.0, 0.5"; + bgcolor=whitesmoke; + + // layout of edges and nodes + splines=ortho; + nodesep=0.3; + ranksep=0.3; + + // nodes + a1[label="INITIALIZE t := 0"]; + a2[label="INITIALIZE P(t)"]; + a3[label="evaluate FITNESS of P(t)"]; + a4[shape="diamond", label="STOPPING CRITERION"; width=4]; + + // connect 'end' node with 'a9' node (bottom of figure) + { + rank=same; + a9[label="t := t + 1"]; + // end-symbol similar to UML notation + end[shape=doublecircle, label="end", width=0.5]; + } + + a5[label="P'(t) := RECOMBINATION{P(t)}"]; + a6[label="P''(t) := MUTATION{P'(t)}"]; + a7[label="P(t+1) := SELECTION{P''(t) + P(t)}"]; + a8[label="evaluate FITNESS of P''(t)"]; + + // edges + a1 -> a2 -> a3 -> a4; + a4 -> a5[xlabel="false ", fontsize=10]; + a4 -> end[xlabel="true ", fontsize=10]; + a5 -> a6 -> a7 -> a8 -> a9; + a4 -> a9 [dir=back]; + + // explain the notation + expl [shape=plaintext, fontsize=10, width=3.2, fillcolor=whitesmoke, + label="P(t): generation of ancestors at a time t\lP''(t): generation of descendants at a time t\l"]; + +} diff --git a/doc/src/sgml/images/gin.gv b/doc/src/sgml/images/gin.gv index 097e91029a..24604df0d5 100644 --- a/doc/src/sgml/images/gin.gv +++ b/doc/src/sgml/images/gin.gv @@ -1,93 +1,115 @@ digraph "gin" { - layout=dot; - node [label="", shape=box, style=filled, fillcolor=gray, width=1.4]; - - m1 [label="meta page"]; - - subgraph cluster01 { - label="entry tree"; - subgraph egroup1 { - rank=same; - e1; - } - subgraph egroup2 { - rank=same; - e2 -> e3 -> e4; - } - subgraph egroup3 { - rank=same; - e5 -> e6 -> e7 -> e8 -> e9; - } - e1 -> e4; - e1 -> e3; - e1 -> e2; - e2 -> e5; - e2 -> e6; - e3 -> e7; - e4 -> e8; - e4 -> e9; - - e6 [fillcolor=green, label="posting list"]; - e8 [fillcolor=green, label="posting list"]; - e9 [fillcolor=green, label="posting list"]; - } - - subgraph cluster02 { - label="posting tree"; - subgraph pgroup1 { - rank=same; - p1; - } - subgraph pgroup2 { - rank=same; - p2 -> p3; - } - p1 -> p2; - p1 -> p3; - - p2 [fillcolor=green, label="heap ptr"]; - p3 [fillcolor=green, label="heap ptr"]; - } - - subgraph cluster03 { - label="posting tree"; - subgraph pgroup3 { - rank=same; - p4; - } - - p4 [fillcolor=green, label="heap ptr"]; - } - - subgraph cluster04 { - label="posting tree"; - subgraph pgroup4 { - rank=same; - p5; - } - subgraph pgroup5 { - rank=same; - p6 -> p7; - } - p5 -> p6; - p5 -> p7; - - p6 [fillcolor=green, label="heap ptr"]; - p7 [fillcolor=green, label="heap ptr"]; - } - - subgraph cluster05 { - label="pending list"; - node [style=filled, fillcolor=red]; - n1 -> n2 -> n3 -> n4; - } - - m1 -> e1; - e5 -> p1; - e7 -> p4; - e7 -> p5; - m1 -> n1; - - e5 [style=filled, fillcolor=green4]; - e7 [style=filled, fillcolor=green4]; + + layout=dot; + + // default values + node [shape=box, label="", fontname="sans-serif", style=filled, fillcolor=lightgray, width=1.4]; + graph [fontname="sans-serif"]; // must be specified separately + edge [fontname="sans-serif"]; // must be specified separately + + // an unobtrusive background color + pad="1.0, 0.5"; + bgcolor=whitesmoke; + + // The top node + m1 [label="meta page", style=filled, fillcolor=beige]; + + // other nodes + subgraph cluster01 { + bgcolor=white; + label="entry tree"; + subgraph egroup1 { + rank=same; + e1; + } + subgraph egroup2 { + rank=same; + e2 -> e3 -> e4; + } + subgraph egroup3 { + rank=same; + e5 -> e6 -> e7 -> e8 -> e9; + } + e1 -> e4; + e1 -> e3; + e1 -> e2; + e2 -> e5; + e2 -> e6; + e3 -> e7; + e4 -> e8; + e4 -> e9; + + e5 [fillcolor=cyan]; + e6 [fillcolor=cyan]; + e7 [fillcolor=cyan]; + e8 [fillcolor=cyan]; + e9 [fillcolor=cyan]; + + } + + subgraph cluster02 { + bgcolor=white; + label="posting tree"; + subgraph pgroup1 { + p1; + } + subgraph pgroup2 { + rank=same; + p2 -> p3; + } + p1 -> p2; + p1 -> p3; + + p2 [fillcolor=deepskyblue]; + p3 [fillcolor=deepskyblue]; + } + + subgraph cluster03 { + bgcolor=white; + label="posting tree"; + subgraph pgroup3 { + p4; + } + + p4 [fillcolor=deepskyblue]; + } + + subgraph cluster04 { + bgcolor=white; + label="posting tree"; + subgraph pgroup4 { + p5; + } + subgraph pgroup5 { + rank=same; + p6 -> p7; + } + p5 -> p6; + p5 -> p7; + + p6 [fillcolor=deepskyblue]; + p7 [fillcolor=deepskyblue]; + } + + subgraph cluster05 { + bgcolor=white; + label="pending list"; + node [fillcolor=wheat, label="pending entries", width=1.8]; + n1 -> n2 -> n3 -> n4 -> n5; + } + + m1 -> e1; + e5 -> p1; + e7 -> p4; + e7 -> p5; + m1 -> n1; + + // Explanations + expl_1 [shape=plaintext, width=2.5, label="Internal tree node"]; + expl_2 [shape=plaintext, fillcolor=cyan, width=5.2, label=" and/or pointer to "]; + expl_3 [shape=plaintext, fillcolor=deepskyblue, width=2.0, label="Only "]; + p6 -> expl_1 [style=invis]; + p6 -> expl_2 [style=invis]; + p6 -> expl_3 [style=invis]; + } --------------97E60CE86DFB3941795F8B9B--