• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Grain

Digits of Pi

30 posts in this topic

So what have you proven by counting something completely different?

 

This code tests whether there is a bullet at all. Fair enough. No bullet, no shot, sure thing.

Then it tests whether the bullet is in the chamber 5 (index zero based). Fine. Except if it's not, then someone blew out his brain already. The premise was that you arrive at the sixth chamber without someone having blown out his brain. So you are "proving" me wrong by proving a completely different premise.

 

Having arrived at chamber no. 6 (or rather no. 5, with a zero-based index like in the code) without someone blowing out his brain means exactly one thing, no more and no less, and no matter what mathematics you apply:

 

If there is a bullet (which is 50% likely) then it is necessarily in this chamber (100% chance). There is no other way, since all other chambers have been tested (i.e. we have proof that the bullet isn't there). You do not have a 7th chamber where you could have put the bullet. It's irrelevant from which side you try to look at it, or what mathematical trick you try. There simply is no other chamber left.

 

Of course, that is only true if you don't account for Heisenberg bullets which change the chamber they're in as soon as you look at them... smile.png

Edited by samoth
0

Share this post


Link to post
Share on other sites

The problem asked what the probability is that the sixth chamber contains a bullet given that the first five didn't. That is exactly what Álvaro's code counts: if there is a bullet in one of the first five chambers, then there's nothing to count because the problem didn't ask about that situation.

Edited by Brother Bob
1

Share this post


Link to post
Share on other sites

What is the probability that if we shave all the heads of all women in the world and count the number of hairs removed for each person, 2 or more had exactly the same number of hairs? I say women since there are negligible numbers of completely bald women, and we aren't going to count 0 as a valid number of hairs. Until after our little experiment of course ;)

Edited by Paradigm Shifter
0

Share this post


Link to post
Share on other sites

Output:

Brains blown out: 834503
Brains not blown out: 4998343
Things did not go as described in the problem: 4167154
Frequency of brains blown out given that things did go as described in the problem: 0.14307

 

Nice demo.  My method was to substitute the problem for an equivalent one that's easier to reason about:

 

Suppose there are two guns with six barrels each, and a bullet is put into a randomly chosen barrel of one of the guns.  You then play Russian Roulette with just one of these guns, again at random.

 

This is equivalent to the original problem because there is still a 50:50 chance that you're playing with a loaded gun and the location of the bullet if present is still random and fair.  However the intuition is now that there are 12 equally likely places that the bullet can be (2 guns x 6 barrels).  Having ruled out five of them (the barrels already discharged) we have seven remaining locations where the bullet could be, no information about which of these is more likely, hence a 1 in 7 chance of blowing our brains out.

 

That's another good example of mathematics being unreal. The chance of killing yourself in Russian Roulette is known to be considerably less than 1/6 with the first shot.

Why? Because the gun doesn't care that you say it's a 1/6 chance, but gravity makes sure that most of the time the loaded chamber stops at the bottom.

Insofar, the person getting the 3rd shot in row has by far the highest chance of blowing their brain out, if there's a bullet in the gun.

 

That's interesting, though in this case I think such a practical consideration would further improve your chances on the 6th shot (better than 1 in 7) as it's near the top again.  Another practical consideration is that one could possibly detect the presence or otherwise of the bullet by it's weight.

1

Share this post


Link to post
Share on other sites

The problem asked what the probability is that the sixth chamber contains a bullet given that the first five didn't. That is exactly what Álvaro's code counts: if there is a bullet in one of the first five chambers, then there's nothing to count because the problem didn't ask about that situation.

 

No. And here is the no-science type's explanation why:

 

The code first checks whether there is a bullet in the gun at all (50% chance). If there isn't one, you cannot blow out your brain. Quite so.

 

But now, in the "there is a bullet" branch comes the fallacy, the wrong assumption. The code now determines which chamber the bullet is in. There are 6 chambers, and the bullet could be in any of them, right? Wrong.

 

We have already pulled the trigger 5 times, and nothing has happened. There are only six chambers, it is known that there is a bullet, and it has been proven that the first 5 chambers are empty. The bullet can therefore only be in one place, there is no way it could be anywhere else.

The likelihood is 1/1, not 1/6. Proof by intimidation (Bayes theorem) does not change the fact that the bullet can only be in one location, even if the other guy is a no-science type like me.

 

Assuming the bullet could be in any different location simply defies reality.

 

Together with the 50% chance of a bullet being there at all, the 100% chance of having it in your chamber if there is one gives you a 50% overall chance. No need for complicated proofs or experiments.

 

Which is what I was saying: Everything with a grain of salt. Mathematics are nice, but they are not necessarily real (or applicable) because they often base on wrong assumptions or ignore important details of reality. As such, they are awesome for mathematical problems where the assumptions hold (see birthday paradox as an example) but they are not necessarily awesome for real stuff.

0

Share this post


Link to post
Share on other sites

Do you believe Bayes' Theorem is correct? It's not controversial in probability, and is easy to prove. The gun not firing in the first 5 shots is evidence against there being a bullet having been loaded in the gun, that accounts for something?

 

If the gun has 1,000,000 barrels and you fire it 999,999 times and there is no bullet what is the chance the next shot has a bullet? The same? What happens as you take the limit to infinity?

 

My number of hairs question was that the probability is 1 by the way, even if we assume max number of hairs on head is 10 million (average under 200 thousand), since there are more women than that if we give them a piece of paper with their number written on it and ask them to file them we find at least 1 file with more than one woman, this is the pigeon hole principle.

Edited by Paradigm Shifter
0

Share this post


Link to post
Share on other sites

Together with the 50% chance of a bullet being there at all, the 100% chance of having it in your chamber if there is one gives you a 50% overall chance. No need for complicated proofs or experiments.

 

No, that is a fallacy, and one the paradox is designed to point out. Think about it, if the gun is empty then there is a much higher likelihood that both of you will survive the first five chambers (read: if you played many such games, where you and your opponent lived to the last chamber, then you will see the gun is empty more often than it is loaded - that is kind of the definition of probability). And so conversely, if you survived the first five chambers, then there is a higher probability the gun is empty than it is loaded. That probability turns out to be 6/7 by the proofs given above (so you die 1 out of 7 times) but that argument is enough to "intuitively" show it can't be 50%.

 

If you want, you can try out the problem "in real life" (with appropriate safety measures taken, please) and you will see that if you follow the problem statement carefully, the answer will come out at 1/7, not 1/2 like you say. It's not the mathematics that are wrong, it's your understanding of what the problem is saying and when it applies which is. That's why it's called a paradox, it's supposed to pick your brains. Don't take it personally, you're not the first (and won't be the last) to get all confused over things like this.

