Open dholford opened 2 years ago
I believe I've narrowed it down, but I can't figure out exactly what the issue is. Currently, in change_doors() something is happening that is allowing a "switch" to select the opened door. Because of this, I'm ending up with games where you lose if you stay or if you switch which is throwing of the win/lose percentage for switch.
My fear is I misread the lab 1 solutions, and this is simply the consequence of taking out the if-else structure that was in place when it was 2 goats and 1 car since this version of the game was intended for multiple cars and more than 2 goats. So now trying to run a game with 2 goats and 1 car doesn't quite work. But it seems like there should be a way to make it dynamic and allow for the original game circumstances, so I tried to play around with this but couldn't figure it out a way to set it up so that if the game length was 3 it would determine the final pick one way and if it was > 3 it would determine the final pick a different way.
Apologies for the 2nd post tonight. As I continued to work through the lab, I noticed that I seemed to be getting odd results from the code that was provided in lab 1 solutions for creating a game where the number of goats and cars is dynamic. When I run the simulation for 2 goats and 1 car I'm getting far different results from what I'd expect. Did anyone else have this issue?
Packaging into Simulation
Adding the Loop and Building Tables
strategy LOSE WIN stay 0.67 0.33 switch 0.59 0.41