128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 11 Oct 2014 08:03 PM |
6, 5, 2, 1, 3, 4
3, 1, 6, 5, 2, 4
1, 4, 2, 3, 5, 6
3, 4, 2, 6, 5, 1
2, 1, 5, 3, 6, 4
5 results from my round randomizing, something seems off about it. |
|
|
| Report Abuse |
|
|
Haggie125
|
  |
| Joined: 02 Apr 2008 |
| Total Posts: 761 |
|
| |
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 11 Oct 2014 08:05 PM |
| you never get the same number twice in one set. |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 11 Oct 2014 08:06 PM |
you never get the same number twice in one set. I guess it's good for a Sudoku puzzle generator |
|
|
| Report Abuse |
|
|
Skemata
|
  |
| Joined: 10 Oct 2014 |
| Total Posts: 4 |
|
|
| 11 Oct 2014 08:06 PM |
If it makes you feel any better, all 6 rows of numbers contain the same digits.
I am a genius, huh? |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 11 Oct 2014 08:06 PM |
Dang, I even checked for a double post. Curse you, old pages!! |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 11 Oct 2014 08:06 PM |
@Max Its supposed to do that, sorry I should have mentioned it
I wish I had done it a sixth time The fours seem to be in the same place twice in a row before changing |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 11 Oct 2014 08:07 PM |
I noticed something with the 3's
3---- -3--- 3---- -3--- |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 11 Oct 2014 08:16 PM |
2, 4, 5, 1, 6, 3
2, 6, 4, 5, 1, 3
4, 1, 5, 6, 2, 3
5, 6, 1, 2, 3, 4
2, 1, 4, 6, 3, 5
1, 2, 5, 6, 4, 3
6, 2, 5, 3, 4, 1
5, 2, 3, 6, 4, 1
This is the method I'm using for making them random
local tab = {"1", "2", "3", "4", "5", "6"} function random() for x = 1, #tab, 1 do local n = math.random(x) tab[x], tab[n] = tab[n], tab[x] end end
for _ = 0, 9, 1 do random() print(table.concat(tab, ", ")) end |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2014 08:21 PM |
There will always be a pattern. Because you're using RNG.
Just FYI. |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 11 Oct 2014 08:24 PM |
What do you suggest doing? I've already seeded math.randomseed with tick() Should I just not worry about it? If I have more than 10 rounds I doubt anyone would notice or care |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2014 08:26 PM |
Don't worry about it.
Lua's RNG is a C-based call, and C uses a formula that generates numbers in a way that over a long period of time, all numbers will be selected the same number of times.
Law of large numbers FTW. |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
| |
|