{"action":"created","issue":{"url":"https://api.github.com/repos/opencog/atomspace/issues/324","labels_url":"https://api.github.com/repos/opencog/atomspace/issues/324/labels{/name}","comments_url":"https://api.github.com/repos/opencog/atomspace/issues/324/comments","events_url":"https://api.github.com/repos/opencog/atomspace/issues/324/events","html_url":"https://github.com/opencog/atomspace/pull/324","id":107678962,"number":324,"title":"Backward Chainer: Temporary even more steps for the unit test","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},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-09-22T09:46:19Z","updated_at":"2015-10-05T18:45:56Z","closed_at":"2015-09-22T10:27:45Z","pull_request":{"url":"https://api.github.com/repos/opencog/atomspace/pulls/324","html_url":"https://github.com/opencog/atomspace/pull/324","diff_url":"https://github.com/opencog/atomspace/pull/324.diff","patch_url":"https://github.com/opencog/atomspace/pull/324.patch"},"body":"Seems like the probability of fail is not low enough.\r\n\r\nI have double checked again what could cause the unit test to be undeterministic, and it is the same as my previous conclusion.  Basically the usage of AtomPtr address ordering is a problem, since the address change between runs.\r\n\r\nThe first divergence between a passing test and a failing test is\r\n```\r\n[2015-09-21 07:12:59:223] [DEBUG] [BackwardChainer] Reverse grounded as (AndLink (stv 1.000000 0.000000)\r\n  (InheritanceLink (stv 1.000000 0.000000)\r\n    (VariableNode \"$A-pln-rule-deduction\") ; [1465][95]\r\n    (VariableNode \"$B-pln-rule-deduction\") ; [1467][95]\r\n  ) ; [1472][95]\r\n  (InheritanceLink (stv 1.000000 0.000000)\r\n    (VariableNode \"$B-pln-rule-deduction\") ; [1467][95]\r\n    (ConceptNode \"criminal\") ; [52][1]\r\n  ) ; [1523][95]\r\n  (NotLink (stv 1.000000 0.000000)\r\n    (EqualLink (stv 1.000000 0.000000)\r\n      (VariableNode \"$A-pln-rule-deduction\") ; [1465][95]\r\n      (ConceptNode \"criminal\") ; [52][1]\r\n    ) ; [1524][95]\r\n  ) ; [1525][95]\r\n) ; [1526][95]\r\n```\r\nvs\r\n```\r\n[2015-09-21 07:12:48:417] [DEBUG] [BackwardChainer] Reverse grounded as (AndLink (stv 1.000000 0.000000)\r\n  (InheritanceLink (stv 1.000000 0.000000)\r\n    (VariableNode \"$A-pln-rule-deduction\") ; [1465][95]\r\n    (VariableNode \"$B-pln-rule-deduction\") ; [1467][95]\r\n  ) ; [1472][95]\r\n  (NotLink (stv 1.000000 0.000000)\r\n    (EqualLink (stv 1.000000 0.000000)\r\n      (VariableNode \"$A-pln-rule-deduction\") ; [1465][95]\r\n      (ConceptNode \"criminal\") ; [52][1]\r\n    ) ; [1523][95]\r\n  ) ; [1524][95]\r\n  (InheritanceLink (stv 1.000000 0.000000)\r\n    (VariableNode \"$B-pln-rule-deduction\") ; [1467][95]\r\n    (ConceptNode \"criminal\") ; [52][1]\r\n  ) ; [1525][95]\r\n) ; [1526][95]\r\n```\r\n\r\nBasically, the same atom get added and assign different UUID & ordering (since unordered link's is resorted, and in this case by AtomPtr address since the AndLink was not in the atomspace).  AtomPtr usage is also in the different index inside AtomTable, which could also affect traversal ordering of Pattern Matcher.\r\n\r\nPerhaps there's some way to restrict the unit test to be ran within the same virtual address, or force the OS to always assign the same address...  not sure.\r\n"},"comment":{"url":"https://api.github.com/repos/opencog/atomspace/issues/comments/145628630","html_url":"https://github.com/opencog/atomspace/pull/324#issuecomment-145628630","issue_url":"https://api.github.com/repos/opencog/atomspace/issues/324","id":145628630,"user":{"login":"linas","id":94368,"avatar_url":"https://avatars.githubusercontent.com/u/94368?v=3","gravatar_id":"","url":"https://api.github.com/users/linas","html_url":"https://github.com/linas","followers_url":"https://api.github.com/users/linas/followers","following_url":"https://api.github.com/users/linas/following{/other_user}","gists_url":"https://api.github.com/users/linas/gists{/gist_id}","starred_url":"https://api.github.com/users/linas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linas/subscriptions","organizations_url":"https://api.github.com/users/linas/orgs","repos_url":"https://api.github.com/users/linas/repos","events_url":"https://api.github.com/users/linas/events{/privacy}","received_events_url":"https://api.github.com/users/linas/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T18:45:56Z","updated_at":"2015-10-05T18:45:56Z","body":"Worth a try, I guess.  The atomspace has several indexes that use a less-than ordering for atoms that are probably very performance-sensitive.  You can use the `/opencog/benchmark/atomspace_bm` tool to measure before & after performance.\r\n\r\nWhile designing the 'protoatom' (unrelated conversation, I discovered that a minor change to the atom less-than compare cut link insertion performance in half! Now, Ben really really wants this, but that's a big hit. "}}