Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research Notes - Analogy comparison #1

Open
dnorman opened this issue May 13, 2020 · 0 comments
Open

Research Notes - Analogy comparison #1

dnorman opened this issue May 13, 2020 · 0 comments

Comments

@dnorman
Copy link
Contributor

dnorman commented May 13, 2020

In order to serve its purpose, Mindbase must perform symbolic inference over analogies recorded within the system.

In MBQL this would look like:

$x = Bind("Hot")
$y = Ground($x : "Cold")

This means we wish to construct a Symbol $x containing all Members which are referenced by previously-defined associative analogies opposite the text Artifact "Cold"

Crucially, note that the text Artifact itself is not what is being referenced, but rather an instantiation or Claim of the Artifact. Artifacts themselves are just buckets of bits, and are devoid of any kind of Internal Meaning

Symbol $y captures the set of those Alledged Analogies which contributed to the match – In the above case representing the relationship between the "Hot" and "Cold" symbols.

from mindbase/experiments/analogy_compare/main.rs:

    // In this experiment, we are approxmiating the following MBQL
    // $x = Bind("Hot")
    // $y = Ground($x : "Cold")

    let mut x = Symbol::null();
    let mut y = Symbol::null();

    // For simplicity, lets say these are all the analogies in the system
    let candidates = [Analogy::new("a1", sym!["Hot1"], sym!["Cold1"]),
                      Analogy::new("a2", sym!["Hot2"], sym!["Cold2"]),
                      Analogy::new("a3", sym!["Cold3"], sym!["Hot3"])];

    // NOTE - this should have an unassigned Spin, because it's a match pair
    let search_pair = FuzzySet::from_left_right("Hot", "Cold");
    println!("Searching for {}", search_pair.diag_lr());

    for candidate in &candidates {
        let v = candidate.intersect(&search_pair).expect("All of the above should match");
        x.members.extend(v.left());

        y.members.insert(Member { id:   candidate.id.clone(),
                              spin: Spin::Up, /* This is WRONG for a3. It should be Down because the order of the association
                                               * is reversed. how do we fix this? */
                              side: Side::Middle, });
    }

    println!("symbol x is: [{}]", x.members.diag());
    println!("symbol y is: [{}]", y.members.diag());

Which renders:

Screen Shot 2020-05-13 at 4 25 33 PM

This is wrong, because we get an x value of [Cold3˱↓,Hot1˱↑,Hot2˱↑] when we should get [Hot1˱↑,Hot2˱↑,Hot3˲↓]

y is also wrong. We get [a1ᐧ↑,a2ᐧ↑,a3ᐧ↑] when we should get [a1ᐧ↑,a2ᐧ↑,a3ᐧ↓] indicating that a3 is included, but with reversed polarity, because the order of the associations is the opposite of the search criteria.

See this code in the rust playground

Questions and notes for next time:

  • How do we fix Analogy::intersect to render the right results for x and y?
  • How does this compose across multiple levels of Associative analogy? Eg ("Smile":"Mouth"):("Wink":"Eye")
  • An associative Analogy involves two FuzzySets of Members (Left and Right) which are NOT associable pairwise as Members, only as whole sets. This is because each FuzzySet represents a symbol in its own right.
    • Given a perfect match of left-handed Members, all right-handed Members can be safely inferred.
    • Given a PARTIAL match of left-handed Members, The entirety of the subset the right is inferred, but with a lesser degree of confidence, commensurate with the number of left-handed matches. The inverse is true as well of right handed matches.
    • With what data structure do we represent this partial matching, and how does that compose in the aforementioned situation? Presumably via some recursive confidence score
@dnorman dnorman changed the title Research Notes 2020-05-12 - Research Notes 2020-05-12 - Analogy comparison May 13, 2020
@dnorman dnorman added this to Research in ankurah May 13, 2020
@dnorman dnorman moved this from Research to Done in ankurah May 14, 2020
@dnorman dnorman changed the title Research Notes 2020-05-12 - Analogy comparison Research Notes 2020-05-13 - Analogy comparison May 14, 2020
dnorman added a commit that referenced this issue May 15, 2020
@dnorman dnorman changed the title Research Notes 2020-05-13 - Analogy comparison Research Notes - Analogy comparison Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
ankurah
  
Done
Development

No branches or pull requests

1 participant