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 1hoY7M-0001W0-UU for pgsql-docs@arkaria.postgresql.org; Fri, 19 Jul 2019 19:00:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hoY7L-0006Pp-N0 for pgsql-docs@arkaria.postgresql.org; Fri, 19 Jul 2019 19:00:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hoY4f-00068R-00 for pgsql-docs@lists.postgresql.org; Fri, 19 Jul 2019 18:57:45 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1hoY4b-0007Un-Qr for pgsql-docs@lists.postgresql.org; Fri, 19 Jul 2019 18:57:43 +0000 Received: from [192.168.178.43] ([77.12.7.112]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MgRYd-1iMVFl1SoR-00hwso for ; Fri, 19 Jul 2019 20:57:38 +0200 Subject: Re: Make 'Genetic Algorithm' a real figure From: =?UTF-8?Q?J=c3=bcrgen_Purtz?= To: Pg Docs References: Message-ID: Date: Fri, 19 Jul 2019 20:57:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------00E80203DB90AB48353F3CB4" Content-Language: en-US X-Provags-ID: V03:K1:qlKQjNyNLae+43XhCYefJqM0q9uV95LcL71PJdezdDO3hMi5ZEn Cb6luyN9mX0GxxgKcE8jVJUtGtNSV2IkDg6APRp+32Pgql/0azZuOCPY8RykUWN0J64LWTQ 15vnaie4emg1+dtFnycWzRZDK1MdwK6lIMBmKvY9BYiUi1b4rL6TV2IP82jWvaeOd+Qh9Ri PP6Fdu/gm1pSYkB4tBQmQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:8iALsaJuwrw=:g5/qMJrB0w+Xmrjkoocmzk ZHGhBxReNN5q3x6+VUZ7mT1Wio12liv4AanxqCD94jvEEJ2dQi/5U2oaZptTTns2/ABRZID/c k0PxLcOe55v2V63XZEDpSYyVwzVVna/0CW1N6Fp8W8rPHg4kNb+5cbKVg3BgVDWPof4JnWY0T Vk9THAPxHfRpXqj/Z7dbuw5DAPvQdoR9JvDoJp+df0+Ysh/YElRy1+pH21ni1GSOM+LCKU8Vt scIH8OXroBAafNyUD+lYk4xahgUNaHZnWM/PGlIhrj9SKsyF9hEkZ+zSlUvpiTIXfI2pycTi9 lQHprAv3IVniiJLDPu4LAXd0Y6kVRsY78JUxKnAd9pMny+C79T4LhJ/aUwAFUEsNKl2DILJjc n9AytEH01U83WvZcKgHNt9v5yGJLGBUNshwLh7+UlGSgFDGpQJUHfrKUlr+lK8sDnE+jCPUKR yGAio2Ilsl0sEefSMS/EmaIO+ptAUaXdvkMR799LDAHvSzsxx8DLYGjvYB1orrAfsQqMj1v3L tP9wsUi1OZas79IoanMfOv26LyYoH7z57KYjRhde9o/ZD6c5w5knP+VwCBwkRuriqv1AOsXHc 1kzsMUlN1105FSpVgAVjO+8SxIIhglnY5kTTEHRg+s0AVYHsolVV3whLkH2IVP1j16C4sW7+K SSGcQAQ2rnWDvbhoA6hNB+J1wmmsDyEX+WhTPZTOn7PTNSmVMTajMLhxq996eQunS8OkgYwFz tOfluz09FJxDX+2eWpiYDbdt8J99HJqu8SqRKg== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------00E80203DB90AB48353F3CB4 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit This is an adoption of the genetic-algorithm.gv file to the style of the gin.gv file: same font, similar header, use of TAB instead of SPACE. Kind regards Jürgen Purtz --------------00E80203DB90AB48353F3CB4 Content-Type: text/x-patch; name="genetic-algorithm-v1.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="genetic-algorithm-v1.patch" diff --git a/doc/src/sgml/geqo.sgml b/doc/src/sgml/geqo.sgml index 5120dfbb42..5a52fb46db 100644 --- a/doc/src/sgml/geqo.sgml +++ b/doc/src/sgml/geqo.sgml @@ -84,7 +84,8 @@ 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. @@ -94,48 +95,13 @@ 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 | -+===+=====================================+ - +
+ Structure of a Genetic Algorithm + + + + +
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/genetic-algorithm.gv b/doc/src/sgml/images/genetic-algorithm.gv index e69de29bb2..520c44bc65 100644 --- a/doc/src/sgml/images/genetic-algorithm.gv +++ b/doc/src/sgml/images/genetic-algorithm.gv @@ -0,0 +1,51 @@ +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; + + // label="Structure of a Genetic Algorithm" fontsize=26; + + // 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]; // forces 'true'-edge to right side of figure + + // explain the notation + expl [shape=plaintext, fontsize=10, width=3.2, fillcolor=whitesmoke, + label="P(t) generation of ancestors at a time t\nP''(t) generation of descendants at a time t"]; + +} --------------00E80203DB90AB48353F3CB4--