{"action":"created","issue":{"url":"https://api.github.com/repos/pioneerspacesim/pioneer/issues/3485","labels_url":"https://api.github.com/repos/pioneerspacesim/pioneer/issues/3485/labels{/name}","comments_url":"https://api.github.com/repos/pioneerspacesim/pioneer/issues/3485/comments","events_url":"https://api.github.com/repos/pioneerspacesim/pioneer/issues/3485/events","html_url":"https://github.com/pioneerspacesim/pioneer/pull/3485","id":110325872,"number":3485,"title":"Use PCG for random number generation","user":{"login":"fluffyfreak","id":825083,"avatar_url":"https://avatars.githubusercontent.com/u/825083?v=3","gravatar_id":"","url":"https://api.github.com/users/fluffyfreak","html_url":"https://github.com/fluffyfreak","followers_url":"https://api.github.com/users/fluffyfreak/followers","following_url":"https://api.github.com/users/fluffyfreak/following{/other_user}","gists_url":"https://api.github.com/users/fluffyfreak/gists{/gist_id}","starred_url":"https://api.github.com/users/fluffyfreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluffyfreak/subscriptions","organizations_url":"https://api.github.com/users/fluffyfreak/orgs","repos_url":"https://api.github.com/users/fluffyfreak/repos","events_url":"https://api.github.com/users/fluffyfreak/events{/privacy}","received_events_url":"https://api.github.com/users/fluffyfreak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pioneerspacesim/pioneer/labels/in%20progress","name":"in progress","color":"ededed"},{"url":"https://api.github.com/repos/pioneerspacesim/pioneer/labels/Re-assessment%20requested","name":"Re-assessment requested","color":"DDDDDD"},{"url":"https://api.github.com/repos/pioneerspacesim/pioneer/labels/Savegame%20bump","name":"Savegame bump","color":"ff7fff"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-10-07T21:52:33Z","updated_at":"2015-10-22T14:29:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pioneerspacesim/pioneer/pulls/3485","html_url":"https://github.com/pioneerspacesim/pioneer/pull/3485","diff_url":"https://github.com/pioneerspacesim/pioneer/pull/3485.diff","patch_url":"https://github.com/pioneerspacesim/pioneer/pull/3485.patch"},"body":"# Description:\r\nSince I first heard about [PCG](http://www.pcg-random.org/) I have been meaning to give it a try with Pioneer. The maths for understanding exactly how robust this is are a bit beyond me in some ways however it is supposed to be a very fast and very robust random number generator with a very long period and many other fine qualities.\r\n\r\n# Motivation:\r\nWe used to use a Mersenne Twister RNG but it was deemed \"too slow\" at some point (#1893) and replaced with a faster but 'less secure' XOR based RNG along with the comment: `As an xorshift generator the worst thing about it is it gets stuck on zero input`.\r\n\r\nRecently we've had a lot of comments about objects, seemingly along the sector 0-axis, not being generated correctly, issues with the galaxy being regenerated incorrectly, and the startling similarity between characters at stations. \r\n\r\nSo I picked up the `pcg-cpp-0.98` implementation, fixed the VS2015 issues and whipped this up to get us started.\r\n\r\n# Results:\r\nIt still works.\r\nI don't notice any speed difference personally but I would bet that it's slower than the XOR rng.\r\n\r\n# Todo:\r\nI haven't finished yet, although the actual code is in and the Random class uses it and works I haven't done the following:\r\n- [x] Fix Linux build\r\n- [x] Test\r\n- [x] Bump save-game version\r\n\r\nAndy"},"comment":{"url":"https://api.github.com/repos/pioneerspacesim/pioneer/issues/comments/150241984","html_url":"https://github.com/pioneerspacesim/pioneer/pull/3485#issuecomment-150241984","issue_url":"https://api.github.com/repos/pioneerspacesim/pioneer/issues/3485","id":150241984,"user":{"login":"impaktor","id":619390,"avatar_url":"https://avatars.githubusercontent.com/u/619390?v=3","gravatar_id":"","url":"https://api.github.com/users/impaktor","html_url":"https://github.com/impaktor","followers_url":"https://api.github.com/users/impaktor/followers","following_url":"https://api.github.com/users/impaktor/following{/other_user}","gists_url":"https://api.github.com/users/impaktor/gists{/gist_id}","starred_url":"https://api.github.com/users/impaktor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/impaktor/subscriptions","organizations_url":"https://api.github.com/users/impaktor/orgs","repos_url":"https://api.github.com/users/impaktor/repos","events_url":"https://api.github.com/users/impaktor/events{/privacy}","received_events_url":"https://api.github.com/users/impaktor/received_events","type":"User","site_admin":false},"created_at":"2015-10-22T14:29:56Z","updated_at":"2015-10-22T14:29:56Z","body":"Also, does this require any testing on Mac?"}}