A little riddle
Moderator: Moderators
Re: A little riddle
I dont really know the diference between when and then, but as far as I know affirming something doesnt invalidates other possibility...
whats the issue with the other riddle?
whats the issue with the other riddle?
Re: A little riddle
when - at the same time as
then - afterwards
The issue with the other riddle is that it was unclear whose disk the second person looked at. 'last' could mean the final man to be tested, but then you refer to the final man as 'third' seconds later, which makes it seem like 'last' is to be interpreted the other way, as 'previous'.
then - afterwards
The issue with the other riddle is that it was unclear whose disk the second person looked at. 'last' could mean the final man to be tested, but then you refer to the final man as 'third' seconds later, which makes it seem like 'last' is to be interpreted the other way, as 'previous'.
Re: A little riddle
i didnt read any replies but u shud change for a 2/3 chance to win. EZ game
Re: A little riddle
Dam grammar :)lurker wrote:when - at the same time as
then - afterwards
The issue with the other riddle is that it was unclear whose disk the second person looked at. 'last' could mean the final man to be tested, but then you refer to the final man as 'third' seconds later, which makes it seem like 'last' is to be interpreted the other way, as 'previous'.
"the second could only see the one from the last man and know that the first had missed, but also failed." I think in this part leaves it is quite clear that the last man is diferent from the first, else I would have said "and know he had missed" instead of "and know the first had missed"
Re: A little riddle
Good point.manored wrote:I would have said "and know he had missed" instead of "and know the first had missed"
Re: A little riddle
Oh and also bibim's second thing it now doesn't matter which you choose. I can't remember why but I know that having the host know which doors are which is a very important part of why the "normal" version is 2/3 for switching.
- SwiftSpear
- Classic Community Lead
- Posts: 7287
- Joined: 12 Aug 2005, 09:29
Re: A little riddle
The only reason it's important is if the second player is capable winning as well. If the second player always loses he performs absolutely identically to the host who knows which door is empty, and therefore is irrellevant to the simulation. We could modify det's simulation so that the second player chooses randomly and the game drops every instance in which he wins from the statistics. In that case we'll see that the simulation is the same. Since you have a 1/3 chance of winning at the start, and one wrong element is always removed, your chances are always better if you switch.tombom wrote:Oh and also bibim's second thing it now doesn't matter which you choose. I can't remember why but I know that having the host know which doors are which is a very important part of why the "normal" version is 2/3 for switching.
Re: A little riddle
I wouldn't be that sureSwiftSpear wrote:We could modify det's simulation so that the second player chooses randomly and the game drops every instance in which he wins from the statistics. In that case we'll see that the simulation is the same.

