darthbator

What is the value in "Randomness"

Recommended Posts

And as said, random(0, 100) < 80 ensures the 80 % probability over time.

Not over time but at any instance in time. It will always give an 80% chance. Measuring it over many rolls would only prove that each individual roll has an 80% probability.

This is kind of how randomness is handled in some accounting programs. When you're left with a fraction of a cent, if you just randomly distribute the extra income to one account, then you may be favoring a single party more than others. This becomes a big deal when you have payments split between monthly payments, and broken up amongst individual items. It's far from sexy, but the unallocated income it could generate is enormous. See Superman or Office Space.

Really? In my experience most accounting software simply uses high precision decimals for calculations and then does half-even rounding on the results to minimize cumulative error when dealing with actual credits and debits. Some more credible examples than movies would be cool if you have any, I used to work on this stuff.

I sort of agree with both of you, and don't have a solid opinion on this question, which frustrates me because I think it's a really interesting one. Both in terms of how and why we distort probabilities in our own minds, and in terms of what responsibility, if any, creators of cultural artefacts have to make their works beneficial to society. When creating a piece of entertainment, is entertainment the only goal? Clearly for some it isn't, but do creators have an obligation to educate or persuade or promote consideration by way of their works or is it simply a bonus? It's a question I've been asking myself quite a bit over time in regards to the games industry, but it's also come up recently here in particular as we've been discussing which kinds of books are worth reading for the book club and so on.

As for the other part, why we skew chances and whether it's actually valuable to do so... I think I see some of my day disappearing into research on this.

I'm sorry I didn't respond to you before, since this is exactly what I was getting at and it would be nice to move back to this question. I'd say that art is progressive and the only reason most artists create art is to benefit society, and if that isn't true then art is certainly measured in terms of its cultural impact, which implies some societal benefit. I don't think creators have any obligation educate; they do it by default or they wouldn't be creators.

Not sure how important getting the probabilities right fits into that, but I guess getting them wrong sacrifices some of the integrity of the work in order to widen its reach. Video Games are a business!

Not really. "Random" means something different in popular parlance than in technical actuality. If you put your iTunes on "shuffle", you expect to hear a different song from a different artist every time. That's "random". Except it's definitely not random, in actuality. True randomness would have multiple songs from the same album coming up, maybe in sequential order, or even the same song playing four or five times in a row, on rare occasion. This would prove itself to be random if you listened to infinite songs, but you don't listen to infinite songs. You listen to a dozen or so and then turn it off, so that dozen damn well better be completely different, right?

Good job it's called "shuffle" and not "random", then, eh?

Share this post


Link to post
Share on other sites

Computers technically can't produce TRULY RANDOM numbers because they're logical series of ones and zeroes that can't create anything purely from imagination. They typically run a variable you'd call a RANDOM SEED through a mathematical function, and then constantly add to that seed so the same result doesn't come up every time. It's technically predictable if you know the maths of how it works.

They use the current time and date as the random seed- you can look this stuff up, I'm not a smart coder or anything, I just heard this once and was surprised.

...just throwin it out there, seemed relevant.

EDIT-- WAIT NO, actually, this is a dark road. I changed my mind, let's not talk about what random means and just get back to game design.

Share this post


Link to post
Share on other sites

The discussion is about the applications of random numbers, not the quality of the source. We can assume they're good enough for computer and video games.

Share this post


Link to post
Share on other sites

Not over time but at any instance in time. It will always give an 80% chance. Measuring it over many rolls would only prove that each individual roll has an 80% probability.

I agree with this, but there's a difference between the probability of something happening and the actual outcome. The probability of getting double sixes is 1/36, but rolling a pair of dice 36 times doesn't guarantee you'll get it, right? Similarly, doing (rand()%100) < 80 doesn't guarantee 80 hits and 20 misses.

What I proposed wouldn't guarantee it either, but it would tune the odds to make the 80 hits/20 misses outcome more likely.

So does that mean that the next 10 are going to be guaranteed hits in order to produce 12/15=80%?

Well, that would depend on the algorithm. But personally, no, I wouldn't do that. Tweaking the algorithm to feel natural (enough) is key, obviously.

Yeah. I'd think that a system where the chance of hitting (secretly) depended on the past events would be even more confusing to people than the correct way of calculating probabilities.

I don't think it would be any more (or less) confusing than a straight rand()%100 number generator. RNGs are perceived as black boxes anyway. Like Forbin said earlier, players will call foul on even a totally fair RNG.

I'm sorry I didn't respond to you before, since this is exactly what I was getting at and it would be nice to move back to this question. I'd say that art is progressive and the only reason most artists create art is to benefit society, and if that isn't true then art is certainly measured in terms of its cultural impact, which implies some societal benefit. I don't think creators have any obligation educate; they do it by default or they wouldn't be creators.

Not sure how important getting the probabilities right fits into that, but I guess getting them wrong sacrifices some of the integrity of the work in order to widen its reach. Video Games are a business!

