Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random choice of kart / track doesn't seem to be uniformly random #5098

Closed
joyofdata opened this issue May 24, 2024 · 5 comments
Closed

Random choice of kart / track doesn't seem to be uniformly random #5098

joyofdata opened this issue May 24, 2024 · 5 comments
Labels
R: invalid / not a bug The reported behavior is intended, or this is not a bug report.

Comments

@joyofdata
Copy link

joyofdata commented May 24, 2024

I'm usually too lazy to choose a kart or track so I always use the random option. But I noticed that certain karts and tracks are rarely if ever chosen. It's very obvious if you use that feature regularly.

@kimden
Copy link
Contributor

kimden commented May 24, 2024

I can confirm that my subjective feeling is the same. I'm almost sure it is caused by rand() in RandomGenerator, as when I used RandomGenerator myself, it produces pretty strange probabilities, for example, while selecting one of three kart classes.

There was, however, a different implementation in that file before, so I guess there are reasons (which I don't know) why it's not in use now

@Alayan-stk-2
Copy link
Collaborator

I think that's just down to naive expectations of randomness not matching what real randomness looks like. Real randomness can have long stretches of some option being picked more than another even if on paper they have the same probability.

Here are the results of picking 6 times 243 karts with a set of 19 possible karts and looking at how many times each of the karts was picked in each series of 243.

There is some noise because, while based on 1458 kart picks, the number of data points is 114 (6*19). But despite that, and despite the disturbance from the data points not being all independent from each other, it follows quite closely what you'd expect from true randomness.

Random_kart_pick

@Alayan-stk-2 Alayan-stk-2 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 5, 2024
@Alayan-stk-2 Alayan-stk-2 added the R: invalid / not a bug The reported behavior is intended, or this is not a bug report. label Jul 5, 2024
@joyofdata
Copy link
Author

joyofdata commented Jul 5, 2024

sorry, but this is not just nonsense it is downright embarrassing ... what you computed is a binomial distribution over a set of N=23 items. that has nothing todo with simulating choice of karts. if you repeatedly uniformly randomly choose karts then the distribution will approach a bar chart where all bars are of same height ... simply speaking.

your tone also comes across as very arrogant, i must say. arrogance is never okay, but if it is counterbalanced by intelligence then usually it is at least excused or tolerated (to a point).

given that you seem to be heading this project I don't feel like spending any further time with it. from what i heard the development was already stalling for more than a year due to internal quarrels. i think i just got a taste of it.

good luck and bye

@qwertychouskie
Copy link
Contributor

I think that's just down to naive expectations of randomness not matching what real randomness looks like. Real randomness can have long stretches of some option being picked more than another even if on paper they have the same probability.

Here are the results of picking 6 times 243 karts with a set of 19 possible karts and looking at how many times each of the karts was picked in each series of 243.

There is some noise because, while based on 1458 kart picks, the number of data points is 114 (6*19). But despite that, and despite the disturbance from the data points not being all independent from each other, it follows quite closely what you'd expect from true randomness.

Random_kart_pick

I think the issue is that players are expecting "shuffle", while they get "random". While implementing a proper shuffle algorithm is more complex than just giving a mathematical random, in this case it's going to be the only way to provide a proper user experience. (iTunes learned this lesson like 20 years ago, it's practically became a case study at this point.)

IMHO this issue should be reopened (or a new one opened, either way is fine).

@Alayan-stk-2
Copy link
Collaborator

@qwertychouskie Having weighted pseudo-randomness is quite different from the randomness being used being deeply off. The user experience from biasing odds to reduce repetitions can be argued for, but you need to keep track of state in some way, which mean increased complication in the code. I'm not sold on it here, especially if the option advertises itself as random. Random kart and random track usage feels also rather marginal to me and in most situations easily corrected by manually picking what you think wasn't picked enough, and the UX listening to tunes is also quite different. I'd rather have an additional shuffle option than completely replace the random option.

While you are around, could you have a look at making a "display" options icon for the "cartoon" theme?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R: invalid / not a bug The reported behavior is intended, or this is not a bug report.
Projects
None yet
Development

No branches or pull requests

4 participants