- SwiftSpear
- Classic Community Lead
- Posts: 7287
- Joined: 12 Aug 2005, 09:29
Re: A little riddle
if the 1/3 of the games the second player wins count then it will significantly change the simulation, if they don't then the simulation remains identical.bibim wrote:I wouldn't be that sureSwiftSpear wrote:We could modify det's simulation so that the second player chooses randomly and the game drops every instance in which he wins from the statistics. In that case we'll see that the simulation is the same.
Re: A little riddle
No they don't count, as you said before, because it's stated there is nothing behind his door.SwiftSpear wrote:if the 1/3 of the games the second player wins count then it will significantly change the simulation, if they don't then the simulation remains identical.bibim wrote:I wouldn't be that sureSwiftSpear wrote:We could modify det's simulation so that the second player chooses randomly and the game drops every instance in which he wins from the statistics. In that case we'll see that the simulation is the same.
Re: A little riddle
I've made a small Perl script to simulate the two riddles. It's clearly not optimized at all, I just wanted to make an easily understandable implementation, nearest as possible from the "real game". Here it is.
And here is the result:
And here is the result:
Code: Select all
anonymous@localhost:~$ ./riddles.pl 1
Winning rate when keeping the same door: 33.062
Winning rate when changing door: 66.938
anonymous@localhost:~$ ./riddles.pl 2
Winning rate when keeping the same door: 49.793
Winning rate when changing door: 50.207
Re: A little riddle
good lord det, ocaml?
i should write a brainfuck simulation of this just to spite you
i should write a brainfuck simulation of this just to spite you
- SwiftSpear
- Classic Community Lead
- Posts: 7287
- Joined: 12 Aug 2005, 09:29
Re: A little riddle
Perl is a mindfuck...
well... I'm not familiar with the syntax at all, but I can't figure out what's going on either way.
Still... the second problem is no different from the first, knowledge of the correct door is irrelevant if some arbitrary higher entity prevents you from selecting the correct door every time anyways.
The problem is that we're dropping 1 third of our simulations, and in those simulations the player has always selected the wrong door first. So basically, since we have an initial chance of 2/3 to select a wrong door first, but a 50% chance of ending the simulation every time a wrong door is selected, we've altered the simulation in a way the rules didn't explicitly describe... Although it is interesting how that effects the statistics, and it was something I didn't initially suspect, it's still technically breaking our rules since the ignorant player somehow magically fails to select the correct door every time via the riddle, however, our simulation changes that in such that he succeeds most of the time, but we just ignore those instances. Evidently it's not as trivial a difference as I would have initially thought.
well... I'm not familiar with the syntax at all, but I can't figure out what's going on either way.
Still... the second problem is no different from the first, knowledge of the correct door is irrelevant if some arbitrary higher entity prevents you from selecting the correct door every time anyways.
The problem is that we're dropping 1 third of our simulations, and in those simulations the player has always selected the wrong door first. So basically, since we have an initial chance of 2/3 to select a wrong door first, but a 50% chance of ending the simulation every time a wrong door is selected, we've altered the simulation in a way the rules didn't explicitly describe... Although it is interesting how that effects the statistics, and it was something I didn't initially suspect, it's still technically breaking our rules since the ignorant player somehow magically fails to select the correct door every time via the riddle, however, our simulation changes that in such that he succeeds most of the time, but we just ignore those instances. Evidently it's not as trivial a difference as I would have initially thought.
Re: A little riddle
I don't see what you mean :/SwiftSpear wrote:Still... the second problem is no different from the first, knowledge of the correct door is irrelevant if some arbitrary higher entity prevents you from selecting the correct door every time anyways.
No, we simply are taking into account conditional probabilities... Actually, this is the real difference between the 2 riddles: in the first riddle, we know that the other person will open a bad door even before we choose our first door. So when the other person opens the bad door, it doesn't alter the probability to have chosen the good door initially (1/3). These two events are independent. Whereas in the second riddle, the fact that the door opened by the other guy isn't the good one gives us information. As you explained, he has more chance to open a bad door if we chose the good door initially. These two events are dependent. So the fact that he chose randomly a bad door increases our chance to have the good door to 1/2. That's why we can't simulate these 2 riddles in the same way.SwiftSpear wrote:The problem is that we're dropping 1 third of our simulations, and in those simulations the player has always selected the wrong door first. So basically, since we have an initial chance of 2/3 to select a wrong door first, but a 50% chance of ending the simulation every time a wrong door is selected, we've altered the simulation in a way the rules didn't explicitly describe...
I don't understand :/ The riddle only speaks about one iteration of the game, and we know that the other guy has opened a bad door. What we are doing in the Perl script is simply performing this game several times, in order to obtain an approximation of the probabilities. But to obtain this approximation we have to be in the exact case of the riddle, i.e: we have to drop iterations where the other guy chooses the good door because in our single case, he chose a bad one...SwiftSpear wrote:Although it is interesting how that effects the statistics, and it was something I didn't initially suspect, it's still technically breaking our rules since the ignorant player somehow magically fails to select the correct door every time via the riddle, however, our simulation changes that in such that he succeeds most of the time, but we just ignore those instances. Evidently it's not as trivial a difference as I would have initially thought.
Re: A little riddle
okay i somehow ended up writing a brainfuck interpreter in python last night
i'll try and write an actual python simulator for the Monty Hall problem sometime later...
i'll try and write an actual python simulator for the Monty Hall problem sometime later...
Re: A little riddle
Python version is trivial: 

Code: Select all
import random
numGames = 10000
gameDoors = [0, 1, 2]
playerDoors = [0, 1, 2]
switch = True
wins = 0
losses = 0
for i in range(numGames):
playerDoor = random.choice(gameDoors)
prizeDoor = random.choice(gameDoors)
if (playerDoor == prizeDoor):
gameDoors.remove(prizeDoor)
else:
gameDoors.remove(playerDoor)
gameDoors.remove(prizeDoor)
hostDoor = random.choice(gameDoors)
if (switch):
playerDoors.remove(playerDoor)
playerDoors.remove(hostDoor)
playerDoor = playerDoors[0]
playerDoors = [0, 1, 2]
if (playerDoor == prizeDoor):
wins += 1
else:
losses += 1
gameDoors = [0, 1, 2]
winPerc = (float(wins) / numGames) * 100
lossPerc = (float(losses) / numGames) * 100
print "wins: %d (%.2f%%), losses: %d (%.2f%%)" % (wins, winPerc, losses, lossPerc)
Code: Select all
switch = True
python ./MontyHall.py
wins: 6665 (66.65%), losses: 3335 (33.35%)
switch = False
python ./MontyHall.py
wins: 3283 (32.83%), losses: 6717 (67.17%)
Last edited by Kloot on 27 Jun 2008, 00:19, edited 4 times in total.
Re: A little riddle
swiftspear is just _wrong_ and it's depressing that he won't accept this
Re: A little riddle
Well, I dont know Python at all, however it seems you forgot to remove the playerDoor from the gameDoors before choosing the hostDoor. Maybe that would explain why you have "win ratio when keeping door" + "win ratio when switching" != 100% ...Kloot wrote:Code: Select all
playerDoor = random.choice(gameDoors) prizeDoor = random.choice(gameDoors) gameDoors.remove(prizeDoor) hostDoor = random.choice(gameDoors)
Re: A little riddle
Oops, nice catch. Post is bugfixed now. 

Re: A little riddle
Just remembered another riddle: There are 2 men, one is the "correct" and the other is the "false". The correct always tells the truth and the false always lies. You must discover who is who, but you can only do so by making a single question that both will answer. What question must you make?