OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-generate commits / e579df7

Add notes, and spell-check
e579df7653bea53b98c11135fe7bebccde7ea768
by Linas Vepstas <linasvepstas@gmail.com> · 2021-12-04T03:34:17.000Z

Changed files (2) +13 -5

examples/basic-network.scm +2 -2
……@@ -3,7 +3,7 @@
33;
44; Example of a lexis that can be used to generate random networks.
55; The lexis contains only one node type and one edge type, and so
6; the generated network will consist of ony these two. Six sections
6; the generated network will consist of only these two. Six sections
77; are defined, having one through six connectors on them. These are
88; given a weighting, so that when the network is assembled, the
99; weights determine the probability that a node will be used.
……@@ -64,7 +64,7 @@
6464 (Connector (Concept "E") (ConnectorDir "*")))))
6565
6666; Give each of them a weight; this will be the probaility of
67; thier being drawn (selected) when assempling the graph.
67; their being drawn (selected) when assempling the graph.
6868(define weights (PredicateNode "weights"))
6969
7070(cog-set-value! b1 weights (FloatValue 1))
examples/trisexual.scm +11 -3
……@@ -8,7 +8,8 @@
88;
99; Other parts of the code call this "polarity", and so the three examples
1010; could be called mono-polar, bipolar and tri-polar. The concept of "mating"
11; applies for either vocabulary.
11; applies for either vocabulary. "Joining" and "linking" are synonymous
12; ideas. Different blocks of code use these words interchangeably.
1213;
1314(use-modules (opencog))
1415;
……@@ -47,14 +48,21 @@
4748(define dir-set (Concept "left-right connectors"))
4849(Member (Set (ConnectorDir "+") (ConnectorDir "-")) dir-set)
4950
51; Please keep in mind that a `Set` in Atomese is an unordered set. Thus,
52; the expression `(Set (ConnectorDir "+") (ConnectorDir "-"))` and also
53; `(Set (ConnectorDir "-") (ConnectorDir "+"))` are exactly the same set.
54; There is no need to specify both orderings.
55;
56; The above just says: "opposites attract".
57
5058; --------------------------------------
5159; The tri-sexual example follows below. It is not currently used in any
5260; demos; the reader is encouraged to construct one.
5361;
5462; The example here is that there are three sexes, `a`, `b` and `c`. The
55; mating rules are such that sex `a` can mate with `b`, but nothing else
63; mating rules are such that sex `a` can mate with `b`, but nothing else,
5664; so `a` cannot mate to other `a`'s nor to `c`. The sex `c` can also mate
57; to `b`, but not to itself. Finally, `b` cannot mate with itself. This
65; with `b`, but not to itself. Finally, `b` cannot mate with itself. This
5866; idea is encoded in the following rules:
5967
6068(define sexuality-set (Concept "abc example"))