{"action":"created","issue":{"url":"https://api.github.com/repos/Mindwerks/worldengine/issues/145","labels_url":"https://api.github.com/repos/Mindwerks/worldengine/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/Mindwerks/worldengine/issues/145/comments","events_url":"https://api.github.com/repos/Mindwerks/worldengine/issues/145/events","html_url":"https://github.com/Mindwerks/worldengine/issues/145","id":112522307,"number":145,"title":"random module gives varying output for different Python versions","user":{"login":"tcld","id":12257447,"avatar_url":"https://avatars.githubusercontent.com/u/12257447?v=3","gravatar_id":"","url":"https://api.github.com/users/tcld","html_url":"https://github.com/tcld","followers_url":"https://api.github.com/users/tcld/followers","following_url":"https://api.github.com/users/tcld/following{/other_user}","gists_url":"https://api.github.com/users/tcld/gists{/gist_id}","starred_url":"https://api.github.com/users/tcld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcld/subscriptions","organizations_url":"https://api.github.com/users/tcld/orgs","repos_url":"https://api.github.com/users/tcld/repos","events_url":"https://api.github.com/users/tcld/events{/privacy}","received_events_url":"https://api.github.com/users/tcld/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-10-21T06:41:30Z","updated_at":"2015-10-21T07:17:39Z","closed_at":null,"body":"As stated here https://github.com/Mindwerks/worldengine/pull/138#issuecomment-149794285 there seems to be a change in the random number generator between Python 2 and Python 3.\r\n\r\nStarting from the same seed, the outputs between the two versions differ.\r\n```\r\nPython 3.4.3 (default, Oct 14 2015, 20:28:29) \r\n[GCC 4.8.4] on linux\r\n>>> import random\r\n>>> random.seed(0)\r\n>>> for x in range(0, 10):\r\n...     random.randint(0, 1000000)\r\n885440\r\n403958\r\n794772\r\n933488\r\n441001\r\n42450\r\n271493\r\n536110\r\n509532\r\n424604\r\n```\r\n\r\n```\r\nPython 2.7.6 (default, Jun 22 2015, 17:58:13) \r\n[GCC 4.8.2] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import random\r\n>>> random.seed(0)\r\n>>> for x in range(0, 10):\r\n...     random.randint(0, 1000000)\r\n844422\r\n757955\r\n420572\r\n258917\r\n511275\r\n404934\r\n783799\r\n303313\r\n476597\r\n583382\r\n```\r\n\r\nThis might be due to the different versions of gcc that have been used to compile the Python versions (I don't know how to test that right now) but since the maps here https://github.com/Mindwerks/worldengine/pull/138#issuecomment-149794285 are extremely similar I would expect that platec isn't influenced by the whole problem."},"comment":{"url":"https://api.github.com/repos/Mindwerks/worldengine/issues/comments/149801955","html_url":"https://github.com/Mindwerks/worldengine/issues/145#issuecomment-149801955","issue_url":"https://api.github.com/repos/Mindwerks/worldengine/issues/145","id":149801955,"user":{"login":"psi29a","id":1122069,"avatar_url":"https://avatars.githubusercontent.com/u/1122069?v=3","gravatar_id":"","url":"https://api.github.com/users/psi29a","html_url":"https://github.com/psi29a","followers_url":"https://api.github.com/users/psi29a/followers","following_url":"https://api.github.com/users/psi29a/following{/other_user}","gists_url":"https://api.github.com/users/psi29a/gists{/gist_id}","starred_url":"https://api.github.com/users/psi29a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psi29a/subscriptions","organizations_url":"https://api.github.com/users/psi29a/orgs","repos_url":"https://api.github.com/users/psi29a/repos","events_url":"https://api.github.com/users/psi29a/events{/privacy}","received_events_url":"https://api.github.com/users/psi29a/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T07:17:39Z","updated_at":"2015-10-21T07:17:39Z","body":"And if you did the same thing twice in the same Python environment?"}}