{"action":"closed","number":1528,"pull_request":{"url":"https://api.github.com/repos/opencog/opencog/pulls/1528","id":33322551,"html_url":"https://github.com/opencog/opencog/pull/1528","diff_url":"https://github.com/opencog/opencog/pull/1528.diff","patch_url":"https://github.com/opencog/opencog/pull/1528.patch","issue_url":"https://api.github.com/repos/opencog/opencog/issues/1528","number":1528,"state":"closed","locked":false,"title":"Backward Chainer: different sort of implementation","user":{"login":"williampma","id":7298267,"avatar_url":"https://avatars.githubusercontent.com/u/7298267?v=3","gravatar_id":"","url":"https://api.github.com/users/williampma","html_url":"https://github.com/williampma","followers_url":"https://api.github.com/users/williampma/followers","following_url":"https://api.github.com/users/williampma/following{/other_user}","gists_url":"https://api.github.com/users/williampma/gists{/gist_id}","starred_url":"https://api.github.com/users/williampma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williampma/subscriptions","organizations_url":"https://api.github.com/users/williampma/orgs","repos_url":"https://api.github.com/users/williampma/repos","events_url":"https://api.github.com/users/williampma/events{/privacy}","received_events_url":"https://api.github.com/users/williampma/received_events","type":"User","site_admin":false},"body":"**Not done and not working yet**, I am going to continue working on this for the next few days.  Pushing this crazy list out of the way to avoid future rebase.\r\n\r\nInitially wanted to just do small changes to make the chainer works, but halfway there I found it was impossible to do what is needed unless I changed the underlying algorithm...  so ended up rewriting most of the stuff.\r\n\r\nWhat is done (probably there are more that I forgot, and some things that were done became useless after I redesigned the algorithm):\r\n- make the Backward Chainer chain of rules instead of random ImplicationLink\r\n- pushed any logical link heavy lifting to the Pattern Matcher\r\n- maintain a targets list (stack for now) to allow future targets selection, and to make it possible to just do a single step of Backward Chaining at a time (instead of all the way solving everything)\r\n- changed Modus Ponens rule to be more explicit\r\n- added a method to PatternUtils.cc  to check if there are free vars in a tree\r\n- etc\r\n- etc\r\n- etc etc etc\r\n\r\nCurrently stuck on the new Pattern Matcher complaining \r\n```\r\nThere were no type restrictions! That must be wrong!\r\n```\r\nbecause apparently it does not want to match a single untyped VariableNode to the whole atomspace, even though the atomspace in question is a temp atomspace with only 2 atoms in it...  this appears in the \"unify\" method which I hacked to use to the PM for unification between 2 atoms (to let PM handle UnorderedLink, var in quote, etc).","created_at":"2015-04-15T04:50:46Z","updated_at":"2015-04-15T06:41:39Z","closed_at":"2015-04-15T06:41:39Z","merged_at":"2015-04-15T06:41:39Z","merge_commit_sha":"692ec979d62b8cdbe3bb9978be9db791bcd950e2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opencog/opencog/pulls/1528/commits","review_comments_url":"https://api.github.com/repos/opencog/opencog/pulls/1528/comments","review_comment_url":"https://api.github.com/repos/opencog/opencog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opencog/opencog/issues/1528/comments","statuses_url":"https://api.github.com/repos/opencog/opencog/statuses/12866226a0bc233d8310e2015c3c5533dc1bb28f","head":{"label":"williampma:BackwardChainImprove","ref":"BackwardChainImprove","sha":"12866226a0bc233d8310e2015c3c5533dc1bb28f","user":{"login":"williampma","id":7298267,"avatar_url":"https://avatars.githubusercontent.com/u/7298267?v=3","gravatar_id":"","url":"https://api.github.com/users/williampma","html_url":"https://github.com/williampma","followers_url":"https://api.github.com/users/williampma/followers","following_url":"https://api.github.com/users/williampma/following{/other_user}","gists_url":"https://api.github.com/users/williampma/gists{/gist_id}","starred_url":"https://api.github.com/users/williampma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williampma/subscriptions","organizations_url":"https://api.github.com/users/williampma/orgs","repos_url":"https://api.github.com/users/williampma/repos","events_url":"https://api.github.com/users/williampma/events{/privacy}","received_events_url":"https://api.github.com/users/williampma/received_events","type":"User","site_admin":false},"repo":{"id":18792330,"name":"opencog","full_name":"williampma/opencog","owner":{"login":"williampma","id":7298267,"avatar_url":"https://avatars.githubusercontent.com/u/7298267?v=3","gravatar_id":"","url":"https://api.github.com/users/williampma","html_url":"https://github.com/williampma","followers_url":"https://api.github.com/users/williampma/followers","following_url":"https://api.github.com/users/williampma/following{/other_user}","gists_url":"https://api.github.com/users/williampma/gists{/gist_id}","starred_url":"https://api.github.com/users/williampma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williampma/subscriptions","organizations_url":"https://api.github.com/users/williampma/orgs","repos_url":"https://api.github.com/users/williampma/repos","events_url":"https://api.github.com/users/williampma/events{/privacy}","received_events_url":"https://api.github.com/users/williampma/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/williampma/opencog","description":"A framework for integrated Artificial Intelligence & Artificial General Intelligence (AGI)","fork":true,"url":"https://api.github.com/repos/williampma/opencog","forks_url":"https://api.github.com/repos/williampma/opencog/forks","keys_url":"https://api.github.com/repos/williampma/opencog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/williampma/opencog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/williampma/opencog/teams","hooks_url":"https://api.github.com/repos/williampma/opencog/hooks","issue_events_url":"https://api.github.com/repos/williampma/opencog/issues/events{/number}","events_url":"https://api.github.com/repos/williampma/opencog/events","assignees_url":"https://api.github.com/repos/williampma/opencog/assignees{/user}","branches_url":"https://api.github.com/repos/williampma/opencog/branches{/branch}","tags_url":"https://api.github.com/repos/williampma/opencog/tags","blobs_url":"https://api.github.com/repos/williampma/opencog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/williampma/opencog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/williampma/opencog/git/refs{/sha}","trees_url":"https://api.github.com/repos/williampma/opencog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/williampma/opencog/statuses/{sha}","languages_url":"https://api.github.com/repos/williampma/opencog/languages","stargazers_url":"https://api.github.com/repos/williampma/opencog/stargazers","contributors_url":"https://api.github.com/repos/williampma/opencog/contributors","subscribers_url":"https://api.github.com/repos/williampma/opencog/subscribers","subscription_url":"https://api.github.com/repos/williampma/opencog/subscription","commits_url":"https://api.github.com/repos/williampma/opencog/commits{/sha}","git_commits_url":"https://api.github.com/repos/williampma/opencog/git/commits{/sha}","comments_url":"https://api.github.com/repos/williampma/opencog/comments{/number}","issue_comment_url":"https://api.github.com/repos/williampma/opencog/issues/comments{/number}","contents_url":"https://api.github.com/repos/williampma/opencog/contents/{+path}","compare_url":"https://api.github.com/repos/williampma/opencog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/williampma/opencog/merges","archive_url":"https://api.github.com/repos/williampma/opencog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/williampma/opencog/downloads","issues_url":"https://api.github.com/repos/williampma/opencog/issues{/number}","pulls_url":"https://api.github.com/repos/williampma/opencog/pulls{/number}","milestones_url":"https://api.github.com/repos/williampma/opencog/milestones{/number}","notifications_url":"https://api.github.com/repos/williampma/opencog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/williampma/opencog/labels{/name}","releases_url":"https://api.github.com/repos/williampma/opencog/releases{/id}","created_at":"2014-04-15T08:10:05Z","updated_at":"2015-03-31T02:53:33Z","pushed_at":"2015-04-15T04:38:23Z","git_url":"git://github.com/williampma/opencog.git","ssh_url":"git@github.com:williampma/opencog.git","clone_url":"https://github.com/williampma/opencog.git","svn_url":"https://github.com/williampma/opencog","homepage":"http://wiki.opencog.org/w/Development","size":138430,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"opencog:master","ref":"master","sha":"ff8646a9372daef68da69e843719f1b72fdc1659","user":{"login":"opencog","id":2109913,"avatar_url":"https://avatars.githubusercontent.com/u/2109913?v=3","gravatar_id":"","url":"https://api.github.com/users/opencog","html_url":"https://github.com/opencog","followers_url":"https://api.github.com/users/opencog/followers","following_url":"https://api.github.com/users/opencog/following{/other_user}","gists_url":"https://api.github.com/users/opencog/gists{/gist_id}","starred_url":"https://api.github.com/users/opencog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencog/subscriptions","organizations_url":"https://api.github.com/users/opencog/orgs","repos_url":"https://api.github.com/users/opencog/repos","events_url":"https://api.github.com/users/opencog/events{/privacy}","received_events_url":"https://api.github.com/users/opencog/received_events","type":"Organization","site_admin":false},"repo":{"id":6365343,"name":"opencog","full_name":"opencog/opencog","owner":{"login":"opencog","id":2109913,"avatar_url":"https://avatars.githubusercontent.com/u/2109913?v=3","gravatar_id":"","url":"https://api.github.com/users/opencog","html_url":"https://github.com/opencog","followers_url":"https://api.github.com/users/opencog/followers","following_url":"https://api.github.com/users/opencog/following{/other_user}","gists_url":"https://api.github.com/users/opencog/gists{/gist_id}","starred_url":"https://api.github.com/users/opencog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencog/subscriptions","organizations_url":"https://api.github.com/users/opencog/orgs","repos_url":"https://api.github.com/users/opencog/repos","events_url":"https://api.github.com/users/opencog/events{/privacy}","received_events_url":"https://api.github.com/users/opencog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencog/opencog","description":"A framework for integrated Artificial Intelligence & Artificial General Intelligence (AGI)","fork":false,"url":"https://api.github.com/repos/opencog/opencog","forks_url":"https://api.github.com/repos/opencog/opencog/forks","keys_url":"https://api.github.com/repos/opencog/opencog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencog/opencog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencog/opencog/teams","hooks_url":"https://api.github.com/repos/opencog/opencog/hooks","issue_events_url":"https://api.github.com/repos/opencog/opencog/issues/events{/number}","events_url":"https://api.github.com/repos/opencog/opencog/events","assignees_url":"https://api.github.com/repos/opencog/opencog/assignees{/user}","branches_url":"https://api.github.com/repos/opencog/opencog/branches{/branch}","tags_url":"https://api.github.com/repos/opencog/opencog/tags","blobs_url":"https://api.github.com/repos/opencog/opencog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencog/opencog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencog/opencog/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencog/opencog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencog/opencog/statuses/{sha}","languages_url":"https://api.github.com/repos/opencog/opencog/languages","stargazers_url":"https://api.github.com/repos/opencog/opencog/stargazers","contributors_url":"https://api.github.com/repos/opencog/opencog/contributors","subscribers_url":"https://api.github.com/repos/opencog/opencog/subscribers","subscription_url":"https://api.github.com/repos/opencog/opencog/subscription","commits_url":"https://api.github.com/repos/opencog/opencog/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencog/opencog/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencog/opencog/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencog/opencog/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencog/opencog/contents/{+path}","compare_url":"https://api.github.com/repos/opencog/opencog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencog/opencog/merges","archive_url":"https://api.github.com/repos/opencog/opencog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencog/opencog/downloads","issues_url":"https://api.github.com/repos/opencog/opencog/issues{/number}","pulls_url":"https://api.github.com/repos/opencog/opencog/pulls{/number}","milestones_url":"https://api.github.com/repos/opencog/opencog/milestones{/number}","notifications_url":"https://api.github.com/repos/opencog/opencog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencog/opencog/labels{/name}","releases_url":"https://api.github.com/repos/opencog/opencog/releases{/id}","created_at":"2012-10-24T06:10:15Z","updated_at":"2015-04-14T14:51:47Z","pushed_at":"2015-04-15T06:41:39Z","git_url":"git://github.com/opencog/opencog.git","ssh_url":"git@github.com:opencog/opencog.git","clone_url":"https://github.com/opencog/opencog.git","svn_url":"https://github.com/opencog/opencog","homepage":"http://wiki.opencog.org/w/Development","size":150066,"stargazers_count":556,"watchers_count":556,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":277,"mirror_url":null,"open_issues_count":90,"forks":277,"open_issues":90,"watchers":556,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opencog/opencog/pulls/1528"},"html":{"href":"https://github.com/opencog/opencog/pull/1528"},"issue":{"href":"https://api.github.com/repos/opencog/opencog/issues/1528"},"comments":{"href":"https://api.github.com/repos/opencog/opencog/issues/1528/comments"},"review_comments":{"href":"https://api.github.com/repos/opencog/opencog/pulls/1528/comments"},"review_comment":{"href":"https://api.github.com/repos/opencog/opencog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opencog/opencog/pulls/1528/commits"},"statuses":{"href":"https://api.github.com/repos/opencog/opencog/statuses/12866226a0bc233d8310e2015c3c5533dc1bb28f"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"ngeiswei","id":819225,"avatar_url":"https://avatars.githubusercontent.com/u/819225?v=3","gravatar_id":"","url":"https://api.github.com/users/ngeiswei","html_url":"https://github.com/ngeiswei","followers_url":"https://api.github.com/users/ngeiswei/followers","following_url":"https://api.github.com/users/ngeiswei/following{/other_user}","gists_url":"https://api.github.com/users/ngeiswei/gists{/gist_id}","starred_url":"https://api.github.com/users/ngeiswei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngeiswei/subscriptions","organizations_url":"https://api.github.com/users/ngeiswei/orgs","repos_url":"https://api.github.com/users/ngeiswei/repos","events_url":"https://api.github.com/users/ngeiswei/events{/privacy}","received_events_url":"https://api.github.com/users/ngeiswei/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":37,"additions":558,"deletions":618,"changed_files":11}}