Depends on what the art is trying to say though, doesn't it? If a movie is able to convey the worthy message of the importance of brushing your teeth (to use a perfectly reasonable example), but also has implausibly exploding cars, and a protagonist who survives far too many bullet wounds, does that take away from the message? I think art tends to do that, simplify or straight-up fudge some aspects of reality, to bring other aspects into focus.

In my mind, the reality of probabilities isn't the point of a strategy game. It's the part I'd be willing to fudge.

However, there's no reason why one couldn't make a game where the point/message/takeaway is focused on the perception vs. reality of randomness and probabilities, I'm not sure how one would go about doing that, but it sure would be interesting! :tup:

Share this post


Link to post
Share on other sites

I think you'd have to be very careful about how you'd tune the algorithm, otherwise people could exploit it once they discover the pattern. Tweaking the pattern to make it appear more like people "expect" means the system needs to have memory, ie it remembers the last few values and adjusts based on those. Going back to the Civ example mentioned earlier, I believe one of the scenarios discussed on the cast involved the system increasing your odds of winning the next battle after you lost one in order to produce a more "accurate" percentage. The idea was brought up that shrewd players would purposely lose unimportant battles to increase their chances of winning an important one.

Share this post


Link to post
Share on other sites

Well, that would depend on the algorithm. But personally, no, I wouldn't do that. Tweaking the algorithm to feel natural (enough) is key, obviously.

SecretAsianMan's point is very valid. The series of random numbers you used as an example, would mean that the probability of hitting would have to be extremely high for the next few turns, to get anywhere near the 80 % chance of hitting. I also think the adoptive probability system you are suggesting is seriously limited in its usability, because in most games the probability doesn't stay constant anyway: soldiers and enemies move in xcom, the player loses troops in Civilization, etc. In that case, would the adjusted probability be a property of the troop or the (short-lived) situation?

Share this post


Link to post
Share on other sites

It would have to be a property of the RNG without reference to the probability. By that I mean that the RNG tracks what numbers it has been giving, and if there have been more high numbers than expected, it would start giving somewhat lower ones for a while.

Share this post


Link to post
Share on other sites

It would have to be a property of the RNG without reference to the probability. By that I mean that the RNG tracks what numbers it has been giving, and if there have been more high numbers than expected, it would start giving somewhat lower ones for a while.

That sounds like the same thing to me. If you're changing the RNG to give different numbers, then you are changing the probability. Tracking numbers within the RNG then tweaking the output would have the same effect as tracking numbers within the algorithm and tweaking the acceptance criteria.

Share this post


Link to post
Share on other sites
Really? In my experience most accounting software simply uses high precision decimals for calculations and then does half-even rounding on the results to minimize cumulative error when dealing with actual credits and debits. Some more credible examples than movies would be cool if you have any, I used to work on this stuff.
Yeah I've worked for a few years for an insurance brokerage company. One classic example, is that they were handling an incredibly large company that did flights all over the world, including supply runs into Afghanistan and other active combat areas. Their bill was astronomical, and couldn't be held by a single carrier, so many different companies carried the risk, and the split was much more complicated than even amounts amongst all parties. This was compounded by the fact that the airline was paying it's bill in 24 installments a year, and worst of all split everything down to a policy for each individual aircraft they had running.

Splitting the money up even with 8 decimal points of precision on the penny ended up with unallocated cash that would block millions from being invoiced each month. You can't just keep adding extra precision because things are subject to binary precision loss, and unless the lines for AR and AP were added in the proper order the financial software would often complain as the numbers didn't total 0. There are ways to avoid having to deal with that much, but at some point you have to pick a precision and when a client deals with millions of dollars constantly, it's not long before you either end up with a big pile of unallocated cash, or you end up with a single party benefiting the most. So the system was built with random rounding algorithms that tracked unbalanced allocation over time and corrected it so that no single party got an unfair amount of money.

Share this post


Link to post
Share on other sites

Also for some reason the term RNG really bugs me. It gives such weight and seems to imply complexity. I feel like it's used a lot by people that project fate or conspiracy to random systems. Like it's an entity for the players to worship or hate.

Share this post


Link to post
Share on other sites

Yeah I've worked for a few years for an insurance brokerage company. One classic example, is that they were handling an incredibly large company that did flights all over the world, including supply runs into Afghanistan and other active combat areas. Their bill was astronomical, and couldn't be held by a single carrier, so many different companies carried the risk, and the split was much more complicated than even amounts amongst all parties. This was compounded by the fact that the airline was paying it's bill in 24 installments a year, and worst of all split everything down to a policy for each individual aircraft they had running.

Splitting the money up even with 8 decimal points of precision on the penny ended up with unallocated cash that would block millions from being invoiced each month. You can't just keep adding extra precision because things are subject to binary precision loss, and unless the lines for AR and AP were added in the proper order the financial software would often complain as the numbers didn't total 0. There are ways to avoid having to deal with that much, but at some point you have to pick a precision and when a client deals with millions of dollars constantly, it's not long before you either end up with a big pile of unallocated cash, or you end up with a single party benefiting the most. So the system was built with random rounding algorithms that tracked unbalanced allocation over time and corrected it so that no single party got an unfair amount of money.

This is a great post :tup:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now