OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-generate commits / fa2e5d9

Rewrite intro section.
fa2e5d9f9c5d5dd321981de17013afe7b537b7dd
by Linas Vepstas <linasvepstas@gmail.com> · 2020-04-22T17:29:29.000Z

Changed files (1) +46 -22

demo/seir.scm +46 -22
……@@ -5,7 +5,7 @@
55;
66; SEIR == "susceptible", "exposed", "infected", and "recovered".
77;
8; This is a demo, only! It is demonstrating several different AtomSpace
8; This is a demo, only! It demonstrates several different AtomSpace
99; programming techniques, one of which is the brand-new (version 0.1)
1010; random network generator. Another is Value Flows: the use of Values
1111; for holding mutable state, and flowing that state through a network.
……@@ -13,7 +13,7 @@
1313; the OpenCog AtomSpace! This demo *could* be enhanced to do actual
1414; scientific exploration; see "making this useful", below.
1515;
16; This demo generates a random "social network", consisting of two types
16; The demo generates a random "social network", consisting of two types
1717; of relationships: "friends" and "strangers". It adopts a simple SEIR
1818; model of disease transmission and progression along this network.
1919; The model itself is a (simple) hand-coded state-transition machine.
……@@ -22,9 +22,12 @@
2222;
2323; https://blog.opencog.org/2020/04/22/covid-19-modelling-and-random-social-networks/
2424;
25; Reading the blog post might be easier than diving head-first into the
26; code below. If you're lazy and just want to run the demo, then just
27; start the guile shell, load this file, and ... the demo will run.
25; The blog post touches on the high-lites of the demo, avoiding all of
26; the grunge needed to make the code actually run. Thus, its easier to
27; read than the below.
28;
29; If you're lazy and just want to run the demo, then just start the
30; guile shell, load this file, and ... the demo will run.
2831;
2932; Making this Useful
3033; ------------------
……@@ -36,16 +39,31 @@
3639;
3740; There's no statistical analysis performed, and no graphs or curves are
3841; drawn. The demo shows how to generate the raw data, not how to analyze
39; raw data.
42; raw data. There are plenty of tools designed for statistical analysis.
43; Use those.
44;
45; A few notes about scheme, python and Atomese. This demo would appear
46; to be written ins scheme. It could have just as eassily been written
47; in python, without changing it's basic form (the AtomSpace has python
48; bindings.) It may seem hard to beleive, but the choice of language
49; doesn't really much matter. That's because all of the hard work is
50; done in Atomese.
4051;
41; Altering the disease progression model is not particularly easy. It is
42; written in Atomese, which is rather verbose, and programming in
43; Atomese is, in many ways, like programming in assembly code. This is
44; perhaps the most important thing to understand about this demo.
4552; Atomese is a graphical programming language, and it was designed for
46; automation. This means that the graphs, and the Atomese code, is meant
47; to be easy for other algorithms to manipulate. It's designed for other
48; machines, not for humans :-!
53; automation. Atomese expressions are graphs; they live as graphs in the
54; AtomSpace graph database. Atomese encodes a type of "Abstract Syntax
55; Tree" (see https://en.wikipedia.org/wiki/Abstract_syntax_tree) and
56; such a representation is useful for all of the reasons that the
57; Wikipedia article says they are. But it also means that "coding" in
58; Atomese can sometimes feel unusual. Like: "Why can't I just code in
59; python? It would be so much easier!" -- Well, but that misses the
60; point. And the point is, again: Atomese was designed for automation.
61;
62; What this really means that the graphs are meant to be easy for other
63; algorithms to manipulate. It's designed for ease-of-use by machines,
64; not for humans! The style is more barren, unadorned, without
65; short-cuts. Its a bit verbose at times. That's OK, machines don't mind
66; verbosity and tedium.
4967;
5068; Consider, for example, a graphical editor - something where you can
5169; drag-n-drop, hand-draw interacting bubble diagrams. Something easy
……@@ -55,15 +73,21 @@
5573; it becomes easy -- really easy -- to convert such diagrams into
5674; executable code. That's what Atomese is designed to do.
5775;
58; Another possibility is that of an automatic model explorer: a system
59; that automatically creates a variety of different models, and then
60; explores how well each model works. The automatic generator could,
61; for example, mutate the best models and see if even better-fitting
62; models can be obtained, searching for a best-fit. The goal of Atomese
63; is that it becomes very easy for such models to be generated and run.
64; The verboseness of Atomese is no longer a problem; the simple
65; programming language it implements is easy for other tools to
66; manipulate and control. That's what it's good for.
76; In this demo, the disease progression model is written in Atomese.
77; This is the model that a graphical GUI WYSIWYG whizz-bang system
78; would generate.
79;
80; Atomese enables other, more abstract approaches. Consider an automatic
81; model explorer: a system that automatically creates a variety of
82; different disease progression models, and then explores how each
83; model works. The model generator might try to fit an existing dataset.
84; Alternately, it could mutate models so as to obtain certain
85; characteristics. This moves beyond just adjusting some parameters
86; in some hand-created, hypothesized model. This is not just some
87; monte-carlo search or machine-learning hill-climbing for paramter
88; tuning. This is a whole-sale creation of previously non-existant
89; code. Atomese allows software to read, understand, mutate, modify
90; and write programs.
6791;
6892; Thus, in reading the below, keep in mind that there is nothing special
6993; about the SEIR model; its a stand-in for what could be a generic,