numenta / nupic.core-legacy

Implementation of core NuPIC algorithms in C++ (under construction)
http://numenta.org
GNU Affero General Public License v3.0
272 stars 276 forks source link

Deterministic Algorithms #1451

Closed dkeeney closed 5 years ago

dkeeney commented 5 years ago

The Algorithm output for the HotGym example were not exactly the same between Linuix and Windows. The unit tests should be deterministic.

dkeeney commented 5 years ago

See Issue #194 In SpatialPooler.cpp, line 875 in inhibitColumnsGlobal_( ) the output of the nth_element( ) partial sort has the elements partitioned correctly but the exact order between Linux and Windows is slightly different. So when we truncate we just happen to get a different value for the 10th element. That difference propagates and eventually everything is different between Linux and Windows.

The fix is to change the sort compare function such that there will never be an equal result. The order is then explicitly defined.

dkeeney commented 5 years ago

Oh, darn....on the wrong repository again.