2

Share this post


Link to post
Share on other sites
Every time the trigger is pulled and the bullet is not there the hypothesis that there is no bullet should gain some weight. Bayes's theorem is not an attempt at intimidation: It's just the formula that allows you to quantify this effect. And really, this is a great opportunity to learn about it, because if you can solve this problem by an argument like Geoffrey's, you probably don't need to even remember Bayes's formula: You can deduce it when you need it.

A friend of mine proposed a variation that might help some people think about this problem. Imagine we modify the game so that after pulling the trigger we spin the barrel, then pass gun to the other player. So instead of sampling the chambers sequentially, we pick a random chamber every time. The first time someone pulls the trigger, the probability of it going off is 1/12. Let's say it does not go off. Is it 1/12 for the next attempt? We actually do this 1,000,000 times and we haven't found a bullet yet. Do you still think the probability of it firing is 1/12 at the 1,000,001st attempt? Shouldn't you start suspecting at some point that it is more likely that there is no bullet, or otherwise you probably would have found it by now?
0

Share this post


Link to post
Share on other sites

Do you believe Bayes' Theorem is correct? It's not controversial in probability, and is easy to prove.

 

I believe Bayes' theorem correct, even without proof. Bayes' theorem describes exactly the way we perceive reality, or how people think in everyday life (and, most of the time, they're correct).

The police suspects and arrests people almost exclusively based on Bayes' theorem. Your wife is killed, most wifes are killed by their spouse. Therefore you're guilty. You are (insert ethnic group). Most thefts are done by (said ethnic group). You happen to be close to the crime scene, so you're the thief.

Funnily, more often than not, it turns out they're exactly right with this dumb approach, too. So, yeah, Bayes works.

 

However, applying Bayes' theorem (or any such thing as probability, for that matter) when it isn't applicable is wrong. After having shown that five chambers are empty and knowing that you've put one bullet in (and you haven't taken it out, or spun the drum again, or otherwise cheated), there is only one possible outcome in a universe where guns and bullets are physical objects.

 

 

(long explanation)

 

There is no fallacy to it, even though your explanation sounds perfectly reasonable. It doesn't matter whether or not you've survived the previous 5 rounds, since if you haven't survived (or the other guy hasn't) then you don't meet the experiment's conditions. It's pointless to consider whether or not that happened. Also, you cannot change past events based on observations on present (or less remote) events.

 

The initial assumption is that you have arrived at the last chamber, and there is a 50% chance that the referee has put in a bullet.

 

If there is a bullet, the bullet must be in this last chamber (there is no other way!), and the referee made his decision whether or not to put one in before anyone touched a trigger. The 50% chance that there is a bullet in one chamber doesn't change after the referee has tossed his coin, merely because nobody has died during the first five rounds. The only thing that changes during the game is the number of chambers that are left (and people dying, but that is outside the frame conditions of the experiment).

 

Our universe works in a way that you can best describe with memory_order_seq_cst. Things (even unrelated ones) happen in a sequentially consistent way (at least at non-relativistic speeds and with real objects and without gremlins reloading your gun). The referee's decision happenes first, the state of the gun is globally visible before any player touches the gun. The gun's "loaded" state is defined a priori and doesn't change afterwards, regardless of whether you've survived the first rounds or not.

 

The fallacy is in thinking that your survival of the first 5 rounds can change the past.

Edited by samoth
-3

Share this post


Link to post
Share on other sites

You don't have to shoot anyone in the head to test it. All you need to do is fire a gun 5 times without it going off. Alvaro even did a simulation. You can try it yourself with playing cards anyway.

 

As Alvaro and myself pointed out if you have a large number of trials it gets more obvious.

 

Applying Bayes' Theorem to probability isn't controversial, and the proof is easy. Applying it to statistics as a measure for belief in something is controversial, we're not talking about that though?

0

Share this post


Link to post
Share on other sites

That's a good explanation! Probs better if the other gun is in an alternate universe/parallel dimension though ;)

Edited by Paradigm Shifter
0

Share this post


Link to post
Share on other sites

I tried really hard to understand Alvaro's example, but couldn't get my head around how it would be correct. I've never been good with probabilities, and I guess that illustrates the point he was trying to make about how people's intuition can be very wrong.

 

That said, WOW! WarAmp comes through with an explanation that makes perfect sense to me. You start at 1/12, and every click increases the probability a little bit for the next attempt. Nice one!

0

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
Sign in to follow this  
Followers 0